fix(ci): pin pnpm to 11.12.0 to avoid 11.13.0 install regression#2876
fix(ci): pin pnpm to 11.12.0 to avoid 11.13.0 install regression#2876lzxue wants to merge 1 commit into
Conversation
prepare-install 复合 action 原用浮动 version: 11,最近解析到新发布的 pnpm 11.13.0,导致 pnpm install 在解析 lockfile 时崩溃: [ERROR] Cannot use 'in' operator to search for 'integrity' in undefined 影响所有基于当前 master 的新 PR(lint/unit-test/size-test 在 install 阶段即失败,~10s),与各 PR 的代码改动无关。 固定为 11.12.0(与 package.json 的 packageManager 字段一致)。 action-setup@v3 本身可读 packageManager,但显式 pin 更稳妥。
|
There was a problem hiding this comment.
Code Review
This pull request updates the pnpm version to 11.12.0 in the prepare-install GitHub action. The reviewer suggested removing the explicit version parameter entirely to leverage pnpm/action-setup's ability to automatically read the version from package.json, thereby avoiding duplicate maintenance of the version number.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| - uses: pnpm/action-setup@v3 | ||
| with: | ||
| version: 11 | ||
| version: 11.12.0 |
There was a problem hiding this comment.
问题
最近所有基于 master 的新 PR,CI 的
lint/unit-test/size-test三个 job 都在 install 阶段 ~10s 内失败:复现 PR(与各自代码改动无关,均在 install 阶段崩):
根因
.github/actions/prepare-install/action.yml用浮动版本:version: 11近期解析到新发布的 pnpm 11.13.0,它与当前 lockfile(由pnpm@11.12.0生成)不兼容,在pnpm install解析 lockfile 时崩溃。对照证据:更早的 PR(#2863 / #2856 / #2853 等)跑
lint (20.x)全 pass、耗时 2 分钟+(真正跑了测试)——彼时 11.x 还解析到 11.12.0/更早版本;近期 11.13.0 发布后才 regression。修复
固定为
11.12.0,与package.json的packageManager: "pnpm@11.12.0"一致:验证
本 PR 的 CI 会用固定后的 11.12.0 运行 —— 若 install 通过、lint/unit/size 正常跑起来,即验证修复。
说明
action-setup@v3本身可读packageManager字段,但仅在未显式传version时。当前 action 显式传了version: 11会覆盖,故需显式 pin。