-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Commit package-lock.json #1659
Comments
If you are concerned about the huge diff you always have with the lockfiles, that is not a problem: They do not matter. Just accept all changes to it. |
I do not think a library should add the package-lock.json. See this discussion. |
The lockfile should never be published to NPM. It should however be part of the version controlled source code. It is actually even impossible. https://docs.npmjs.com/files/package-lock.json
Anyhow. There are a bunch of lockfiles in the packages themselves, but none for the Keep in mind: Anyone who installs the published package will always install the latest versions of any dependency. IMO the lockfile should be commited at the toplevel, all other lockfiles should be removed. The lockfile can also be occasionally be removed and recreated in order to always use the latest patches. Deleting a lockfile and having it recreated with |
Didn't know that. My comment is invalid then. |
Maybe another way to see it is: A lockfile makes sure that every developer of a project uses the exact same versions of the dependencies for her local dev setup. Nothing more. |
100% agreed. This is too important of a project to be subject to dependency changes. Lockfiles should always be committed. |
You are running a postinstall script to bootstrap the lerna multirepo. That is nice. But you do not commit the package-lock.json. That is good practice and should be done. Will save you lots of headaches with "works on my machine" issues. From the lerna bootstrap logs:
lerna success Bootstrapped 20 packages npm notice created a lockfile as package-lock.json. You should commit this file. added 948 packages in 72.476s
The text was updated successfully, but these errors were encountered: