-
-
Notifications
You must be signed in to change notification settings - Fork 32
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(version): allowPeerDependenciesUpdate should work w/workspace:^
, fix #590
#591
Conversation
Codecov Report
@@ Coverage Diff @@
## main #591 +/- ##
==========================================
+ Coverage 98.13% 98.13% +0.01%
==========================================
Files 152 152
Lines 11437 11468 +31
Branches 2034 2039 +5
==========================================
+ Hits 11222 11253 +31
Misses 214 214
Partials 1 1
|
workspace:^
should work, fixes #590workspace:^
, fix #590
This looks great! What might be confusing is the inconsistency to |
packages/publish/src/__tests__/publish-workspace-protocol-specifiers.spec.ts
Outdated
Show resolved
Hide resolved
The |
I see. I just checked again, made a mistake reading the PR before. Looks good. |
@ma-multipla fixed under the new v2.2.0 release. Thanks for the feedback and contributions |
Description
The
peerDependencies
is a special case and will only be bumped when the flag--allow-peer-dependencies-update
is enabled. A package set asworkspace:^
(without any semver number) should be able to be bumped and it wasn't before this PR.Motivation and Context
The
--allow-peer-dependencies-update
implementation was only tested withworkspace:
and semver, but it wasn't tested with justworkspace:^
(or~
) and the end result was actually producing an invalid version^
(which is obviously wrong).This PR fixes 2 problems with
peerDependencies
identified in #587 and #590:the example below is assuming that the version is at
1.0.0
and we are processing aminor
bumpworkspace:^
and--allow-peer-dependencies-update
is enabled, the version inpackage.json
should remain asworkspace:^
but the version that will be published should be bumped to"1.1.0"
workspace:^
without a semver numberworkspace:^
and we do not provide--allow-peer-dependencies-update
, it was previously trying to publish as^
(which is an invalid version). In this case we now fallback to the previously resolved version when publishing (in this case"1.0.0"
)How Has This Been Tested?
Types of changes
Checklist: