cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] bundled dependencies files are not shown in output of `npm pack`

Open piranna opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

When using npm pack with a package that has some bundle dependencies, they are shown at the output in a === Bundled Dependencies === section, but just only their names, not the actual files being included.

Expected Behavior

Before that there's the usual === Tarball Contents === section, that the bundle dependencies files should be shown there since, in fact, they are part of the tarball contents.

Steps To Reproduce

  1. create a package with bundleDependencies
  2. run npm pack
  3. a === Bundled Dependencies === section is added in the output, but the bundle dependencies files are not being shown in the === Tarball Contents === section

Environment

  • npm: 9.5.0
  • Node.js: 19.7.0
  • OS Name: Ubuntu 22.10
  • System Model Name: Slimbook Executive
  • npm config:
//npm.pkg.github.com/:_authToken = (protected) 
//registry.npmjs.org/:_authToken = (protected) 
frame:apiServer = "127.0.0.1" 
frame:traverseNat = true 

; node bin location = /usr/bin/node
; node version = v19.7.0
; npm local prefix = /home/piranna/github/Mafalda/ROPE-server-CLI
; npm version = 9.5.0
; cwd = /home/piranna/github/Mafalda/ROPE-server-CLI
; HOME = /home/piranna
; Run `npm config ls -l` to show all defaults.

piranna avatar Mar 14 '23 07:03 piranna

I could see that argument. I'm not sure if it's a bug or a feature request. I'm curious as to your use case. You could always run tar -tvf package.tgz if you wanted the full contents.

fritzy avatar Mar 15 '23 18:03 fritzy

I'm curious as to your use case.

I'm using bytenode as a poors-man pkg to distribute binaries of my libraries and server apps, pkg is giving me several problems and found that webpack + bytenode is almost doing the job.

You could always run tar -tvf package.tgz if you wanted the full contents.

Obviously :-) Just only, it's a bit surprissing that the bundleDependencies files are not shown in the output list of packaged files, and just a list of bundled packages is lacking that information, so I think maybe it's a bug.

piranna avatar Mar 15 '23 18:03 piranna