fix(ci): publish packages in dependency order, fail fast on failure#3549
fix(ci): publish packages in dependency order, fail fast on failure#3549felipefreitag wants to merge 2 commits into
Conversation
Replace `changeset publish` (which publishes in arbitrary order and keeps going when one package fails) with an explicit pipeline in release.mts that: - publishes packages in topological (dependency) order - skips a package's dependents when it fails, so a broken dependency can never produce a broken dependent published against a version that isn't on npm - derives each npm dist-tag from the version itself (x.y.z -> latest, a prerelease -> its own tag), so a prerelease can never overwrite latest - adds a --dry-run flag that prints the publish plan without publishing - exits non-zero when any package fails Adds unit tests (scripts/release.spec.mts) for the pure pipeline helpers and wires them into the tests workflow, since scripts/ isn't a workspace and turbo run test doesn't cover it.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
pnpm publish has no implicit provenance; the NPM_CONFIG_PROVENANCE env var carried over from the changeset publish path is replaced with the documented --provenance flag so each package is published with provenance attestation.
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This PR replaces the entire changeset publish pipeline with a custom publish orchestrator in scripts/release.mts, which is a critical path for production releases — any bug could result in incorrect package ordering, broken dependency chains on npm, or improper dist-tags, so it requires...
Re-trigger cubic
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR rewrites the CI release pipeline to publish packages in dependency order instead of using changeset publish, which is a critical infrastructure change where any undetected bug could cause broken releases, incorrect dist-tags, or partial publishes, so it requires a human to verify the logic.
Re-trigger cubic
Replace
changeset publish(which publishes in arbitrary order and keeps going when one package fails) with an explicit pipeline in release.mts that:precontrolsAdds unit tests (scripts/release.spec.mts) for the pure pipeline helpers and wires them into the tests workflow, since scripts/ isn't a workspace and turbo run test doesn't cover it.
Closes #3045
Run examples:

Summary by cubic
Publishes packages in dependency order and fails fast to avoid releasing broken dependents. Adds version-based npm dist-tags,
--dry-run, provenance on publish, and CI unit tests.New Features
changeset publishwith an explicit pipeline inscripts/release.mtsthat publishes in topological order, skips dependents when a package fails, derives the dist-tag from the version (x.y.z->latest, prereleases -> their own tag), supports--dry-run, and exits non-zero on any failure.pnpm publish --provenance(replacesNPM_CONFIG_PROVENANCE).releasescript inpackage.jsonto build packages only.Bug Fixes
Written for commit e8a3a5c. Summary will update on new commits. Review in cubic