build(npm): allowlist dependency install scripts - #112
Merged
Conversation
npm 12 no longer runs `preinstall`/`install`/`postinstall` from dependencies unless the root `package.json` lists them in `allowScripts`. `npm ci` still succeeds, so a missing entry only surfaces later as a missing binary. Generated with `npm approve-scripts --all --no-allow-scripts-pin`, so the entries are name-only and keep matching after a dependency bump.
8 tasks
The published fsevents 2.3.3 tarball ships a prebuilt `fsevents.node` and has no `install` script; only the registry manifest marks it as having one, so approving it grants nothing useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an
allowScriptsentry denyingfsevents, the only dependency flagged as having an install script.Motivation
npm 11.16+ warns on every install about
fsevents, the only dependency flagged as having an install script, and npm 12 blocks it. The published tarball has noinstallscript (only the registry manifest lists one), so the entry records an explicitfalse.Additional details
fseventsis darwin-only, so Ubuntu CI never installs it and does not exercise the entry..nvmrcpins Node 22, whose npm does not know the option.npm ci --strict-allow-scriptspasses on npm 12.0.2 and 11.19.0;npm approve-scripts --allow-scripts-pendingreports nothing.Related issues and pull requests
Part of mdn/fred#1868.