Repository navigation
Conversation
Allows customizing the names of git tags created by `changeset publish`
and `changeset git-tag` with the `{name}` and `{version}` variable
patterns. The same format is used when checking which packages are
already tagged, so tagging stays idempotent.
Closes changesets#772
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d301eee The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
👷 Deploy request for changesets pending review.Visit the deploys page to approve it
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2358 +/- ##
==========================================
+ Coverage 87.71% 87.75% +0.03%
==========================================
Files 81 81
Lines 2987 2996 +9
Branches 853 856 +3
==========================================
+ Hits 2620 2629 +9
Misses 331 331
Partials 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`replaceAll` with a string replacement interprets `$` patterns in the
package name, and replacing `{name}` before `{version}` substituted
`{version}` again when it appeared in the name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/config-file-options.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Andarist
reviewed
Nov 23, 2026
Andarist
left a comment
Member
There was a problem hiding this comment.
For us to consider this, it would also require investigation on how this affect both and the action and what changes should be done there to acommodate a change like this
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #772
Summary
Adds a
gitTagFormatconfig option that sets the names of the git tags created bychangeset publishandchangeset git-tag:{ "gitTagFormat": "{name}/v{version}" }{name}and{version}variable patterns, in the same style assnapshot.prereleaseTemplate.{name}@{version}in monorepos andv{version}in single-package repositories.Motivation
Some tools can't use the
{name}@{version}tag format:@or/, so the default tags can't be reused as image tags.@inref/version(see the latest comment on Choose a format for tag ? #772).vprefix (Allow customizing or omitting the 'v' git tag prefix for single package repositories #386).#1210 and #1412 proposed the same option before
buildGitTag()existed. Now that tag naming is centralized inbuildGitTag(), the change is small.Changes
@changesets/types: addedgitTagFormat?: stringtoConfigandWrittenConfig.@changesets/config:{version}.{name}in monorepos. Without it, packages released at the same version would get the same tag.schema.json.@changesets/cli:buildGitTag()uses the format when it's set.splitByTagStatus(), so the "already tagged" check uses the same names. Tagging stays idempotent for bothpublishandgit-tag.site/guide/config.mdanddocs/config-file-options.md.Notes for reviewers
git-tagcreates tags for their current versions. The docs mention this.{name}@{version}(for example the GitHub releases created bychangesets/action) isn't changed here. Users who set the option would need to handle that on their side.Tests
{version}; a format without{name}in a monorepo (error) and in a single-package repo (allowed).git-tagcommand: a custom format with a scoped name; skipping packages that already have a tag in the custom format; dropping thevprefix in a single-package repo.buildGitTag(): default formats; repeated variable patterns;$patterns in a package name aren't interpreted; a package name containing{version}isn't substituted again.pnpm types:check,pnpm lint,pnpm format, andpnpm test run(829 passed) all pass.