Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upnpmrc: Force `package-lock=true` option #3102
Open
+1
−0
Conversation
It's relatively common for folks who primarily develop npm packages (rather than top-level apps) to disable the creation of `package-lock.json` files by setting `package-lock=false` in their personal `.npmrc` as they're not useful for package development. This commit just forces `package-lock=true` so that the build works correctly for these users (including myself). --- Sidenote: Why is package-lock.json not useful to package authors? Because lock files don't get published to npm, so users will always get the latest versions that semver allows, so it's good for package authors to have the same experience. Otherwise, package-lock.json can obscure that a package is actually broken.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
feross commentedAug 6, 2019
•
edited
It's relatively common for folks who primarily develop npm packages (rather than top-level apps) to disable the creation of
package-lock.jsonfiles by settingpackage-lock=falsein their personal.npmrcas they're not useful for package development.This commit just forces
package-lock=trueso that the build works correctly for these users (including myself).Sidenote: Why is package-lock.json not useful to package authors? Because lock files don't get published to npm, so users will always get the latest versions that semver allows, so it's good for package authors to have the same experience. Otherwise, package-lock.json can obscure that a package is actually broken.
See also: brave/brave-browser#5560
Submitter Checklist:
npm run lint)git rebase master(if needed).git rebase -ito squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.