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
Nested optionalDependencies are not removed #75
Comments
@codyhatch Looking at 75265ac, that fix only addresses removal of As a work-around for the time being, you can add I think the correct fix here would be to prune optional dependencies that exist anywhere in the tree, as @palmerj3 pointed out in #74. @JamieMason thoughts? |
Agree @DrewML that you'd have to pluck I'll think about this some more, but I'm initially hesitant because I'm already not content with how much |
I'll close #74 as a duplicate as there is more discussion in this thread.
|
I've pushed a change to feat/75-nested-optional-deps which seems to work well, using the The test suite will need updating before it can be released though, as the pruning of optional dependencies results in different files in node_modules (the default behaviour when doing an npm install normally is to include optional dependencies). |
If I try something like this on a Mac:
I believe that
fsevents
should be pruned from the rewrittennpm-shrinkwrap.json
file. However, it's not, which means that if I try to install this package on a linux server it will fail, becausefsevents
is still attempting to be installed.This is with node v4.5.0, npm v3.10.7, and shrinkpack v0.17.0.
I believe this is the same issue which was raised in #17, and which should have been fixed in 75265ac. Am I doing something wrong, or is there a regression, or...?
My package.json:
My initial
npm-shrinkwrap.json
: https://gist.github.com/codyhatch/56f559be6ef795f155ac2fe2bdf2ec91My rewritten post-shrinkpack
npm-shrinkwrap.json
: https://gist.github.com/codyhatch/adbaa2d904e1ec5238f5ce861dddd3baThe text was updated successfully, but these errors were encountered: