Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 1, 2025

Motivation for the change, related issues

Allows CLI to load WordPress versions ending with .0, such as 6.8.0, by passing --wp=6.8.0.

Before this PR, the only way to install exactly the 6.8.0 version was passing the URL to the zip file. --wp=6.8.0 would not work – the version string is used to construct the download URL (https://wordpress.org/wordpress-${versionQuery}.zip), but the actual zip file on WordPress.org is named 6.8.zip, not 6.8.0. At the same time, the string 6.8 is implicitly resolves to the latest point release, e.g. 6.8.14.

Resolves #2749

Implementation details

We just remove the trailing .0 before constructing the URL.

It would be useful to avoid inferring the release URL entirely and request the 6.8.0 details directly from https://api.wordpress.org/core/version-check/1.7/?channel=beta, I'm not sure how to do that. Any ideas @dd32?

Testing Instructions (or ideally a Blueprint)

  • CI – this PR ships a new test suite resolve-wordpress-release.spec.ts
  • Run node --no-warnings=ExperimentalWarning --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts ./packages/playground/cli/src/cli.ts server --wp=6.8.0 and confirm WordPress 6.8.0 is getting installed

@adamziel adamziel marked this pull request as ready for review November 1, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@wp-playground/cli minor version query resolves to latest patch version

2 participants