Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "prune: Fix bug where prune --production would remove dev deps… #166

Closed
wants to merge 1 commit into from

Commits on Feb 20, 2019

  1. Revert "prune: Fix bug where prune --production would remove dev deps…

    … from the lock file"
    
    This breaks the ability to (easily) create a shrinkwrap file that does not include devDeps.  The current behavior of a package published with a shrinkwrap file that includes devDeps is that the devDeps get installed when the package is installed globally.  The only way around this was to `prune --prod` during prepack to generate a shrinkwrap without devDeps and publish with that. 
    
    After this change, `prune --prod` no longer modifies the shrinkwrap file to remove devDeps.  
    
    The situation is already looking like a hack but:
    
    - Perhaps a shrink wrapped package should not install devDeps when installed as a dependency or global package (this seems the most correct and implied behavior described in https://docs.npmjs.com/files/shrinkwrap.json)
    - Perhaps running `npm shrinkwrap --prod` should remove the devDeps from the lock file (without pruning node_modules so its faster and can be restored by shrink-wrapping without the flag).  Easier than above, but still possibly in hacksvill. 
    
    I would propose we revert this change so that this avenue isn’t broken, until the primary issue is resolved.
    
    This reverts commit cec5be5.
    bcomnes committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    aaf6ff8 View commit details
    Browse the repository at this point in the history