Support custom increment version functions #1143
lordofthecactus
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In
@shopify/hydrogen
and many other repo's across Shopify, we use calver release for our APIs.We use
changesets
to handle our hydrogen monorepo, although unfortunately, calver is not supported which results in us having to do a lot of risky manual work.We also don't want to major update a package each time a
peerDependency
has a major update. We would like to have a patch release instead.Would it beneficial to have an escape hatch that allows the devs to have a custom versioning function per package?
I currently have a
patch-package
working where we can set in the.changeset/config.json
attributes:The
incrementVersions
attribute, has an object with packages on which to run a file with a custom increase versioning function. In this case the packages are@shopify/hydrogen
and @shopify/hydrogen-react. And the file to run is
./hydrogen-increase-version.js`The file to increase version, is actually a
calver
customized for us. Whenever there is amajor
changeset file, I update the month and year:This would allow devs to customize the new versions independently if one does not want to follow semver.
I have the code somehow ready if you'd be interested in a PR for this.
Beta Was this translation helpful? Give feedback.
All reactions