Commit fccb37d
fix(vscode): switch diff override to mocha-nested form for npm 10 compat
The version-scoped `diff@>=6.0.0 <8.0.3 -> ^8.0.3` override caused
`npm ci` to fail under npm 10.8.2 (used by CI) with:
npm error EUSAGE
npm error `npm ci` can only install packages when your package.json
npm error and package-lock.json or npm-shrinkwrap.json are in sync.
npm error Missing: diff@7.0.0 from lock file
This is an npm 10 limitation: its `npm ci` lockfile validator does not
fully consult version-scoped overrides when determining whether the
lockfile satisfies a consumer's declared range (mocha 11.7.5 declares
`diff: ^7.0.0` but the override redirects to 8.0.4).
Switching to a nested override under mocha — matching upstream PR
microsoft/PSDocs-vscode#539 — is npm-10-compatible AND even more
narrowly scoped than the version-range form (only mocha's diff
consumer is affected). The v5 diff CVE range is no longer in the
tree (mocha now uses ^7.0.0, not ^5.0.0), so a separate v5 patch is
unnecessary.
Also regenerated the lockfile with npm 10.8.2 to ensure parity with
the CI runtime.
Validation:
- npm install (npm 10.8.2) -> 0 vulnerabilities
- npm ci (npm 10.8.2) -> succeeds, 0 vulnerabilities
- npm run compile, lint, pack all clean
- diff still resolves to 8.0.4 (patched)
- All 14 originally-flagged alerts remain resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d8dca07 commit fccb37d
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
0 commit comments