fix: enable nx release to bootstrap from disk when no tags exist []#37
Closed
Lisa White (whitelisab) wants to merge 1 commit into
Closed
fix: enable nx release to bootstrap from disk when no tags exist []#37Lisa White (whitelisab) wants to merge 1 commit into
Lisa White (whitelisab) wants to merge 1 commit into
Conversation
nx release requires prior tags matching `{projectName}@{version}` to compute
version bumps. Since no such tags exist yet in this repo, the first release
attempt fails for every package. Adding `fallbackCurrentVersionResolver: "disk"`
tells nx to read the baseline version from each package.json when no tag is
present, making initial releases self-bootstrapping.
Also fixes the client package's placeholder version — it was left over from
a semantic-release scaffold and doesn't parse as semver.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
Closing in favor of the approach documented here: https://github.com/contentful/experiences/blob/main/AGENTS.md#bootstrapping-a-new-package-for-release |
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.
Summary
nx releasein CI is failing after PR feat: add packages/client with fetchExperience and delivery client [AIS-147] #30 merged because no release tags exist in this repo yet — nx's default is to compute the next version from a matching prior tag ({projectName}@{version}), and with none present it bailsfallbackCurrentVersionResolver: \"disk\"tonx.json, which tells nx to read the baseline version from each package'spackage.jsonwhen no matching tag is found; subsequent releases pick up from tags normallyclientpackage's placeholder version (0.0.0-determined-by-semantic-release) — it wouldn't parse as semver under the disk resolverThe CI error
Why this fix instead of
--first-release--first-releaseis a one-shot escape hatch that requires either runningnx releasemanually with vault access, or a temporary workflow tweak followed by a revert. Adding the disk-fallback resolver is a one-line change that:Test plan
npm run format:checkpasses (already verified locally)mainand produce initial tags for all 5 packagesGenerated with Claude Code