Skip to content

fix: relax workspace dependency pins to caret (versionPrefix) to fix downstream dual-package hazard#528

Merged
ddeboer merged 3 commits into
mainfrom
chore/version-prefix-caret
Jun 26, 2026
Merged

fix: relax workspace dependency pins to caret (versionPrefix) to fix downstream dual-package hazard#528
ddeboer merged 3 commits into
mainfrom
chore/version-prefix-caret

Conversation

@ddeboer

@ddeboer ddeboer commented Jun 26, 2026

Copy link
Copy Markdown
Member

What

  • Set release.version.versionPrefix: "^" so nx writes caret ranges (e.g. ^0.2.2) when updateDependents rewrites a dependent package, instead of exact pins.
  • Relax the existing exact @lde/* pins in distribution-health and pipeline to caret.

Why

Exact pins on workspace dependencies force any downstream consumer that wants a newer version of a workspace package into two copies of it. That's a dual-package hazard: @lde/distribution-health's probeResultToVerdict() does an instanceof ProbeResultType that silently fails across the two @lde/distribution-probe copies, so the validity rail breaks.

This actually bit the Dataset Register: bumping @lde/distribution-probe to 0.2.2 (for the new onProgress, #527) while distribution-health/pipeline still pinned 0.2.1 exact produced a split tree and broke its distribution-validity behaviour.

The only documented reason for exact pins was that ^0.0.0 aborts nx release version (ef41eee, #496) — a 0.0.0 bootstrap problem. Since new packages now start from 0.1.0 (#510), that never occurs. Verified on nx 23: a ^0.2.2 workspace ref runs nx release version cleanly (no abort).

Effect

  • Downstream consumers can dedupe @lde/* packages to a single version — no more dual-package hazard.
  • With caret ranges, a patch bump of a workspace dep no longer forces a cascade re-release of every dependent (the patch is already in range), reducing release churn.
  • versionPrefix: "^" converts the remaining exact pins across other packages to caret automatically on their next release.

Note

The fix(distribution-health) / fix(pipeline) commits trigger a republish of those two with the caret pins, which is what unblocks the Dataset Register.

ddeboer added 3 commits June 26, 2026 16:10
Sets release.version.versionPrefix to ^ so nx writes caret ranges (e.g. ^0.2.2) when updateDependents rewrites dependent packages, instead of exact pins. Exact pins force downstream consumers into duplicate copies of a workspace package (dual-package hazard: cross-version instanceof checks fail). The historical reason for exact pins, that ^0.0.0 aborts nx release version, no longer applies now that new packages start from 0.1.0 (verified: a ^0.2.2 ref does not abort nx release on nx 23).
Exact pins force a downstream consumer that wants a newer @lde/distribution-probe into two copies, breaking probeResultToVerdict's instanceof check across the version boundary. Caret ranges let the consumer dedupe to a single version.
Exact pins on workspace dependencies force downstream consumers into duplicate copies (dual-package hazard). Caret ranges allow deduplication to a single version.
@ddeboer ddeboer merged commit 1464a5e into main Jun 26, 2026
2 checks passed
@ddeboer ddeboer deleted the chore/version-prefix-caret branch June 26, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant