Skip to content
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

.wp-env.json schema: Add testsPort field #68220

Merged
merged 1 commit into from
Dec 25, 2024
Merged

Conversation

t-hamano
Copy link
Contributor

What?

I noticed that in the .wp-env.json schema, even though testsPort is available at the root level, the code editor still throws a warning:

image

Testing Instructions

Update wp-env.json as follows:

{
	"$schema": "./schemas/json/wp-env.json",
	"core": "WordPress/WordPress",
	"plugins": [ "." ],
	"port": 8888,
	"testsPort": 8889,
	"env": {
		"development": {
			"port": 8888,
			"testsPort": 8889
		},
		"tests": {
			"port": 8888,
			"testsPort": 8889
		}
	}
}

Update your wp-env.json as follows.

  • testsPort should not give you a warning.
  • However, env.{instance}.testsPort should give you a warning since it's a disallowed field.

Screenshots or screencast

image

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Dec 22, 2024
@t-hamano t-hamano self-assigned this Dec 22, 2024
"description": "The primary port number to use for the installation. You'll access the instance through the port: 'http://localhost:8888'.",
"description": "The primary port number to use for the installation. You'll access the instance through the port: http://localhost:8888",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a small improvement that should make the code editor suggest the correct URL to link to.

Before

image

After

image

@t-hamano t-hamano marked this pull request as ready for review December 22, 2024 03:54
Copy link

github-actions bot commented Dec 22, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

Flaky tests detected in c40d635.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12451017379
📝 Reported issues:

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thanks, @t-hamano!

@t-hamano
Copy link
Contributor Author

@Mamaduka Thanks for the review!

@t-hamano t-hamano merged commit e00a656 into trunk Dec 25, 2024
72 checks passed
@t-hamano t-hamano deleted the env-schema-tests-port branch December 25, 2024 04:21
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants