dependabot / dependabot-core

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

Offer to update `package.json` in addition to the lock file #10594

Open Drarig29 opened 1 month ago

Drarig29 commented 1 month ago

Is there an existing issue for this?

Feature description

While it makes sense for most projects to only update the lock file, it's not enough for libraries.

Example:

Now, if the dependabot PR had changed the package.json file to "foo": "^1.0.1" (in addition to the lock file):

This results in less work for library consumers.

Currently, I can't rely on the automated dependabot PRs because of this, so I always close them and handle the dependency upgrade manually.

So in the end, I mostly use those PRs as a call to action. As a side note, it would be cool for the GitHub & Slack integration to support notifications on security vulnerabilities (https://github.com/integrations/slack/issues/1797).

Drarig29 commented 1 month ago

Note that this was mentioned in https://github.com/dependabot/dependabot-core/issues/7639#issuecomment-1680152672:

bump the dependency specification in the package.json to a version range that does not allow any vulnerable version