#47843 closed task (blessed) (fixed)
Update the WordPress Packages to the ones used in the Gutenberg 6.5 release
Reported by: | gziolo | Owned by: | gziolo |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Updated Packages:
Version 6.2:
- @wordpress/a11y@2.5.0
- @wordpress/annotations@1.5.0
- @wordpress/api-fetch@3.4.0
- @wordpress/autop@2.4.0
- @wordpress/babel-plugin-import-jsx-pragma@2.3.0
- @wordpress/babel-plugin-makepot@3.2.0
- @wordpress/babel-preset-default@4.4.0
- @wordpress/blob@2.5.0
- @wordpress/block-editor@3.0.0
- @wordpress/block-library@2.7.0
- @wordpress/block-serialization-default-parser@3.3.0
- @wordpress/block-serialization-spec-parser@3.2.0
- @wordpress/blocks@6.5.0
- @wordpress/browserslist-config@2.6.0
- @wordpress/components@8.1.0
- @wordpress/compose@3.5.0
- @wordpress/core-data@2.5.0
- @wordpress/custom-templated-path-webpack-plugin@1.5.0
- @wordpress/data-controls@1.1.0
- @wordpress/data@4.7.0
- @wordpress/date@3.4.0
- @wordpress/dependency-extraction-webpack-plugin@1.1.0
- @wordpress/deprecated@2.5.0
- @wordpress/docgen@1.3.0
- @wordpress/dom-ready@2.5.0
- @wordpress/dom@2.4.0
- @wordpress/e2e-test-utils@2.2.0
- @wordpress/e2e-tests@1.4.0
- @wordpress/edit-post@3.6.0
- @wordpress/editor@9.5.0
- @wordpress/element@2.6.0
- @wordpress/escape-html@1.5.0
- @wordpress/eslint-plugin@2.4.0
- @wordpress/format-library@1.7.0
- @wordpress/hooks@2.5.0
- @wordpress/html-entities@2.5.0
- @wordpress/i18n@3.6.0
- @wordpress/is-shallow-equal@1.5.0
- @wordpress/jest-console@3.2.0
- @wordpress/jest-preset-default@4.3.0
- @wordpress/jest-puppeteer-axe@1.2.0
- @wordpress/keycodes@2.5.0
- @wordpress/library-export-default-webpack-plugin@1.4.0
- @wordpress/list-reusable-blocks@1.6.0
- @wordpress/media-utils@1.0.0
- @wordpress/notices@1.6.0
- @wordpress/npm-package-json-lint-config@2.1.0
- @wordpress/nux@3.5.0
- @wordpress/plugins@2.5.0
- @wordpress/postcss-themes@2.2.0
- @wordpress/priority-queue@1.3.0
- @wordpress/redux-routine@3.5.0
- @wordpress/rich-text@3.5.0
- @wordpress/scripts@3.4.0
- @wordpress/server-side-render@1.1.0
- @wordpress/shortcode@2.4.0
- @wordpress/token-list@1.5.0
- @wordpress/url@2.7.0
- @wordpress/viewport@2.6.0
- @wordpress/wordcount@2.5.0
Version 6.4:
- @wordpress/annotations@1.6.0
- @wordpress/api-fetch@3.5.0
- @wordpress/autop@2.5.0
- @wordpress/babel-preset-default@4.5.0
- @wordpress/block-editor@3.1.0
- @wordpress/block-library@2.8.0
- @wordpress/block-serialization-default-parser@3.4.0
- @wordpress/block-serialization-spec-parser@3.3.0
- @wordpress/blocks@6.6.0
- @wordpress/components@8.2.0
- @wordpress/compose@3.6.0
- @wordpress/core-data@2.6.0
- @wordpress/data-controls@1.2.0
- @wordpress/data@4.8.0
- @wordpress/date@3.5.0
- @wordpress/dependency-extraction-webpack-plugin@1.2.0
- @wordpress/deprecated@2.6.0
- @wordpress/docgen@1.4.0
- @wordpress/dom@2.5.0
- @wordpress/e2e-test-utils@2.3.0
- @wordpress/e2e-tests@1.5.0
- @wordpress/edit-post@3.7.0
- @wordpress/editor@9.6.0
- @wordpress/element@2.7.0
- @wordpress/eslint-plugin@3.0.0
- @wordpress/format-library@1.8.0
- @wordpress/hooks@2.6.0
- @wordpress/is-shallow-equal@1.6.0
- @wordpress/jest-console@3.3.0
- @wordpress/jest-preset-default@5.0.0
- @wordpress/jest-puppeteer-axe@1.3.0
- @wordpress/keycodes@2.6.0
- @wordpress/list-reusable-blocks@1.7.0
- @wordpress/media-utils@1.1.0
- @wordpress/notices@1.7.0
- @wordpress/nux@3.6.0
- @wordpress/plugins@2.6.0
- @wordpress/project-management-automation@1.0.0
- @wordpress/redux-routine@3.6.0
- @wordpress/rich-text@3.6.0
- @wordpress/scripts@4.0.0
- @wordpress/server-side-render@1.2.0
- @wordpress/token-list@1.6.0
- @wordpress/viewport@2.7.0
- @wordpress/wordcount@2.6.0
Version 6.5:
- @wordpress/annotations@1.7.0
- @wordpress/api-fetch@3.6.0
- @wordpress/babel-preset-default@4.6.0
- @wordpress/block-directory@1.0.0
- @wordpress/block-editor@3.2.0
- @wordpress/block-library@2.9.0
- @wordpress/blocks@6.7.0
- @wordpress/components@8.3.0
- @wordpress/compose@3.7.0
- @wordpress/core-data@2.7.0
- @wordpress/data-controls@1.3.0
- @wordpress/data@4.9.0
- @wordpress/dependency-extraction-webpack-plugin@2.0.0
- @wordpress/e2e-test-utils@2.4.0
- @wordpress/e2e-tests@1.7.0
- @wordpress/edit-post@3.8.0
- @wordpress/editor@9.7.0
- @wordpress/element@2.8.0
- @wordpress/eslint-plugin@3.1.0
- @wordpress/format-library@1.9.0
- @wordpress/list-reusable-blocks@1.8.0
- @wordpress/media-utils@1.2.0
- @wordpress/notices@1.8.0
- @wordpress/nux@3.7.0
- @wordpress/plugins@2.7.0
- @wordpress/rich-text@3.7.0
- @wordpress/scripts@5.0.0
- @wordpress/server-side-render@1.3.0
- @wordpress/url@2.8.0
- @wordpress/viewport@2.8.0
Attachments (11)
Change History (47)
#2
@
5 years ago
The patch attached has still some bugs to be resolved, I'll continue working on it tomorrow.
#4
@
5 years ago
- Description modified (diff)
- Summary changed from Update the WordPress Packages to the ones used in the Gutenberg 6.2 release to Update the WordPress Packages to the ones used in the Gutenberg 6.4 release
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
5 years ago
#6
@
5 years ago
- Keywords has-patch needs-testing added
Did some testing of patch-6.4.diff. Here are things I tested:
- Circle crops on images.
- Sliding heights on cover images.
- Solid cover background color.
- Table cell text alignment.
I couldn't find any big issues in my testing. I opened #47948 to address a small bug I found in Twenty Eleven with the circle mask image style.
#7
follow-up:
↓ 8
@
5 years ago
- Keywords needs-testing removed
This is looking really good! I'm unable to spot any regressions when testing locally.
I'd like to get this committed sooner than later so that there's plenty of time to spot bugs in trunk
before the 5.3 beta.
There's just a couple of things to fix up:
- I'm getting modifications to my
package-lock.json
when I runnpm install
. I made sure to runnvm install
andnvm install-latest-npm
first, and I tried deletingnode_modules
. We can probably just include these differences when committing. - There are 18 test failures when running
npm run test:php
. This looks to be because we need to update some block fixtures. You can ignore the 14 test failures that are to do with not having the WordPress Importer plugin installed.
#8
in reply to:
↑ 7
;
follow-up:
↓ 9
@
5 years ago
Replying to noisysocks:
You can ignore the 14 test failures that are to do with not having the WordPress Importer plugin installed.
#9
in reply to:
↑ 8
@
5 years ago
Replying to pento:
Replying to noisysocks:
You can ignore the 14 test failures that are to do with not having the WordPress Importer plugin installed.
Um... uh... it's my first day! 😀
#10
follow-up:
↓ 12
@
5 years ago
Any particular reason to change the jquery
URL format in package.json
in patch-6.4.diff ?
"jquery-color": "https://github.com/jquery/jquery-color/archive/2.1.1.tar.gz", 110 110 "jquery-form": "4.2.1", 111 111 "jquery-hoverintent": "1.8.3", 112 "jquery-ui": "https://github.com/jquery/jquery-ui/archive/1.11.4.tar.gz", 112 "jquery-ui": "github:jquery/jquery-ui#1.11.4",
It switches from an archived version to a commit hash
"jquery-ui": { 13836 "version": "https://github.com/jquery/jquery-ui/archive/1.11.4.tar.gz", 13837 "integrity": "sha512-yMLXNruSte8iAAOsShJvUdcwgrHbWrxBCoKfPGqDmgFkfNLbnXoHcyxgOvI2IbgfupFF2paOm0AvOq6iERedKQ==" 14110 "version": "github:jquery/jquery-ui#d6713024e16de90ea71dc0544ba34e1df01b4d8a", 14111 "from": "github:jquery/jquery-ui#1.11.4"
I doubt there would be any issues so long as the commit hash matches the version expected.
I'd rather see this change not be included though, and keep the original format unless I'm missing some reason to switch the URL to that proposed, if there is another underlying reason then the other packages using a pinned version such as jquery-color
should probably also be updated to the same format for consistency etc.
Also wondering if npm v6.11.0 should be used to avoid the 6.11.1 & 6.11.2 bugs noticed in:
https://npm.community/t/6-11-1-some-dependencies-are-no-longer-being-installed/9586/5
npm 6.11.3 is scheduled to include a fix for the above next Tuesday 3rd September
#12
in reply to:
↑ 10
@
5 years ago
Replying to netweb:
Any particular reason to change the
jquery
URL format inpackage.json
in patch-6.4.diff ?
I think it's a merge conflict which I didn't resolve properly
Also wondering if npm v6.11.0 should be used to avoid the 6.11.1 & 6.11.2 bugs noticed in:
https://npm.community/t/6-11-1-some-dependencies-are-no-longer-being-installed/9586/5
npm 6.11.3 is scheduled to include a fix for the above next Tuesday 3rd September
I wasn't aware of that. We can recreate with v6.11.0 or whatever we have set in package.json
file at the moment.
#13
@
5 years ago
We can leave committing this until after NPM 6.11.3 is released with that bug fix.
@gziolo: Can you get the props list for this update?
#14
@
5 years ago
I'm also working in parallel on build improvements in Gutenberg so we could greatly simplify the process of upgrading all those packages. See https://github.com/WordPress/gutenberg/pull/17298.
The idea is that we would integrate @wordpress/dependency-extraction-webpack-plugin
and let Webpack generate most of the metadata:
handle
dependencies
- stable
version
(based on the content of the file rather than the version of the package)
#15
follow-up:
↓ 16
@
5 years ago
@gziolo: Can you get the props list for this update?
How do I generate the props list? I can't find documentation for that.
#16
in reply to:
↑ 15
@
5 years ago
Replying to gziolo:
How do I generate the props list? I can't find documentation for that.
There's no documented process that I'm aware of. #meta4442 is the latest iteration of it, it's mostly a manual process to match GitHub usernames with W.org usernames.
#17
@
5 years ago
npm run test:php
still reports 15 failures with the new uploaded patch. They all look very similar:
15) Tests_Query_Vars::testPublicQueryVarsAreAsExpected Unexpected incorrect usage notice for WP_Block_Type_Registry::register Failed asserting that an array is empty. /var/www/tests/phpunit/includes/abstract-testcase.php:494 /var/www/tests/phpunit/includes/abstract-testcase.php:506 FAILURES! Tests: 9836, Assertions: 51287, Failures: 15, Skipped: 11.
I don't have more time today to investigate.
Otherwise, I think all the issues reported are resolved.
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
5 years ago
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
5 years ago
#20
@
5 years ago
Hi @gziolo, I did some tests, and it looks like things are mostly working as expected. In my tests, it seems block widgets related code is not loaded in the customizer, and the other experimental features are also disabled.
I noticed the patch did not include the new features that allow server-side registering and unregistering of block styles recently added in Gutenberg, so I added a new patch that includes this functionality.
It worked well in my manual tests with the plugin disabled and tests are green.
With the plugin enable we have some problems because the functions are defined multiple times I will create in parallel a PR in Gutenberg to address this.
It is possible to see the diff of my changes at https://github.com/WordPress/wordpress-develop/pull/86/commits/7562413cc8475e0aadd2501d7e4615cba23821dd.
And the original Gutenberg PR at https://github.com/WordPress/gutenberg/pull/16356.
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
5 years ago
#22
@
5 years ago
Anyone able to confirm that script-loader.php is the best home for the enqueue_block_styles_assets and enqueue_editor_block_styles_assets functions?
#23
@
5 years ago
@jorgefilipecosta with your patch, activating the Gutenberg plugin causes this issue
Fatal error: Cannot declare class WP_Block_Styles_Registry, because the name is already in use in /var/www/html/wp-content/plugins/gutenberg/lib/class-wp-block-styles-registry.php on line 14
We need to add a check for existence in the Gutenberg plugin and add an issue to remove this code from the plugin once we update the minimum version (after WP 5.3 release)
#24
@
5 years ago
I'm testing this branch heavily with the help of the Gutenberg e2e tests. I'll be reporting my findings here.
First thing I noticed is that the preview button for unpublished posts is not working, it results in a 404.
#25
@
5 years ago
Hi @youknowriad, I guess to fix the styles problem we can conditionally include this functionality in the plugin for now. And when WordPress 5.3 is released we remove the code and update the minimum version.
I'm proposing this solution in PR https://github.com/WordPress/gutenberg/pull/17429.
#26
@
5 years ago
First thing I noticed is that the preview button for unpublished posts is not working, it results in a 404
I uploaded an updated version of the patch which includes a temporary fix for the issue reported.
I also removed PHP code for code style registration, which is going to be backported in its own patch.
#27
@
5 years ago
- Keywords commit added
This looks in a better shape. Thanks @jorgefilipecosta @gziolo Let's commit that and continue on the remaining things on separate tickets.
This is a good report to track the small php changes that need to be backported.
#28
@
5 years ago
PHP unit tests fail with the fix for autosaves:
https://github.com/WordPress/wordpress-develop/pull/88
We need to publish another version of npm packages, update them and try again.
#29
follow-up:
↓ 31
@
5 years ago
I added the action that was added for the plugin in https://github.com/WordPress/gutenberg/pull/16683.
The changes I made are the following:
-
src/wp-admin/admin-ajax.php
53 53 'autocomplete-user', 54 54 'dashboard-widgets', 55 55 'logged-in', 56 'rest-nonce', 56 57 ); 57 58 58 59 $core_actions_post = array( -
src/wp-admin/includes/ajax-actions.php
5271 5271 5272 5272 wp_send_json_success( $all_sizes ); 5273 5273 } 5274 5275 /** 5276 * Ajax handler to renew the REST API nonce. 5277 * 5278 * @since 5.3.0 5279 */ 5280 function wp_ajax_rest_nonce() { 5281 exit( wp_create_nonce( 'wp_rest' ) ); 5282 } -
src/wp-includes/script-loader.php
535 535 } 536 536 $scripts->add_inline_script( 537 537 'wp-api-fetch', 538 sprintf( 539 implode( 540 "\n", 541 array( 542 '( function() {', 543 ' var nonceMiddleware = wp.apiFetch.createNonceMiddleware( "%s" );', 544 ' wp.apiFetch.use( nonceMiddleware );', 545 ' wp.hooks.addAction(', 546 ' "heartbeat.tick",', 547 ' "core/api-fetch/create-nonce-middleware",', 548 ' function( response ) {', 549 ' if ( response[ "rest_nonce" ] ) {', 550 ' nonceMiddleware.nonce = response[ "rest_nonce" ];', 551 ' }', 552 ' }', 553 ' );', 554 '} )();', 555 ) 538 join( array( 539 sprintf( 540 'wp.apiFetch.nonceMiddleware = wp.apiFetch.createNonceMiddleware( "%s" );', 541 ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ) 556 542 ), 557 ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ) 558 ), 543 'wp.apiFetch.use( wp.apiFetch.nonceMiddleware );', 544 sprintf( 545 'wp.apiFetch.nonceEndpoint = "%s";', 546 admin_url( 'admin-ajax.php?action=rest-nonce' ) 547 ), 548 ), "\n" ), 559 549 'after' 560 550 ); 561 551 $scripts->add_inline_script(
This can be tested by adding lowering the nonce life to 5 seconds. Load the page, then wait 5 seconds and try to update or publish a post.
<?php add_filter( 'nonce_life', function() { return 5; } );
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
5 years ago
#31
in reply to:
↑ 29
@
5 years ago
- Description modified (diff)
- Summary changed from Update the WordPress Packages to the ones used in the Gutenberg 6.4 release to Update the WordPress Packages to the ones used in the Gutenberg 6.5 release
Replying to iseulde:
I added the action that was added for the plugin in https://github.com/WordPress/gutenberg/pull/16683.
@iseulde, I had some issues applying your patch locally so I updated the previous one to move forward quicker. Can you open another ticket with only the changes necessary to backport GH16683?
The very last patch contains all the changes from Gutenberg 6.5.
#34
@
5 years ago
I have one more fix comming up soon. PHP unit tests fail after adding PHP file for Social Link blocks. I'm testing additional changes in https://github.com/WordPress/wordpress-develop/pull/93. Once it's green, I will upload here.
Initial version