Skip to content

fix(prune): respect allowScripts policy from package.json#9438

Open
colincasey wants to merge 2 commits into
npm:latestfrom
colincasey:fix/9435-prune-allow-scripts
Open

fix(prune): respect allowScripts policy from package.json#9438
colincasey wants to merge 2 commits into
npm:latestfrom
colincasey:fix/9435-prune-allow-scripts

Conversation

@colincasey
Copy link
Copy Markdown

npm prune was emitting an allow-scripts advisory warning even when the package was explicitly approved in package.json#allowScripts. This PR mirrors the allowScript setup and testing already present in lib/commands/update.js.

Note

The same allow-scripts advisory warning issue was also noticed when executing other commands (e.g.; npm dedupe, npm audit fix, etc.). They are deliberately out of scope for this PR since I didn't notice them until after I filed the associated issue.

Fixes #9435

@colincasey colincasey requested review from a team as code owners May 29, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] allowsScripts not respected by prune command

1 participant