Skip to content

[cli] Update WordPress version validation to include "beta" as a valid slug#3446

Open
fellyph wants to merge 3 commits intotrunkfrom
adding-cli-support-to-beta
Open

[cli] Update WordPress version validation to include "beta" as a valid slug#3446
fellyph wants to merge 3 commits intotrunkfrom
adding-cli-support-to-beta

Conversation

@fellyph
Copy link
Copy Markdown
Collaborator

@fellyph fellyph commented Mar 30, 2026

This pull request updates the logic for validating WordPress version slugs in the Playground CLI to add support for the "beta" slug. The changes ensure that "beta" is now recognized as a valid version and update documentation and error messages accordingly.

Validation and documentation updates:

  • Added "beta" as a recognized valid WordPress version slug in the documentation comment in is-valid-wordpress-slug.ts.
  • Updated the regular expression in isValidWordPressSlug to accept "beta" as a valid version slug.

User-facing error message improvements:

  • Modified the error message in run-cli.ts to include "beta" as a valid WordPress version option for users.

@fellyph fellyph requested review from a team, adamziel, bgrgicak and Copilot March 30, 2026 16:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for the beta WordPress version slug in the Playground CLI by updating validation and user-facing messaging.

Changes:

  • Extend isValidWordPressSlug to accept beta as a standalone valid slug.
  • Update inline documentation to list beta as an allowed version string.
  • Improve the CLI error message to suggest beta as a valid option.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/playground/cli/src/run-cli.ts Updates the invalid-version error message to include beta as an accepted slug.
packages/playground/cli/src/is-valid-wordpress-slug.ts Extends slug validation regex and doc comment to recognize beta.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fellyph and others added 2 commits March 30, 2026 17:13
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.

2 participants