[BUG] npm pack --json returns incorrect filename for scoped package #5334
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When dealing with a scoped package, the file created on disk is of the format
scope-package-1.0.0.tgz
.The filename that is reported by
npm pack --json
is incorrect as it's reported as@scope/package-1.0.0.tgz
instead.The filename reported by
npm pack
(without--json
) is correct.Expected Behavior
When running
npm pack --json
the reportedfilename
property should bescope-package-1.0.0.tgz
instead of@scope/package-1.0.0.tgz
.Steps To Reproduce
Given a
package.json
with the following:The output of
npm pack
is the following, which includes the correct filename:The output of
npm pack --json
is the following, which includes an incorrectfilename
property:Environment
The text was updated successfully, but these errors were encountered: