Lerna version prerelease on package without forcing prerelease on other packages #3385
Unanswered
jake-chapman-mark43
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So we have our lerna monorepo all setup for our design system. Currently everything is versioned together. We want to switch to independent versioning along with releasing new components as "beta components".
Our current setup is we have 1 package that is our entire design system as a single install. We also deploy individual packages for each component. When we run our lerna command (major, minor, patch). Every single package is bumped, does not matter if package-a has a dependency on package-b, both will get bumped to appropriate (major, minor, patch) version.
Consider the following setup
@name/alll-packages v10.0.0 (dependency on package-a since it's none beta component)
@name/package-a v1.0.0 (dependency on package-b)
@name/package-b v0.0.0-beta.0 (dependency on package-c)
@name/package-c v0.0.0-beta.1
With the dependencies in place, we create a small change to
package-c
and run prerelease. I'd expectpackage-b
to be updated to0.0.0-beta.1
which currently works as expected. I'd then expectpackage-a
to be updated since it depends onpackage-b -> package-c
. Except it's be versioned to1.0.0-beta.0
when I'd expect for it to be patched to1.0.1
.So what I'd expect
@name/alll-packages - v10.0.1
@name/package-a v1.0.1
@name/package-b v0.0.0-beta.1
@name/package-c v0.0.0-beta.2
What I get
@name/alll-packages - v10.0.0-beta.0
@name/package-a v1.0.0-beta.0
@name/package-b v0.0.0-beta.1
@name/package-c v0.0.0-beta.2
I'm not sure if I'm just not understanding the lerna prerelease commands. Our primary goal is to make updates to beta components while they're in progress with the social contract with consuming engineers there may be breaking changes to the api. You have to individually install beta components, but if another non beta component incorporates the use of a beta component, it would just get patched.
Also in the above example that shows
@name/package-d
where nothing has a dependency on it. When I make a small change to that and run prerelease, all packages are again updated to a new prerelease version. When the only thing changed waspackage-d
.Any guidance on how to achieve something like this? Or should we just use
lerna version
and manually go through each of our packages (50+ components) and manually select the version type of each? That feels cumbersome. Or are we just thinking of this in the complete wrong way?Beta Was this translation helpful? Give feedback.
All reactions