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

package.json already contains stone age old obsolete wp-env configuration #58877

Closed
lgersman opened this issue Feb 9, 2024 · 2 comments · Fixed by #58899
Closed

package.json already contains stone age old obsolete wp-env configuration #58877

lgersman opened this issue Feb 9, 2024 · 2 comments · Fixed by #58899
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Env /packages/env [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@lgersman
Copy link

lgersman commented Feb 9, 2024

Description

the monorepo package.json already contains obsolete wp-env configuration

"wp-env": {
	"plugin-dir": "gutenberg",
	"plugin-name": "Gutenberg",
	"docker-template": "./bin/docker-compose.override.yml.template",
	"welcome-logo": [
		",⁻⁻⁻·       .                 |",
		"|  ،⁓’.   . |---  ,---. ,---. |---. ,---. ,---. ,---.",
		"|   | |   | |     |---' |   | |   | |---' |     |   |",
		"`---' `---' `---’ `---’ '   ` `---' `---’ `     `---|",
		"                                                `---'"
	],
	"welcome-build-command": "npm run dev"
}

git blame told me that these snippet is from 2019. I could not find anymore references to "docker-template" nor "welcome-build-command" in the @wordpress/env command. Seems these config was simply forgotten to be removed. Even the referenced wp-env template file (https://github.com/WordPress/gutenberg/blob/trunk/bin/docker-compose.override.yml.template) is no more in use.

The actual used wp-env configuration is located in file .wp-env.json.

So the wp-env configuration snippet in root package.json can be removed.

Step-by-step reproduction instructions

  1. removed the wp-env configuration snippet in root package.json

  2. deleted the wp-env configuration template file bin/docker-compose.override.yml.template referenced in the wp-env configuration snippet in root package.json

  3. Did a npm ci, npm run build and finally npm run env start.

WordPress including Gutenberg worked like a charm.

So this code can safely be removed from my opinion.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@lgersman lgersman added the [Type] Bug An existing feature does not function as intended label Feb 9, 2024
@talldan
Copy link
Contributor

talldan commented Feb 9, 2024

Good catch! This is from an older version of wp-env.

@lgersman
Copy link
Author

lgersman commented Feb 9, 2024

Yeah, I actually stumbled across the issue while borrowing some configs for my own Gutenberg based project 🤪

Thought "Hmmmm ... I know these settings from many many years ago - this cannot be used anymore." And yes, it was true.

Next time I better do a pull request fixing the issue - costs approximately the same time 🤓

@jordesign jordesign added the [Package] Env /packages/env label Feb 9, 2024
@t-hamano t-hamano added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Feb 9, 2024
shreyash3087 added a commit to shreyash3087/gutenberg that referenced this issue Feb 9, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 9, 2024
talldan added a commit that referenced this issue Feb 12, 2024
Co-authored-by: shreyash3087 <shreyash3087@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: lgersman <lgersman@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Env /packages/env [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants