Jon Surrell
Jon Surrell
I created https://github.com/WordPress/gutenberg/issues/61765 to track this.
> I like the direction. Thank you for taking care of the additional refactoring for the special constants we use to guard some features like `IS_GUTENBERG_PLUGIN`, `IS_WORDPRESS_CORE` and `SCRIPT_DEBUG`. Thanks!...
There are several eslint rules around how to use `process.env.[OUR_VARIABLES]`. They probably need to be updated to _ban_ those variables (maybe autofix them to the `globalThis…` versions) and warn in...
Docs need an update: https://github.com/WordPress/gutenberg/blob/5915f9ad0ebc69d77ee99769647a3398920d80ba/docs/how-to-guides/feature-flags.md?plain=1#L5
This should have breaking change changelog for all the updated packages- maybe for all packages- mentioning the change to `globalThis`.
Some conversation happened in Core Slack around the proposed approach. I'll link here for posterity: https://wordpress.slack.com/archives/C02QB2JS7/p1715758629398369
> Is there any make/core post or dev note that should be done as a result of this PR. Who would be interested to learn about this and how should...
Do you think all the client packages should get a breaking change or only the ones immediately impacted? > Who needs to know about this? Folks that have their own...
> What type of breaking changes do you expect after refactoring these three constants to be set on `globalThis`? … Are you worried that tree-shaking won't work out of the...
I've rebased this and added breaking change changelogs to all the affected packages.