Skip to content

feat: namespace install-script approval commands under npm install-scripts#9635

Merged
owlstronaut merged 1 commit into
npm:release/v11from
manzoorwanijk:backport/install-scripts-namespace-v11
Jun 24, 2026
Merged

feat: namespace install-script approval commands under npm install-scripts#9635
owlstronaut merged 1 commit into
npm:release/v11from
manzoorwanijk:backport/install-scripts-namespace-v11

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Contributor

Backport of #9629 to release/v11.

Adds the namespaced npm install-scripts command (approve, deny, ls), keeping npm approve-scripts / npm deny-scripts working as aliases, and points the install-time, rebuild, and strict-allow-scripts guidance at the new namespace.

References

Backports #9629

@manzoorwanijk manzoorwanijk changed the title feat: namespace install-script approval commands under npm install-scripts (backport to v11) feat: namespace install-script approval commands under npm install-scripts Jun 24, 2026
@manzoorwanijk manzoorwanijk force-pushed the backport/install-scripts-namespace-v11 branch 2 times, most recently from 2faac6f to c45e8b9 Compare June 24, 2026 15:22
…ripts (npm#9629)

Add a namespaced `npm install-scripts` command that groups the
install-script approval operations, following npm's existing `npm cache
<cmd>` / `npm token <cmd>` convention:

- `npm install-scripts approve <pkg>... | --all`
- `npm install-scripts deny <pkg>... | --all`
- `npm install-scripts ls` (list packages with unreviewed install
scripts)

The shipped `npm approve-scripts` and `npm deny-scripts` commands keep
working as aliases for `approve` and `deny`, so this is additive and
backwards compatible. The shared `AllowScriptsCmd` base now dispatches
through `runMode(mode, args)`; the standalone commands route through it
via `static verb`. The `--allow-scripts-pending` flag is only honored by
the commands that declare it, so the namespace lists exclusively through
`ls`.

Closes npm#9545
Follow-up from RFC npm/rfcs#868.
@manzoorwanijk manzoorwanijk force-pushed the backport/install-scripts-namespace-v11 branch from c45e8b9 to cea039c Compare June 24, 2026 17:10
@manzoorwanijk manzoorwanijk marked this pull request as ready for review June 24, 2026 17:12
@manzoorwanijk manzoorwanijk requested review from a team as code owners June 24, 2026 17:12
@owlstronaut owlstronaut merged commit fc9d4c7 into npm:release/v11 Jun 24, 2026
38 checks passed
@manzoorwanijk manzoorwanijk deleted the backport/install-scripts-namespace-v11 branch June 24, 2026 17:26
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.

2 participants