Skip to content
Discussion options

You must be logged in to vote

You've done excellent analysis here — this is definitely a bug.

You're exactly right about the distinction:

Case inBundle inDepBundle Scripts run? Current behavior
Normal dep false false ✅ Yes ✅ Visible
Root-bundled true false ✅ Yes ❌ Hidden (bug)
Dep-bundled true true ❌ No ✅ Hidden (correct)

The guard if (node.inBundle) return null is too broad — it treats root-bundled packages (where the root project lists something in bundleDependencies) the same as dependency-bundled packages (where a published tarball already ran scripts at publish time).

The fix should be inDepBundle instead of inBundle — your test patch confirms this. The comment in node.js even says root-bundled packages "still ha…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vbjay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
npm
Labels
Question Ask and answer questions about GitHub features and usage npm Discussions around programming langages, open source and software development source:ui Discussions created via Community GitHub templates
4 participants