fix: key allowScripts for R by its resolved name, not the alias - #233
Conversation
The entry was `tree-sitter-r@1.3.0` — the alias used in `dependencies` — but npm derives the trusted identity from the resolved package in the lockfile, which is `@davisvaughan/tree-sitter-r@1.3.0`. The old key therefore matched nothing, the grammar's install script counted as unreviewed, and `npm ci --strict-allow-scripts` failed with ESTRICTALLOWSCRIPTS. With the key corrected it installs clean. This has been latent rather than breaking because the package ships prebuilds for every supported platform, so a blocked `node-gyp-build` still resolved a binary. The `overrides` key must stay the alias `tree-sitter-r`; overrides are keyed by the dependency name in the tree, allowScripts by the resolved package. The two fields deliberately differ here.
🌱 graft blast radiusNothing outside this diff depends on it. 0 areas changed; no indexed dependents at depth 2.
Open the interactive graph → — click an area to see the code that changed, and the line that reaches it. |
# Conflicts: # CHANGELOG.md
|
Verified on top of current |
allowScriptshastree-sitter-r@1.3.0— the alias fromdependencies— but npm derives the trusted identity from the resolved package in the lockfile, which is@davisvaughan/tree-sitter-r@1.3.0. The key matches nothing, so the grammar's install script counts as unreviewed and gets blocked.On
maintoday:With the key corrected,
npm ci --strict-allow-scriptsexits 0.Latent rather than breaking so far, because the package ships prebuilds for every supported platform — a blocked
node-gyp-buildstill resolved a binary. It would bite on any platform without a prebuild, and it already makes the strict flag unusable.Worth a comment for whoever touches this next, and the reason I didn't "fix" both to match: the
overrideskey must stay the aliastree-sitter-r. Overrides are keyed by the dependency name as it appears in the tree;allowScriptsby the resolved package. Keying overrides on the scoped name instead makes npm ignore it andERESOLVEfires. The two fields differ on purpose here.Spotted while rebasing #40; unrelated to it, so it's on its own.