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

fix: support how renovatebot generate lockfiles #47

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Nov 15, 2022

Renovatebot is now defaulting to lockfileVersion set to 3. Our CI setup is using npm ci everywhere, including for tests on node v14. Which doesn't work. As node v14 is using an older version of npm 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 using package.json as its truth and ignore the lockfile. Which is fine. The lockfile is the most important for linting, building and most of all the semantic-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:

Run actions/setup-node@8c91899e586c5b171469028077307d293428b516
Environment details
  node: v14.20.1
  
  npm: 6.14.17
  
  yarn: 1.22.19

------

Run npm i
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!

@stipsan stipsan merged commit 160e64b into main Nov 15, 2022
@stipsan stipsan deleted the node-16-lockfiles branch November 15, 2022 14:43
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.1.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant