Repository navigation
ci: keep npm's latest on the newest release when publishing from release/0.34 (backport #3479) - #3510
Merged
Merged
Conversation
…lease branch (#3479) * ci: keep npm's latest on the newest release when publishing from a release branch From the #3223 review. Changesets tags every publish latest, so a maintenance release from release/<line> after a newer release would move latest back to the older line. It now keeps latest only when every package it publishes is newer than that package's latest, and otherwise publishes under release-<line>. The Release workflow's concurrency group is also per branch now: a single group let a push to main replace a maintenance release still waiting to run. * ci: check every workspace package and queue release runs in one group From the Devin review of #3479. The tag check read only packages/*, but Changesets also publishes voice-providers/*; it now lists the pnpm workspace. And per-branch groups let main publish between a maintenance run's latest check and its publish, so the Release workflow is back to one group, with queue: max so a push to main waits instead of replacing a pending maintenance run. (cherry picked from commit 5876f38)
|
Comment on lines
+29
to
+37
| for (const { name, version, private: isPrivate } of workspacePackages()) { | ||
| if (isPrivate) continue; | ||
| const published = npmView(`${name}@${version}`, "version"); | ||
| // Already on npm, so Changesets skips it. | ||
| if (published === version) continue; | ||
| const latest = npmView(name, "dist-tags.latest"); | ||
| if (latest !== undefined && !isNewer(version, latest)) { | ||
| console.log(`${name}@${version} is not newer than latest ${latest}.`); | ||
| return fallback; |
Contributor
There was a problem hiding this comment.
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.
Backport of #3479 to
release/0.34. A release runs the workflow on the branch it publishes from, so until this lands, a 0.34.x patch published after 0.35.0 would take npm'slatestback to 0.34.Summary
Cherry-pick of 5876f38 (
git cherry-pick -x), applied cleanly..github/changeset-publish.tsand.github/workflows/release.ymlare now identical tomain.Evidence
Dry run of
.github/changeset-publish.tson this branch, withchangeset publishreplaced by a log line:agentsversionrelease/0.34changeset publishrelease/0.34changeset publish --tag release-0.34mainchangeset publishoxfmt, oxlint and strict
tscof.github/changeset-publish.tspass.Merge Danger
Door: two-way
Blast Radius: releases
Only affects publishing from
release/0.34. No changeset needed.