1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-13 18:00:58 +08:00

fix(CI): 修复依赖下载异常,PNPM版本约束统一

This commit is contained in:
142vip.cn
2023-10-31 19:19:27 +08:00
parent 56cb1dee37
commit af06e39ed5
2 changed files with 12 additions and 8 deletions

View File

@@ -1,20 +1,20 @@
{
"name": "408CSFamily",
"description": "专业代号408计算机基础知识合集",
"description": "研究生考试408考点、工作面试计算机基础知识合集",
"version": "0.0.1-alpha.8",
"packageManager": "pnpm@8.9.2",
"engines": {
"node": "^18.x",
"pnpm": ">=7.2.1"
},
"author": {
"name": "Chu Fan",
"email": "fairy_408@2925.com",
"url": "https://github.com/142vip"
},
"packageManager": "pnpm@8.9.2",
"engines": {
"node": "^18.x",
"pnpm": "8"
},
"scripts": {
"preinstall": "chmod +x ./scripts/*",
"postinstall": "npm run build:mark-map",
"postinstall": "pnpm build:mark-map",
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"./scripts/lint\" && chmod +x .husky/pre-commit",
"dev": "vuepress dev docs",
"build": "./scripts/bundle build",

View File

@@ -6,7 +6,8 @@
##
# 期望的 pnpm 大版本号
majorVersionRequired="8"
majorVersionRequired=$(grep -o '"pnpm": *"[^"]*"' package.json | awk -F'"' '{print $4}')
echo "期望的 pnpm 大版本号:$majorVersionRequired"
# 检测 pnpm 是否已安装并且大版本号符合要求
checkPNPMVersion() {
@@ -37,3 +38,6 @@ fi
# 安装项目依赖
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com