Skip to content

fix: exclude prereleases when resolving latest/current/node aliases - #1668

Open
v-gowridurgad wants to merge 2 commits into
actions:mainfrom
v-gowridurgad:exclude-prereleases
Open

v-gowridurgad wants to merge 2 commits into
actions:mainfrom
v-gowridurgad:exclude-prereleases

Conversation

@v-gowridurgad

Copy link
Copy Markdown
Contributor

Description:
latest, current and node now picks the newest entry without a prerelease tag, matching nodejs.org
where /download/release/latest/ points at the newest Current release.

Related issue:
#1660

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@v-gowridurgad
v-gowridurgad requested a review from a team as a code owner November 12, 2026 14:10
Copilot AI balanced review requested due to automatic review settings November 12, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The regression test can pass despite installation failure or an incorrect version because it checks only the initial cache lookup, not installation success or the stable download URL.

1 open issue
What changed in this PR

Updates Node.js alias resolution to address #1660: latest, current, and node skip prereleases and select the newest available stable release.

Changes:

  • Filters prereleases during alias resolution and reports an explicit error when no stable release is available.
  • Adds regression tests and updates the workflow’s expected version to exclude prereleases.
  • Documents the behavior and updates the bundled action runtime.
File Description
src/​distributions/​official_builds/​official_builds.ts Selects stable releases for aliases and handles missing stable versions.
README.md Documents stable-only alias resolution and failure behavior.
dist/​setup/​index.js Includes the resolver changes in the runtime bundle.
.github/​workflows/​versions.yml Excludes prereleases from the expected latest version.
__tests__/​official-installer.test.ts Adds mixed, empty, and prerelease-only index cases and strengthens cache assertions.

Review effort: Balanced

Comment thread __tests__/official-installer.test.ts Resolved
@v-gowridurgad v-gowridurgad self-assigned this Nov 12, 2026

This branch has not been deployed

No deployments
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.

4 participants