Skip to content

Commit d11ee9a

Browse files
author
公众号:Rong姐姐好可爱
authored
Merge pull request #93 from mmdapl/fix/ci-pnpm
fix(CI): 修复依赖下载异常,PNPM版本约束统一
2 parents 4d9bacf + 9ebb6bb commit d11ee9a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"packageManager": "[email protected]",
1212
"engines": {
1313
"node": "^18.x",
14-
"pnpm": ">=7.2.1"
14+
"pnpm": "8"
1515
},
1616
"scripts": {
1717
"preinstall": "chmod +x ./scripts/*",

scripts/ci

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
##
77

88
# 期望的 pnpm 大版本号
9-
majorVersionRequired="8"
9+
majorVersionRequired=$(grep -o '"pnpm": *"[^"]*"' package.json | awk -F'"' '{print $4}')
10+
echo "期望的 pnpm 大版本号:$majorVersionRequired"
1011

1112
# 检测 pnpm 是否已安装并且大版本号符合要求
1213
checkPNPMVersion() {
@@ -36,4 +37,4 @@ else
3637
fi
3738

3839
# 安装项目依赖
39-
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
40+
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com

0 commit comments

Comments
 (0)