Skip to content
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

Handle NPM version changes in lockfile #1093

Open
ybyzek opened this issue Feb 25, 2022 · 0 comments
Open

Handle NPM version changes in lockfile #1093

ybyzek opened this issue Feb 25, 2022 · 0 comments

Comments

@ybyzek
Copy link
Contributor

ybyzek commented Feb 25, 2022

#1092 (comment)

From @colinhicks

Since the project doesn't specify a semver for the npm version in the package.json this sort of change is expected and should be harmless. I think the only side effect is churn in this file. If one PR changes the lockfileVersion to 1, and a developer pulls the changes, then runs npm install with a newer version of npm, there would be new changes to the lockfile. If those changes were committed, then pulled to an environment with an older npm version, running npm install would flip the version back. And so forth.

For this project and its relatively light set of node dependencies this will probably never matter (you can just accept the changes in the relevant PR), but if you want to avoid the flip-flopping, you can set something like "engines": { "npm": ">=7.0.0"} in the package.json. This should require an npm that uses the new lockfile version and avoid the flip-flop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant