Skip to content

Skip prerelease entries when resolving Node versions - #82

Merged
Roemer merged 4 commits into
mainfrom
copilot/fix-node-version-parsing-error
Oct 30, 2026
Merged

Roemer merged 4 commits into
mainfrom
copilot/fix-node-version-parsing-error

Conversation

Copilot AI commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Node’s release index includes prereleases such as v27.0.0-alpha.0.0.0. Parsing these with the stable-version parser panicked, breaking lts and latest resolution.

  • Change: Skip entries that don’t match the stable-version format before parsing.
  • Coverage: Verify prereleases are skipped and stable releases still parse.
version, matches := parseNodeVersion(entry.Version)
if !matches {
    continue
}

Co-authored-by: Roemer <393641+Roemer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix panic error when parsing Node version Skip prerelease entries when resolving Node versions Oct 30, 2026
Copilot AI requested a review from Roemer October 30, 2026 08:46

@Roemer Roemer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

adjust the version, also in the features readme. also you can use gover.ParseVersionFromRegex and check the returned error for != nil instead of doing double regex parsing.

Co-authored-by: Roemer <393641+Roemer@users.noreply.github.com>

Copilot AI commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

adjust the version, also in the features readme. also you can use gover.ParseVersionFromRegex and check the returned error for != nil instead of doing double regex parsing.

Updated the Node feature to 1.0.1, regenerated its README, and switched to ParseVersionFromRegex with error handling. Committed as e1cbc71.

Copilot AI requested a review from Roemer October 30, 2026 09:12
Comment thread features/src/node/installer.go Outdated
return allVersions, nil
}

func parseNodeVersion(versionString string) (*gover.Version, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This method is just a simple wrapper around one function call, use the call directly instead of this wrapper

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the wrapper and called gover.ParseVersionFromRegex directly. Updated the focused tests accordingly. Commit: c22eab4.

Co-authored-by: Roemer <393641+Roemer@users.noreply.github.com>
Copilot AI requested a review from Roemer October 30, 2026 09:16
@Roemer
Roemer marked this pull request as ready for review October 30, 2026 09:16
@raphaelmeyer
raphaelmeyer self-requested a review October 30, 2026 09:24
@Roemer
Roemer merged commit a19caa1 into main Oct 30, 2026
41 checks passed
@Roemer
Roemer deleted the copilot/fix-node-version-parsing-error branch October 30, 2026 09:25
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.

node: panic: failed parsing the version v27.0.0-alpha.0.0.0: failed matching

3 participants