Is it possible to bump major version based on latest published version? #974
Unanswered
duytan-hoang-eurostar
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hm, this - sort of - should already work like this, unless you were removing your changeset files along the snapshot release cycle and if you were committing the snapshot versions to git. They were kinda designed to not be committed. If the changeset files would be kept in the git then doing a release now would just find the current version (2.3.0), grab the highest version bump available in the existing changesets (major), and bump the current version to the new one based on those (bump to 3.0.0) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm supporting two simultaneous workflows
dist-tag
@latest
dist-tag
@beta
Both are separate workspaces within the same repo (I've opted not to use a feature branch approach for a few reasons).
For the beta version, I'm using snapshot releases
{tag}.{commit}
. I'm not too bothered about the actual version number format as long as it's obviously unique. It's mainly thedist-tag
- as long as the consumer app can easily select which latest version they want with@latest
and@beta
- This part is all fine.The issue is, when I'm ready to release the beta version. The aim is to bump the beta package versions to the next major version that is current published and to set the
dist-tag
to@latest
.For example:
example-package@2.3.0
@latest
example-package@0.0.0-beta-abc123
@beta
package.json
, when runningchangeset version
, the beta version will version the package atexample-package@0.0.0
as expectedIs there any kind of hook I could use on
changeset version
whereby I could perhaps usenpm dist-tag ls
in order to get the latest published version@latest
and bump to the next major? So that it becomesexample-package@3.0.0
insteadIdeally I would like to use changesets to do this in some capacity as opposed to having to write a script to go through the file system and modify the versions
Beta Was this translation helpful? Give feedback.
All reactions