Skip to content

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

Closed

Description

@legodude17

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.

Activity

  1. added
    Bug
    Needs Triage
    Release 7.x
    on Oct 25, 2020
  2. added
    Priority 2
    and removed
    Needs Triage
    on Jan 21, 2021
  3. added this to the OSS - Sprint 23 milestone on Jan 25, 2021
  4. mrmlnc commented on Jun 4, 2021

    @mrmlnc
    Contributor

    Fixed in #3217 and shipped in 7.14.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPriority 2Release 7.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions