Mixed npm and pnpm locks report an upgrade as applied without changing either lock
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
研究方向
Start by reproducing with the linked fixture and the exact socket fix commands, then compare the apply result with git diff and a fresh dry-run. Trace how the CLI detects and updates package-lock.json and pnpm-lock.yaml when both are present; the issue names no source files or tests. Done means each lock is either changed and reported accurately, or the mixed-lock condition is reported without claiming unchanged files or unresolved targets were applied.
由索引模型根據 Issue 內容生成。
描述
Mixed npm and pnpm locks report an upgrade as applied without changing either lock
Environment
- Socket CLI 1.8.2, Coana CLI 15.12.11
- Node.js 26.13.0, npm 11.20.0, pnpm 10.28.0
- Linux container; lifecycle scripts disabled
- Public dependencies only
Reproduction
Public fixture (manifest and both generated lockfiles): https://gist.github.com/ivan-novaprime/ae77a24cb98cc19e9afa0a0f9a108218
The accompanying fixture contains a package.json with [email protected], which depends on ip-address through ^10.2.0. Its npm-generated lock resolves [email protected] and its pnpm-generated lock resolves [email protected]. The files were generated with the respective package managers using historical release cutoffs; neither lock was edited by hand.
With Socket CLI authenticated by the normal supported method, from a fresh copy of the fixture:
npm ci --ignore-scripts --no-audit --no-fund
CI=true pnpm install --frozen-lockfile --ignore-scripts
git init
git add package.json package-lock.json pnpm-lock.yaml .gitignore
git -c user.name=Repro -c [email protected] commit -m baseline
socket fix --all --fix-version 15.12.11 --ecosystems npm \
--no-major-updates --minimum-release-age 1w --range-style preserve \
--no-apply-fixes --json --silence . > before.json
socket fix --id GHSA-h3mg-xc3c-68pw,GHSA-j6r3-76f7-8jcv,GHSA-rxp7-6hxx-x8q5 \
--fix-version 15.12.11 --ecosystems npm --no-major-updates \
--minimum-release-age 1w --range-style preserve --json --silence . > applied.json
git diff -- package.json package-lock.json pnpm-lock.yaml
socket fix --all --fix-version 15.12.11 --ecosystems npm \
--no-major-updates --minimum-release-age 1w --range-style preserve \
--no-apply-fixes --json --silence . > after.json
The targeted apply exits 1, so continue to the diff and rescan even when using a shell configured to exit on errors.
Observed
The initial plan proposes upgrading both locked versions to 10.7.4 for each of the three GHSAs. The apply result is ok: false and reports No file was changed for this upgrade for the 10.5.1 target under all three GHSAs. It also reports the 10.4.0 targets as applied and lists package-lock.json in modifiedFiles.
However, git diff is empty: the npm lock still resolves 10.5.1 and the pnpm lock still resolves 10.4.0. A fresh dry-run still proposes both versions. Thus the reported applied target and modified-file list do not match the actual fixture diff.
For comparison, separate fixtures with the same manifest and only the npm lock or only the pnpm lock both apply the three targeted upgrades successfully, changing the corresponding lock to 10.7.4; the targeted GHSAs are absent from each fresh rescan.
Expected
Each supported lockfile should either be upgraded and reported accurately, or the result should identify the unsupported mixed-lock condition without reporting unchanged files or unresolved targets as applied.
- 主要語言
- TypeScript
- 星號
- 335
- 分支
- 74
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 91
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
SocketDev/socket-cli 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
SocketDev/socket-cli#1655 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
SocketDev/socket-cli#1160 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 半天 新手友好度 38/100
SocketDev/socket-cli#1690 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 22/100
SocketDev/socket-cli#1689 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 15/100
SocketDev/socket-cli#1688 ·
維護者通常 1 天內回覆
查看 SocketDev/socket-cli 的全部 Issue
相似的 Issue
-
bug module:nodes tests
難度 2/5 1-3 小時 新手友好度 78/100
rocketride-org/rocketride-server#3020 ·
維護者通常 2 天內回覆
-
area: dashboard area: tests good first issue size: XS tests
難度 1/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
enhancement needs-community-review
難度 2/5 1-3 小時 新手友好度 67/100
shaharia-lab/slackcli#501 · 3 則留言 ·
維護者通常 1 天內回覆
-
[Bug] Pod detail shows CPU usage ten times too high, and throws on decimal memory suffixes可能已有人在做 @RaphaelFakhri 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 11 天內回覆
-
`package.json`: build tools listed as runtime dependencies, exact pins causing duplicate installs未關閉
難度 2/5 1-3 小時 新手友好度 68/100
themesberg/flowbite-vue#471 ·