-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rename the wp-env schema to not be a dotfile #62634
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. |
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.
I tested how the theme.json
and block.json
schemas are redirected.
$ curl -s -o /dev/null -w "%{redirect_url}\n" https://schemas.wp.org/trunk/block.json
https://raw.githubusercontent.com/WordPress/gutenberg/trunk/schemas/json/block.json
$ curl -s -o /dev/null -w "%{redirect_url}\n" https://schemas.wp.org/trunk/theme.json
https://raw.githubusercontent.com/WordPress/gutenberg/trunk/schemas/json/theme.json
Regarding the wp-env scheme, it seems like the redirect URL is not correct, whether there is a dot or not.
$ curl -s -o /dev/null -w "%{redirect_url}\n" https://schemas.wp.org/trunk/.wp-env.json
https://raw.githubusercontent.com/
$ curl -s -o /dev/null -w "%{redirect_url}\n" https://schemas.wp.org/trunk/wp-env.json
https://raw.githubusercontent.com/
Will this issue be resolved if this PR is merged?
Judging from the tests you did, it doesn't look like it. And after some more searching, I found a systems request Add redirect for Font Collection JSON schema which worked and I assumed didn't need the systems change. I asked in #meta on the Making WordPress slack if it could get added. I still think we should keep the rename, so I've updated the description to reflect that. Once I figure out the process, I'll update the README.md with details for future developers adding schemas. |
I checked the "Schema redirect for .wp-env.json" post. From what I saw in the post, it seems that the redirection is done for the dotted file.
Therefore, I am concerned that if we push ahead with this PR, the redirected file will not be found. If we go ahead with this PR and take Schemastore.org into consideration, should we change the redirect to the following:
|
100% move forward with this, I'll update the systems request to match. |
Rename the wp-env schema to not be a dotfile. Dotfiles have special handling in many systems, including schemastore.org. Remove the leading dot to improve compatibility. --- Co-authored-by: ajlende <ajlende@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: sirreal <jonsurrell@git.wordpress.org> Co-authored-by: dd32 <dd32@git.wordpress.org>
I just cherry-picked this PR to the wp/6.6-rc-1 branch to get it included in the next release: 861b089 |
Rename the wp-env schema to not be a dotfile. Dotfiles have special handling in many systems, including schemastore.org. Remove the leading dot to improve compatibility. --- Co-authored-by: ajlende <ajlende@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: sirreal <jonsurrell@git.wordpress.org> Co-authored-by: dd32 <dd32@git.wordpress.org>
What?
Rename the wp-env schema to not be a dotfile.
Why?
Schemastore.org also stores schemas for dotifles without the dot, and we're mostly mirroring how they handle schemas.
How?
Rename the wp-env schema to not be a dotfile.
Testing Instructions
Can't properly be tested until merged, but schema urls will have to be updated to
https://schemas.wp.org/trunk/wp-env.json
.Testing Instructions for Keyboard
Screenshots or screencast