fix: support how renovatebot generate lockfiles #47
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Renovatebot is now defaulting to
lockfileVersion
set to3
. Our CI setup is usingnpm ci
everywhere, including for tests on node v14. Which doesn't work. As node v14 is using an older version ofnpm
that does not support the new lockfile format.You can see this in the PR it made for recreating the lockfile, which our preset asks renovate to do monthly.
By changing it to
npm i
the npm client that might not support the latest lockfile version will fallback to usingpackage.json
as its truth and ignore the lockfile. Which is fine. The lockfile is the most important for linting, building and most of all thesemantic-release
process as we never want new dependencies to be pulled in in those build steps. The lockfile is the truth.However when running testing suites on different node versions it's completely fine to ignore the lockfile in some cases, it just means it'll take a little longer to install.
I've tested the changes proposed in this PR on this repo, see the relevant PR. And the log output of what happens when and older npm encounters a lockfile version it doesn't know how to deal with: