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

feat(config): Add --prune config option #3907

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

KochiyaOcean
Copy link

Closes #3906

As the ticket above says, the npm i command with --package-lock false option has changed its behavior since npm@7, which no longer prevents automatic pruning and currently there is no option to disable the automatic pruning process.

This pull requests add a new config option prune, when it's set to false, the automatic pruning will be disabled. With this option user will be able to install packages without getting the node_modules folder pruned.

Also the pull requests updated the description of package-lock option to match the current behavior of the config

@KochiyaOcean KochiyaOcean requested a review from a team as a code owner October 17, 2021 15:47
@ljharb ljharb added Enhancement new feature or improvement Needs Triage needs review for next steps labels Oct 17, 2021
@darcyclarke darcyclarke added semver:minor new backwards-compatible feature Release 8.x work is associated with a specific npm 8 release labels Oct 21, 2021
@KochiyaOcean
Copy link
Author

Rebased branch to resolve conflicts

@wraithgar wraithgar changed the base branch from latest to release-next January 26, 2022 20:44
@neutraali
Copy link

neutraali commented Mar 8, 2022

This would be very nice to have. Otherwise people running multiple npm install are stuck using npm@6 (as that version doesn't have aggressive pruning).

@wraithgar wraithgar changed the base branch from release-next to latest March 9, 2022 18:24
@ruyadorno ruyadorno added Needs Discussion is pending a discussion Needs Review labels Mar 9, 2022
@neutraali
Copy link

Any progress on this? Would be really nice to get out from under npm@6...

@rommni
Copy link

rommni commented Aug 27, 2024

I known this is a old issue but any news on it because I don't think there is an other solution for this ?

Copy link

@nnfhhvbb nnfhhvbb left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement Needs Discussion is pending a discussion Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release semver:minor new backwards-compatible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] npm install command automatically pruning packages even when package-lock config is disabled
8 participants