Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG?] npm pack --json removed from npm v6 to v7? #2038

Closed
legodude17 opened this issue Oct 25, 2020 · 1 comment · Fixed by #3217
Closed

[BUG?] npm pack --json removed from npm v6 to v7? #2038

legodude17 opened this issue Oct 25, 2020 · 1 comment · Fixed by #3217
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@legodude17
Copy link
Contributor

Current Behavior:

npm pack --json will completely ignore the --json option and output it's usual stuff anyway:

❯ npm pack --json
npm notice
npm notice 📦  go-out@0.3.4
npm notice === Tarball Contents ===
npm notice 541B  .eslintrc
npm notice 3.1kB index.js
npm notice 742B  package.json
npm notice 44B   readme.md
npm notice === Tarball Details ===
npm notice name:          go-out
npm notice version:       0.3.4
npm notice filename:      go-out-0.3.4.tgz
npm notice package size:  1.8 kB
npm notice unpacked size: 4.4 kB
npm notice shasum:        335e6a29ea9d42ba2d3817f85529936124e89258
npm notice integrity:     sha512-CAsUMo/cw4Aky[...]sDbM8gk8vr51A==
npm notice total files:   4
npm notice
go-out-0.3.4.tgz

Expected Behavior:

npm pack --json on npm v6 and earlier would output a json description of the tarball, which I believe was virtually identical to the output of getContents in lib/utils/tar.js.

Steps To Reproduce:

  1. Using npm v7
  2. Run npm pack --json

Environment:

  • OS: macOS Catalina 10.15.7
  • Node: 15.0.1
  • npm: 7.0.3

Additional Notes

My use case was to find what would be included in a tarball, so I'm going to use npm-packlist now, but this change did break one of my tools (go-out) and I could not find any documentation about it.

@legodude17 legodude17 added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Oct 25, 2020
@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Jan 21, 2021
@darcyclarke darcyclarke added this to the OSS - Sprint 23 milestone Jan 25, 2021
@mrmlnc
Copy link
Contributor

mrmlnc commented Jun 4, 2021

Fixed in #3217 and shipped in 7.14.0.

@ljharb ljharb closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants