[BUG] npm does not respect shrinkwrap files when _hasShrinkwrap
is undefined
#4583
Open
2 tasks done
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
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
If I publish a package that contains
npm-shrinkwrap.json
to an NPM registry that does not define the_hasShrinkwrap
property in its package metadata, thennpm install
ignores the shrinkwrap file when I install that package.Registries that do not define the
_hasShrinkwrap
property in their package metadata include Artifactory 7.34.4 and Verdaccio 5.8.0.Expected Behavior
If
_hasShrinkwrap
is undefined then npm should fall back to checking for the presence ofnpm-shrinkwrap.json
.This was the behavior in npm@6, and is the expected behavior according to the npm registry docs:
Steps To Reproduce
npm init -y
npm install @zowe/cli@6.37.8 --@zowe:registry=https://zowe.jfrog.io/zowe/api/npm/npm-release/
(zowe.jfrog.io is a public Artifactory registry and this package uses shrinkwrap)
flatted@3.2.5
instead of3.2.4
)Environment
The text was updated successfully, but these errors were encountered: