Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wip support for a
--from-lockfile
flag on npm i
This change needs additional testing to make sure that it is actually respecting lockfile. It looks for a `--from-lockfile` flag, and if it is detected, it follows the same codepath as `npm ci`, except without cleaning out the `node_modules` directory first. Performance is going to vary wildly depending on what dependencies look like, but locally in my testing so far I see a roughly 4x speedup over `npm ci`. Of course, all of this is contingent on more testing to make sure that this isn't giving incorrect behavior in some way. `npm ci` also relies on explicitly passing in an option not to modify the lockfile. But I'm unsure of whether that's necessary here. And I'm sure that some unit tests are required too.
- Loading branch information