Skip to content

Temporarily use beta versions for "latest" dist-tag#1283

Merged
SteveSandersonMS merged 1 commit into
mainfrom
stevesa/publish-beta-as-latest
May 13, 2026
Merged

Temporarily use beta versions for "latest" dist-tag#1283
SteveSandersonMS merged 1 commit into
mainfrom
stevesa/publish-beta-as-latest

Conversation

@SteveSandersonMS
Copy link
Copy Markdown
Contributor

We've been using the latest dist-tag for prior versions like 0.3.0. But since we started shipping beta versions, all the releases have been marked as prerelease, so 0.3.0 was still the current latest.

This risks people staying on 0.3.0 and not updating to the betas.

So, until 1.0.0 ships, this PR changes the version number calculation logic so that even latest releases get beta version numbers. We should use latest for any publish that we really want people to use, which is likely all of them.

Once 1.0.0 ships, we'll go back to the logic that puts suffixes like -preview.1 onto prereleases and no suffixes for latest/stable releases.

@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner May 13, 2026 09:31
Copilot AI review requested due to automatic review settings May 13, 2026 09:31
@SteveSandersonMS SteveSandersonMS merged commit 4e3dc73 into main May 13, 2026
17 checks passed
@SteveSandersonMS SteveSandersonMS deleted the stevesa/publish-beta-as-latest branch May 13, 2026 09:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the Node-based version calculation and publishing workflow so that publishing under the latest dist-tag produces prerelease-style versions (temporarily) to ensure users on latest receive the beta/preview stream prior to 1.0.0.

Changes:

  • Update Node version calculation so latest increments as a prerelease (and can continue existing prerelease identifiers).
  • Update Node tests to assert the new latest prerelease behavior.
  • Update the publish workflow to allow prerelease versions under latest and to create GitHub pre-releases for both latest and prerelease.
Show a summary per file
File Description
nodejs/test/get-version.test.ts Updates expectations for latest to produce prerelease versions during the temporary beta-as-latest period.
nodejs/scripts/calculate-version.js Changes latest version increment behavior to use prerelease increments and treat latest similarly to prerelease for identifier handling.
.github/workflows/publish.yml Loosens version validation for latest and makes latest publishes create GitHub pre-releases during the temporary period.

Copilot's findings

Comments suppressed due to low confidence (1)

.github/workflows/publish.yml:231

  • needs.version.outputs.current-prerelease is not a valid GitHub Actions expression property access because the output name contains a hyphen. This will be parsed as subtraction and will likely make NOTES_FLAG empty/incorrect (or fail) when creating the release.

Use bracket notation (e.g., needs.version.outputs['current-prerelease']) or rename the job output key to something without - (e.g., current_prerelease) and update references accordingly.

          NOTES_FLAG=""
          if git rev-parse "v${{ needs.version.outputs.current-prerelease }}" >/dev/null 2>&1; then
            NOTES_FLAG="--notes-start-tag v${{ needs.version.outputs.current-prerelease }}"
          fi
  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment on lines +46 to 55
// TEMPORARY: "latest" uses prerelease increments so we publish beta versions
// under the "latest" dist-tag. To ship stable 1.0.0, revert the commit that
// introduced this temporary change.
const increment = "prerelease";
const isIncrementingExistingPrerelease = semver.prerelease(higherVersion) !== null;
const prereleaseIdentifier =
command === "prerelease"
command === "prerelease" || command === "latest"
? isIncrementingExistingPrerelease
? undefined
: "preview"
@github-actions github-actions Bot mentioned this pull request May 13, 2026
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.

2 participants