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(manager/npm): use root pnpm constraints for workspaces #14660

Merged
merged 14 commits into from
Apr 8, 2022

Conversation

PhilipAbed
Copy link
Collaborator

@PhilipAbed PhilipAbed commented Mar 14, 2022

Changes

in the post-update of pnpm , we will take the root package.json and check if it has constraint.

Constraint assignment priority:

  1. we will check the config constraint as priority
  2. if the current workspace has constraint, it will be considered
  3. if the root has constraint it will be considered

Context

Closes #14233
related: #14662

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@PhilipAbed PhilipAbed changed the title fix(manage/npm) - pnpm child workspace isn't considering pnpm constraint from root package json fix(manager/npm): pnpm child workspace isn't considering pnpm constraint from root package json Mar 14, 2022
@PhilipAbed PhilipAbed requested review from rarkins and viceice and removed request for rarkins March 14, 2022 13:54
@viceice
Copy link
Member

viceice commented Mar 14, 2022

@PhilipAbed
Copy link
Collaborator Author

@viceice am i supposed to do anything with that comment?

@viceice
Copy link
Member

viceice commented Mar 16, 2022

@viceice am i supposed to do anything with that comment?

Sure. please make code behaving as suggested in issue.

@PhilipAbed
Copy link
Collaborator Author

@viceice i already finished that part, now config.Constraints take priority.
and it is done in the "update" section instead of the extraction.

i meant if anything else is missing let me know it LGTM

@PhilipAbed PhilipAbed requested a review from viceice March 16, 2022 11:41
@PhilipAbed PhilipAbed requested a review from rarkins March 17, 2022 09:41
@PhilipAbed PhilipAbed requested a review from viceice April 5, 2022 10:43
lib/modules/manager/npm/post-update/pnpm.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/npm/post-update/pnpm.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/npm/post-update/pnpm.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/npm/post-update/pnpm.spec.ts Outdated Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Apr 6, 2022

Why do you resolved conversions without change or answer? 🤔

@PhilipAbed PhilipAbed requested a review from viceice April 6, 2022 14:19
@PhilipAbed
Copy link
Collaborator Author

PhilipAbed commented Apr 7, 2022

:D i usually fix the code before i resolve the conversation , did i miss something?

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

Those other comments are gone now. You probably resolved them before you pushed the actual code.

lib/modules/manager/npm/post-update/pnpm.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/npm/post-update/pnpm.ts Show resolved Hide resolved
@rarkins rarkins changed the title fix(manager/npm): pnpm child workspace isn't considering pnpm constraint from root package json fix(manager/npm): use root pnpm constraints for workspaces Apr 7, 2022
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Logic is looking good, LGTM after latest reviews changes are implemented

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@PhilipAbed PhilipAbed requested a review from viceice April 7, 2022 10:00
@rarkins rarkins enabled auto-merge (squash) April 8, 2022 06:31
@rarkins rarkins merged commit b79c82e into renovatebot:main Apr 8, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@viceice viceice mentioned this pull request Apr 23, 2022
6 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Root-level workspace pnpm constraint not used when updating workspace package
4 participants