Skip to content

Support version ranges and tags in wranglerVersion input#425

Closed
WillTaylorDev wants to merge 1 commit intocloudflare:mainfrom
WillTaylorDev:willtaylor/escalation-963-support-version-ranges
Closed

Support version ranges and tags in wranglerVersion input#425
WillTaylorDev wants to merge 1 commit intocloudflare:mainfrom
WillTaylorDev: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

@WillTaylorDev WillTaylorDev requested review from a team as code owners April 15, 2026 16:52
@WillTaylorDev WillTaylorDev requested a review from NuroDev April 15, 2026 16:52
@ericclemmons
Copy link
Copy Markdown
Member

This will actually work well with #412

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.

Much better DX for wranglerVersion! Good work!

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 cloudflare#390
Relates to cloudflare#366
Relates to cloudflare#379
@ericclemmons
Copy link
Copy Markdown
Member

ericclemmons commented Apr 15, 2026

Closed in favor of #426

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.

cannot use wranglerVersion to use latest v4 release

2 participants