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

Ensure updated dependencies are correctly included when building dependency change instance #7358

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

bdragon
Copy link
Member

@bdragon bdragon commented May 22, 2023

Ensures that (a) a dependency whose version has changed but whose requirements have not changed is still included in the generated dependency change instance, and (b) a dependency whose requirements have changed but whose version has not changed is still included in the generated dependency change instance.

Should unblock dependabot/smoke-tests#72

@bdragon bdragon requested a review from a team as a code owner May 22, 2023 17:39
@bdragon bdragon requested a review from Nishnha May 22, 2023 18:05
Copy link
Member

@Nishnha Nishnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I had to walk through this with an example to really understand the change:

  • Previously, for an update like lodash ( from 4.17.15 to 4.17.21 ) with the requirement ^4.17.15, the guard clause would reject the updated dependency because the requirement has not changed.
  • Now, with this patch, the guard clause will *fail* since the requirements have not changed. So instead of rejecting the dependency update early, the next line of code can execute.
  • The next line of code, d.version == d.previous_version sees that the version did change and the dependency update is no longer rejected!

The (now passing) smoke test + the existing unit tests give me some confidence that this won't break anything, but I think we should monitor our dashboards closely when we roll this out

I think this also resolves #7356 ?

Ensures that (a) a dependency whose version has changed but whose requirements have not changed is still included in the generated dependency change instance, and (b) a dependency whose requirements have changed but whose version has not changed is still included in the generated dependency change instance.
@brrygrdn brrygrdn merged commit 24eae56 into main Jun 12, 2023
83 checks passed
@brrygrdn brrygrdn deleted the bdragon/npm-group-rules branch June 12, 2023 12:21
@abdulapopoola abdulapopoola added the F: grouped-updates 🎳 Relates to bumping more than one dependency in a single PR label Jun 12, 2023
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
…rules

Ensure updated dependencies are correctly included when building dependency change instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-before-merging F: grouped-updates 🎳 Relates to bumping more than one dependency in a single PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants