dependabot / dependabot-core

🤖 Dependabot's core logic for creating update PRs.
https://docs.github.com/en/code-security/dependabot
MIT License
4.73k stars 1.02k forks source link

Fix: Ensure Compatibility with npm >= 8 to Prevent Lockfile Downgrades #11001

Closed kbukum1 closed 3 days ago

kbukum1 commented 3 days ago

What are you trying to accomplish?

Fixing an issue where running npm 9 or npm 10 caused a downgrade of the package-lock.json lockfile version when subdependencies were updated. The existing npm version check was specific to npm 8, leading to incorrect behavior for npm >= 9.

This update ensures compatibility for npm versions 8, 9, and 10, treating them equally in the conditional logic for subdependency updates.

Bug Issue: dependabot-core/#10982

Anything you want to highlight for special attention from reviewers?

How will you know you've accomplished your goal?

Checklist