npm / npm/cli

[BUG] InBundle vs InDepBundle in approve scripts functionality

Open
#9,679 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
This is not just a request to bump a dependency for a CVE
  • This is not solely a request to bump a dependency for a CVE
Current Behavior

See the discussion for the analysis. However, basic idea is the use of InBundle causes some lifecycle scripts to be skipped when a package is bundled in the root package.

Expected Behavior

Approve scripts listing of pending lists all and the blocking of scripts till approved in all cases where they would run.

Steps To Reproduce

Smoke test and which commit I ran from all in the mentioned discussion. Commit reference and patch provided in discussion.

Environment

Running from 86416a626e4599791c5d8115ed08aa4369774844 and reviewing approval script code.

; "project" config from C:\git\copilot-worktrees\npm-cli\copilot-implement-rfc-897-plan\.npmrc

package-lock = true

; node bin location = C:\nvm4w\nodejs\node.exe
; node version = v24.16.0
; npm local prefix = C:\git\copilot-worktrees\npm-cli\copilot-implement-rfc-897-plan
; npm version = 11.13.0
; cwd = C:\git\copilot-worktrees\npm-cli\copilot-implement-rfc-897-plan
; HOME = C:\Users\vbjay
; Run `npm config ls -l` to show all defaults.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the approval script code at commit 86416a626e4599791c5d8115ed08aa4369774844 and reproduce the smoke test described in the linked discussion. Compare InBundle and InDepBundle handling, then verify that pending scripts are listed and blocked until approval in every case where they would run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.