Skip to content

Conversation

@achingbrain
Copy link
Member

@achingbrain achingbrain commented Feb 13, 2020

npm shrinkwrap renames your package-lock.json if present, this includes project dev deps which npm seems to be installing even though the published module with the shrinkwrap file is a dependency.

If we install with the --production flag, then remove the package-lock.json file and then run shrinkwrap, no dev deps are included in the shrinkwrap file.

This only affects npm, yarn seems to do the right thing.

Fixes #516

`npm shrinkwrap` renames your `package-lock.json` if present, this
includes project dev deps which npm seems to be installing even
though the published module with the shrinkwrap file is a dependency.

If we install with the `--production` flag, then remove the
`package-lock.json` file and *then* run shrinkwrap, no dev deps are
included in the shrinkwrap file.

This only affects npm, yarn seems to do the right thing.

Fixes #516
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we should get this merged asap and get a patch release out on 0.41.

@hugomrdias hugomrdias merged commit 02fc308 into master Feb 14, 2020
@hugomrdias hugomrdias deleted the omit-dev-deps-from-shrinkwrap branch February 14, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omit dev deps from shrinkwrap/yarn.lock

4 participants