Skip to content

fix(arborist): show real install script names on lockfile installs#9428

Merged
owlstronaut merged 1 commit into
npm:latestfrom
JamieMagee:fix/install-scripts-hydrate-from-disk
May 28, 2026
Merged

fix(arborist): show real install script names on lockfile installs#9428
owlstronaut merged 1 commit into
npm:latestfrom
JamieMagee:fix/install-scripts-hydrate-from-disk

Conversation

@JamieMagee
Copy link
Copy Markdown
Contributor

On lockfile-driven installs (npm ci, a repeat npm install), the allow-scripts advisory printed (install scripts present) instead of the actual script. The lockfile only records hasInstallScript, not the script bodies, so node.package.scripts was empty. We now read the installed package.json from disk to recover the real scripts, and keep the sentinel only for when the package isn't on disk yet (e.g. npm ci preflight before reify).

Fixes the core-js/fsevents report: https://bsky.app/profile/sebastienlorber.com/post/3mmwfy2s2p22t

@JamieMagee JamieMagee marked this pull request as ready for review May 28, 2026 18:58
@JamieMagee JamieMagee requested review from a team as code owners May 28, 2026 18:58
@owlstronaut owlstronaut merged commit a81f2f8 into npm:latest May 28, 2026
18 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Backport to release/v11 created: #9429

@JamieMagee JamieMagee deleted the fix/install-scripts-hydrate-from-disk branch May 28, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants