Skip to content

Support version ranges and tags in wranglerVersion input#426

Merged
ericclemmons merged 1 commit intomainfrom
willtaylor/escalation-963-support-version-ranges
Apr 15, 2026
Merged

Support version ranges and tags in wranglerVersion input#426
ericclemmons merged 1 commit intomainfrom
willtaylor/escalation-963-support-version-ranges

Conversation

@WillTaylorDev
Copy link
Copy Markdown
Collaborator

The wranglerVersion input only accepted exact versions like '4.81.0'. Setting it to a major version like '4', a range like '^4.0.0', or a tag like 'latest' crashed with 'Invalid Version' during secret uploads. npm installed the right version fine, but subsequent version comparisons failed because they expected exact X.Y.Z format.

After installing wrangler, the action now runs wrangler --version to get the concrete installed version and uses that for all version comparisons. If version detection fails and the user gave an exact version, the action falls back to using it directly, preserving existing behavior.

Pre-installed versions that satisfy a range skip reinstallation.

Fixes #390
Relates to #366
Relates to #379

The wranglerVersion input only accepted exact versions like '4.81.0'.
Setting it to a major version like '4', a range like '^4.0.0', or a
tag like 'latest' crashed with 'Invalid Version' during secret
uploads. npm installed the right version fine, but subsequent version
comparisons failed because they expected exact X.Y.Z format.

After installing wrangler, the action now runs wrangler --version to
get the concrete installed version and uses that for all version
comparisons. If version detection fails and the user gave an exact
version, the action falls back to using it directly, preserving
existing behavior.

Pre-installed versions that satisfy a range skip reinstallation.

Fixes #390
Relates to #366
Relates to #379
@WillTaylorDev WillTaylorDev requested review from a team as code owners April 15, 2026 18:49
Copy link
Copy Markdown
Member

@ericclemmons ericclemmons left a comment

Choose a reason for hiding this comment

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

I've said it once in #425 and I'll say it again,

Much better DX for wranglerVersion! Good work!

#412 needs this to be evergreen on v4.

@ericclemmons ericclemmons added the enhancement New feature or request label Apr 15, 2026
@ericclemmons ericclemmons marked this pull request as draft April 15, 2026 19:28
@ericclemmons ericclemmons marked this pull request as ready for review April 15, 2026 19:28
@ericclemmons ericclemmons merged commit d8f3eaa into main Apr 15, 2026
5 of 8 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot use wranglerVersion to use latest v4 release

2 participants