Skip to content

feat(yarn)!: add extended version types for workspace references #853

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

Merged
merged 2 commits into from
May 20, 2025

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented May 20, 2025

Adds support for new and updated version types for workspace references, to allow for more flexible dependencies between packages in a monorepo:

  • any-minor => ^1
  • future-minor => ^1.2.3
  • any-patch => ~1.2
  • future-patch => ~1.2.3
  • exact => 1.2.3
  • any-future => >=1.2.3
  • any => *

The current types 'major' (=> future-minor), 'minor' (=> future-patch, 'minimal' (=> any-future) are renamed to more accurately reflect their effect.

Adds support for 'current-major', 'current-minor', and 'any' version types when referencing workspaces. This allows for more flexible version constraints between packages in a monorepo.
Comment on lines 10 to 16
* - 'major' corresponds to '^1.2.3'
* - 'current-major' corresponds to '^1'
* - 'minor' to '~1.2.3'
* - 'current-minor' corresponds to '~1.2'
* - 'exact' corresponds to '1.2.3'
* - 'minimal' corresponds to '>=1.2.3'
* - 'any' corresponds to '*'
Copy link
Contributor

@rix0rrr rix0rrr May 20, 2025

Choose a reason for hiding this comment

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

How about introducing the terms "any" and "future" ?

  • any-minor => ^1
  • future-minor => ^1.2.3
  • any-patch => ~1.2
  • future-patch => ~1.2.3
  • exact => 1.2.3
  • any-future => >=1.2.3
  • any => *

We would ideally pick a different term for "future" that obviously includes "current", but this is the best I can come up with 🙂

@mrgrain mrgrain changed the title feat(yarn): add extended version types for workspace references feat(yarn)!: add extended version types for workspace references May 20, 2025
@cdklabs-automation cdklabs-automation added this pull request to the merge queue May 20, 2025
Merged via the queue into main with commit 9afbcc8 May 20, 2025
9 checks passed
@cdklabs-automation cdklabs-automation deleted the mrgrain/feat/yarn/extended-version-types branch May 20, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants