npm install --from-lockfile #340
-
Based on the discussion on npm/cli#564 and a few other issues, it would be good to have an option to install based on the lockfile that is not a clean install. Currently
I have an example implementation that seems to be working locally, although there's still testing/cleanup that would need to be done and I still need to take some time to verify. I'm posting here to see if there's any reason why I shouldn't eventually make a pull request for this, or if there are any obvious concerns about the feature itself that I'm missing. This specific implementation is loosely based off of @jdussouillez's comment and @DanielRuf's comment that both encouraged adding a new flags to It does not go all the way and add a Install times are going to vary depending on the system and package, but anecdotally I'm seeing a roughly 4x speedup between |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Thank you SO much for this. I'd like to comment one detail, it may not be that important. If it throws an error when used with packages arguments, it could be problematic to use it in an .npmc file. We'd love to consider having all devs experience this behavior by default when using This would mean adding this flag to the .npmrc would be transparent in a way for common uses of npm install, but would still add consistency to what code people are running later for the most common of the scenarios: running In any case, I think this would be great! |
Beta Was this translation helpful? Give feedback.
-
Hey @nmm-shumway thanks for opening the discussion. If you would like to propose a specific new feature to the npm CLI the best next step is to open an issue over at https://github.com/npm/rfcs so you can gather feedback directly from the CLI team. Adding new flags that don't change the existing behavior seems like the easiest way to move forward something like this. |
Beta Was this translation helpful? Give feedback.
-
Any news about this feature? I havnt found a rfc pr, @nmm-shumway did you open one? Looking forward to this 🙂 |
Beta Was this translation helpful? Give feedback.
-
Deep apologies for the delay, things got a little hectic in my life shortly after I made this feature. I have a feature request at npm/rfcs#415, and I've moved the implementation over to danShumway/cli@bc8ef21. I'll be adding additional unit tests and some documentation depending on what the RFC requires. |
Beta Was this translation helpful? Give feedback.
Hey @nmm-shumway thanks for opening the discussion.
If you would like to propose a specific new feature to the npm CLI the best next step is to open an issue over at https://github.com/npm/rfcs so you can gather feedback directly from the CLI team.
Adding new flags that don't change the existing behavior seems like the easiest way to move forward something like this.