frontsideair / yarnhook

Run `yarn install`, `npm install` or `pnpm install` on git hooks automatically
MIT License
217 stars 17 forks source link

Use `npm install` with `--no-save` to prevent lockfile changes #31

Closed straub closed 5 years ago

straub commented 5 years ago

Using a locked package is no different than using any package without a package lock: any commands that update node_modules and/or package.json’s dependencies will automatically sync the existing lockfile. This includes npm install, npm rm, npm update, etc. To prevent this update from happening, you can use the --no-save option to prevent saving altogether [...]

https://docs.npmjs.com/files/package-locks#using-locked-packages

straub commented 5 years ago

@frontsideair Any chance this could make it into a release? The lockfile changes cause my team a little grief, it'd be nice to get them stopped.

Anything I can do to make the review or merge easier on you, just say the word!

frontsideair commented 5 years ago

Thanks for the contribution! I've been very busy with life, sorry for seeing this too late. (I get notifications for comments but not for pull requests, weird.) I'll cut a release now.

frontsideair commented 5 years ago

Released @straub, thanks!