build(release): always rewrite dependent ranges when versioning#558
Merged
Conversation
Nx 23 enables preserveMatchingDependencyRanges by default, which fails the release when a breaking bump falls outside a dependent's current range (as in the last two @lde/search releases). Disable it to restore the pre-Nx-23 behavior of rewriting dependent ranges automatically, so breaking bumps no longer block the 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.
Prevents the failure mode fixed by #551 and #557 from recurring.
Nx 23 enables
preserveMatchingDependencyRangesby default: when a breaking bump pushes a workspace dependency outside its dependents’ declared ranges (e.g.@lde/search0.2.0 → 0.3.0 against"@lde/search": "^0.2.0"),nx releaseaborts versioning and asks for a manual range update – which has now blocked two releases in two days.Setting it to
falserestores the pre-Nx-23 behaviour this repo relied on:nx releaserewrites the dependent ranges itself during versioning (as visible in every release commit before the Nx 23 upgrade), so breaking bumps release without manual intervention.Verified with
npx nx release version --dry-runagainst the pre-#557 manifests (^0.2.0ranges): versioning completes without the range error and rewrites the ranges to^0.3.0.