Add support for workspace version alias#585
Conversation
|
Hooray! All contributors have signed the CLA. |
🦋 Changeset detectedLatest commit: cef173a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Could you point to any documentation about those two? |
|
This feature was recently merged into pnpm and at yarn they are working to implement it. pnpm/pnpm#3368 There is no documentation yet about this feature, but I should probably write about it. |
|
I was wrong, it's already documented in the workspaces section of pnpm |
Andarist
left a comment
There was a problem hiding this comment.
This looks great - I still need to review added tests carefully but I don't expect that there is anything wrong with them. It might take me a couple of days to merge this in so please be patient. In the meantime, you still need to sign the CLA so I could merge this.
2fa2b15 to
aa39557
Compare
|
Sorry for being annoying, but wanted to ask if there's still plans to merge this? |
aa39557 to
f941628
Compare
|
Interested as well, I've been hit too. My current workaround is to use yarn pack before release and make use of publishConfig.directory... Not very nice 😄 |
f941628 to
f96e058
Compare
|
@javier-garcia-meteologica thank you for your contribution. This was well implemented and you have followed up on my suggestions and questions promptly. I'm very sorry I couldn't get to this sooner - I've only found some new energy to work on Changesets recently and I hope to get to any future PRs way quicker. |
|
@Andarist, just to say: huge thanks for your work. It's really appreciated. |
|
Thank you - it means a lot. :) |
| ]); | ||
| }); | ||
|
|
||
| it("should bump dependant package when bumping a `workspace:^` dependency", async () => { |
There was a problem hiding this comment.
I've found out that perhaps this test is incorrect. I would appreciate some second eyes on my reasoning though.
workspace:^ is basically equivalent to the ^${currentVersionOfThatDependency}. So in this case this would be an equivalent of ^1.0.0. Therefore if we just bump the pkg-b with a patch bump then... it shouldn't update the dependent pkg (pkg-a) as the new version fo the pkg-b (1.0.1) doesn't leave the current dependency range.
There are options for always bumping dependent packages etc but that's not the default.
There was a problem hiding this comment.
I agree that we should not bump in this test. I tried to switch from ^1.0.0 to workspace:^ to reference packages inside my monorepo and found the behavior is different.
Adds support for
workspace:^andworkspace:~.