fix: honor declared picomatch override in lockfile - #1108
Conversation
The root package.json declares `overrides.picomatch: ^4.0.5`, but the lockfile resolved picomatch to 4.0.4 at the root while carrying three redundant nested 4.0.5 copies under tinyglobby, vite and vitest. `npm ls` flagged the root node as `invalid`. Hoist picomatch to a single 4.0.5 node and drop the three duplicates, so the installed tree matches the declared override. Lockfile-only; no manifest changes. Verified on this change: - npm ci --legacy-peer-deps exit 0 - npm run build:web exit 0 - apps/web npm run lint exit 0 - picomatch glob-matching behaviour 4/4 cases pass - `npm ls --all` no longer reports picomatch as invalid Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files
|
Agent Completion Truth Gate: NOT_APPLICABLEEvidence agrees. Machine-readable verdict{
"details": {},
"reasons": [],
"verdict": "not_applicable"
} |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
The six pre-existing |
Problem
The root
package.jsondeclares:…but the lockfile did not honor it.
picomatchresolved to 4.0.4 at the root, while three redundant nested 4.0.5 copies were carried undertinyglobby,viteandvitest.npm ls --allflagged the root node asinvalid.Found while verifying the security work in #1100 / #1101 / #1102.
Why
npm cidid not catch thisnpm cionly checks that the declared ranges in the manifest match those recorded in the lockfile — and they did. The defect is in the lockfile's resolved node versions, which violate the declared override. That is only surfaced bynpm ls, never bynpm ci.Worth knowing on its own: it means CI is structurally blind to this class of drift.
Change
Lockfile-only. Hoist
picomatchto a single4.0.5node and drop the three duplicate nested copies.No manifest files are touched.
Verification
npm ci --legacy-peer-depsnpm run build:webapps/web→npm run lintnpm ls --allreports picomatch invalidBehavioural check run against the installed node — glob matching is picomatch's entire job, and
vite/vitest/tinyglobbyare the consumers:Scope
This does not fix the six pre-existing
apps/webdrift markers, which are a separate and larger problem:Those need a full lockfile regeneration rather than a surgical edit, so they are filed separately rather than bundled in here.
Risk
Low. Lockfile-only, no manifests changed, and it brings the tree into compliance with an already-declared override rather than introducing a new constraint. 4.0.5 was already installed in three places in this same tree.