-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for pre-release version syntax to all relevant tools #1823
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Tested the regex by manually updating the different Optimization Detective version references locally to |
One thing to flag here is that the |
Do we need to include the period? WordPress core releases don't include it. They use versions like |
@westonruter I don't feel strongly about what format we use, but I think supporting the period doesn't hurt, as it's common. So I don't think we need to alter that regardless of what version we end up using. |
No, it won't impact this because it doesn't increment the performance/bin/plugin/commands/versions.js Lines 141 to 155 in 0615c18
|
Output of Output of
|
Output of {
"performance-lab": "3.7.0",
"auto-sizes": "1.4.0",
"dominant-color-images": "1.2.0",
"embed-optimizer": "0.4.0",
"image-prioritizer": "0.3.0",
"optimization-detective": "1.0.0-beta1",
"speculation-rules": "1.3.1",
"web-worker-offloading": "0.2.0",
"webp-uploads": "2.4.0"
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
In order to support release versions like the upcoming Optimization Detective
1.0.0-beta.1
, we need to make sure our tooling supports such versions.The
versions
command was already checking for pre-release identifiers, however it was flawed because it would not accept periods in the suffix, which are commonly used. This PR updates all relevant regexes to support version suffixes, using a uniform approach.