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
Add package lock.json to VCS #7533 #8348
Add package lock.json to VCS #7533 #8348
Conversation
Ready for Review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to update this document; mention that after npm install
, there will be changes to the package-lock.json
file that should be committed.
docs/dependencies.md
Outdated
@@ -25,4 +25,4 @@ If a library cannot be found in the NPM registry, simply host a local copy in th | |||
To update your local library configuration: | |||
|
|||
- For production dependencies, only if you are adding/updating the library, find the files from the library that are necessary to be loaded to webpages, and add/update the entry(ies) in `FrontEndLibrary.java`. | |||
- For development dependencies, run `npm install` from the project root folder. | |||
- For development dependencies, run `npm install` from the project root folder and this will make changes made to the `package-lock.json` file which should be commited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rephrase a bit: "...from the project root folder. Additionally, if you are adding/updating the library, commit the changes made automatically to package-lock.json
.".
Rationale: only if you're adding/updating the library then you will see the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated by making the following change:
- Additionally, if you are adding/updating
theany library, commit the changes made automatically to package-lock.json.
… 7533-add-package-lock.json
@tshradheya For some reason my |
Figured out why such a problem was there. Figuring out how to solve it So the The reason why I have "bundled" is probably because of This problem has been faced by many people (some even went to the extent of migrating to The only way we can get package-lock.json to VCS is to |
In that case I don't think it's suitable for |
Okay so researching about it a bit more, I realised that Node.js actually resolved this bug. Source However to make sure, it works perfectly fine for Teammates, I am going to try on mac and not mac to see if package-lock.jsom keeps changing due to optional dependencies. Will probably need |
Let's close this for now. Can reopen when the Node.js community at large agrees that this |
Fixes #7533
Outline of Solution
package-lock.json
to VCS after runningnpm install
8.x