-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
As of v9, npm pack
will no longer add npm-shrinkwrap.json
to the generated tarball if you specify files
within package.json
without including npm-shrinkwrap.json
in the specified array. This behavior is present in v10 as well.
Expected Behavior
The generated tarball should automatically include npm-shrinkwrap.json
even if it is not included in a specified files
array in package.json
.
Steps To Reproduce
- Create a package with
npm init -y
- Add a package (e.g.
npm i react
) - Run
npm shrinkwrap
- Add a
files
array topackage.json
- Run
npm pack
- The cli output will not list
npm-shrinkwrap.json
, nor will it be present in the tarball
Environment
- npm: 9.5.1
- Node.js: 18.16.1
- OS Name: macOS 12.6.8
- System Model Name: MacBook Pro (Retina, 13-inch, Early 2015)
- npm config:
update-notifier = false
t1m0thyj
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release