-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Real-time collaboration: Ensure Yjs imports are inside experimental flag check #72503
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
Real-time collaboration: Ensure Yjs imports are inside experimental flag check #72503
Conversation
|
Size Change: 0 B Total Size: 2.17 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 5305a6b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18662357566
|
| }; | ||
|
|
||
| if ( window.__experimentalEnableSync ) { | ||
| if ( globalThis.IS_GUTENBERG_PLUGIN ) { |
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'm guessing there's a lint rule forcing us to do nested conditions right?
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.
Yes. :)
| 'IS_GUTENBERG_PLUGIN', |
|
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. |
|
This PR doesn't need a |
|
@t-hamano, it does. The following warning happens when syncing packages with core and will require this fix.
|
|
Yes it does, see WordPress/wordpress-develop#10355 |
Updates the packages to match Gutenberg version 21.9.0 RC2. Also updates the sync script to work with the new `package-lock.json` format. Some reusable block tests were adjusted to work with more render arguments. Added `core-data` to the ignore list for `verify:source-maps` because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See WordPress/gutenberg#72503. See: #10355. See: https://core.trac.wordpress.org/ticket/64117. Props ellatrix, dmsnell. Fixes #64117. git-svn-id: https://develop.svn.wordpress.org/trunk@61009 602fd350-edb4-49c9-b593-d223f7449a82
Updates the packages to match Gutenberg version 21.9.0 RC2. Also updates the sync script to work with the new `package-lock.json` format. Some reusable block tests were adjusted to work with more render arguments. Added `core-data` to the ignore list for `verify:source-maps` because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See WordPress/gutenberg#72503. See: WordPress/wordpress-develop#10355. See: https://core.trac.wordpress.org/ticket/64117. Props ellatrix, dmsnell. Fixes #64117. Built from https://develop.svn.wordpress.org/trunk@61009 git-svn-id: http://core.svn.wordpress.org/trunk@60345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates the packages to match Gutenberg version 21.9.0 RC2. Also updates the sync script to work with the new `package-lock.json` format. Some reusable block tests were adjusted to work with more render arguments. Added `core-data` to the ignore list for `verify:source-maps` because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See WordPress/gutenberg#72503. See: WordPress/wordpress-develop#10355. See: https://core.trac.wordpress.org/ticket/64117. Props ellatrix, dmsnell. Fixes #64117. Built from https://develop.svn.wordpress.org/trunk@61009 git-svn-id: https://core.svn.wordpress.org/trunk@60345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
I've cherry-picked this manually onto the |
Yjs was bundled by accident in the `core-data` package, so we had to ignore the source map verification in an earlier package sync ([61009]). This can now be restored because the issue was fixed in WordPress/gutenberg#72503. Fixes #64120. git-svn-id: https://develop.svn.wordpress.org/trunk@61184 602fd350-edb4-49c9-b593-d223f7449a82
Yjs was bundled by accident in the `core-data` package, so we had to ignore the source map verification in an earlier package sync ([61009]). This can now be restored because the issue was fixed in WordPress/gutenberg#72503. Fixes #64120. Built from https://develop.svn.wordpress.org/trunk@61184 git-svn-id: http://core.svn.wordpress.org/trunk@60520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Yjs was bundled by accident in the `core-data` package, so we had to ignore the source map verification in an earlier package sync ([61009]). This can now be restored because the issue was fixed in WordPress/gutenberg#72503. Fixes #64120. Built from https://develop.svn.wordpress.org/trunk@61184 git-svn-id: https://core.svn.wordpress.org/trunk@60520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
What?
Ensure Yjs imports are inside an experimental flag check.
Why?
Code inside experimental flag checks is removed, which allows any code it imports or calls to be tree-shaken from WordPress release builds.
How?
syncConfiginside experimental flag check.createSyncManagerinside experimental flag check.Testing Instructions
Since we are testing the effect of this change on WordPress builds, this gets a little tricky.
npm run build.wordpress-develop.npm run sync-gutenberg-packagesWarning: The build/wp-includes/js/dist/core-data.js file must not contain a sourceMappingURL.core-datafiles from step 2 into the WordPress project, e.g.:cd node_modules/@wordpress/core-datarm -rf build*cp -r ../../../../gutenberg/packages/core-data/build* .core-datapackage from being overwritten.npm run sync-gutenberg-packagesTesting Instructions for Keyboard
n/a