Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#49358 closed defect (bug) (fixed)

Update WordPress packages

Reported by: jorgefilipecosta's profile jorgefilipecosta Owned by: jorgefilipecosta's profile jorgefilipecosta
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.4
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

The following package versions were changed:
@wordpress/a11y: 2.6.0 -> 2.7.0
@wordpress/annotations: 1.10.0 -> 1.11.0
@wordpress/api-fetch: 3.9.0 -> 3.10.0
@wordpress/autop: 2.5.1 -> 2.6.0
@wordpress/blob: 2.6.0 -> 2.7.0
@wordpress/block-directory: 1.3.0 -> 1.4.0
@wordpress/block-editor: 3.5.0 -> 3.6.0
@wordpress/block-library: 2.12.0 -> 2.13.0
@wordpress/block-serialization-default-parser: 3.4.1 -> 3.5.0
@wordpress/blocks: 6.10.0 -> 6.11.0
@wordpress/components: 9.0.0 -> 9.1.0
@wordpress/compose: 3.10.0 -> 3.11.0
@wordpress/core-data: 2.10.0 -> 2.11.0
@wordpress/custom-templated-path-webpack-plugin: 1.5.0 -> 1.6.0
@wordpress/data: 4.12.0 -> 4.13.0
@wordpress/data-controls: 1.6.0 -> 1.7.0
@wordpress/date: 3.7.0 -> 3.8.0
@wordpress/dependency-extraction-webpack-plugin: 2.1.0 -> 2.2.0
@wordpress/deprecated: 2.6.1 -> 2.7.0
@wordpress/dom: 2.7.0 -> 2.8.0
@wordpress/dom-ready: 2.6.0 -> 2.7.0
@wordpress/e2e-test-utils: 4.1.0 -> 4.2.0
@wordpress/edit-post: 3.11.0 -> 3.12.0
@wordpress/editor: 9.10.0 -> 9.11.0
@wordpress/element: 2.10.0 -> 2.11.0
@wordpress/escape-html: 1.6.0 -> 1.7.0
@wordpress/format-library: 1.12.0 -> 1.13.0
@wordpress/hooks: 2.6.0 -> 2.7.0
@wordpress/html-entities: 2.5.0 -> 2.6.0
@wordpress/i18n: 3.8.0 -> 3.9.0
@wordpress/is-shallow-equal: 1.7.0 -> 1.8.0
@wordpress/keyboard-shortcuts: 0.2.0 -> 1.0.0
@wordpress/keycodes: 2.8.0 -> 2.9.0
@wordpress/library-export-default-webpack-plugin: 1.5.0 -> 1.6.0
@wordpress/list-reusable-blocks: 1.11.0 -> 1.12.0
@wordpress/media-utils: 1.5.0 -> 1.6.0
@wordpress/notices: 1.11.0 -> 1.12.0
@wordpress/nux: 3.10.0 -> 3.11.0
@wordpress/plugins: 2.10.0 -> 2.11.0
@wordpress/priority-queue: 1.4.0 -> 1.5.0
@wordpress/redux-routine: 3.6.2 -> 3.7.0
@wordpress/rich-text: 3.10.0 -> 3.11.0
@wordpress/scripts: 6.2.0 -> 7.0.0
@wordpress/server-side-render: 1.6.0 -> 1.7.0
@wordpress/shortcode: 2.5.0 -> 2.6.0
@wordpress/token-list: 1.8.0 -> 1.9.0
@wordpress/url: 2.9.0 -> 2.10.0
@wordpress/viewport: 2.11.0 -> 2.12.0
@wordpress/wordcount: 2.6.2 -> 2.7.0

Added these new packages:
@wordpress/warning
@wordpress/primitives
@wordpress/icons

Attachments (7)

49358.diff (143.3 KB) - added by jorgefilipecosta 4 years ago.
49358.2.diff (143.9 KB) - added by jorgefilipecosta 4 years ago.
49358.3.diff (151.4 KB) - added by jorgefilipecosta 4 years ago.
49358.4.diff (154.0 KB) - added by jorgefilipecosta 4 years ago.
49358.5.diff (155.9 KB) - added by jorgefilipecosta 4 years ago.
49358.6.diff (156.7 KB) - added by jorgefilipecosta 4 years ago.
49358.6.2.diff (156.7 KB) - added by jorgefilipecosta 4 years ago.

Download all attachments as: .zip

Change History (22)

This ticket was mentioned in PR #146 on WordPress/wordpress-develop by jorgefilipecosta.


4 years ago
#1

#2 @netweb
4 years ago

  • Keywords blocked added

WARNING: Do *NOT* commit this until Node.js is updated on the build server

https://make.wordpress.org/systems/2020/01/21/update-svn1-node-versions-for-gutenberg/

The latest package changes require Node.js 12.x and the SVN build server is only Node.js 8.x

Edit: As the @wordpress/scripts package is not part of this patch the above can now be ignored

Last edited 4 years ago by netweb (previous) (diff)

This ticket was mentioned in Slack in #core-editor by netweb. View the logs.


4 years ago

#4 @jorgefilipecosta
4 years ago

The description refers wordpress/scripts but it was a mistake wordpress/scripts is not being updated.

#5 @netweb
4 years ago

  • Component changed from Editor to Build/Test Tools

#6 @netweb
4 years ago

Are the additional changes in 49358.3.diff intended @jorgefilipecosta ?

#7 @netweb
4 years ago

  • Keywords blocked removed

#8 @jorgefilipecosta
4 years ago

Hi @netweb, during the package update the server logic of the blocks gets updated. The PHP changes are related to that and are intended.

#9 @jorgefilipecosta
4 years ago

  • Owner set to jorgefilipecosta
  • Resolution set to fixed
  • Status changed from new to closed

In 47199:

Block Editor: Update WordPress Packages.

The following package versions were changed:
@wordpress/a11y: 2.6.0 -> 2.7.0
@wordpress/annotations: 1.10.0 -> 1.11.0
@wordpress/api-fetch: 3.9.0 -> 3.10.0
@wordpress/autop: 2.5.1 -> 2.6.0
@wordpress/blob: 2.6.0 -> 2.7.0
@wordpress/block-directory: 1.3.0 -> 1.4.0
@wordpress/block-editor: 3.5.0 -> 3.6.0
@wordpress/block-library: 2.12.0 -> 2.13.0
@wordpress/block-serialization-default-parser: 3.4.1 -> 3.5.0
@wordpress/blocks: 6.10.0 -> 6.11.0
@wordpress/components: 9.0.0 -> 9.1.0
@wordpress/compose: 3.10.0 -> 3.11.0
@wordpress/core-data: 2.10.0 -> 2.11.0
@wordpress/custom-templated-path-webpack-plugin: 1.5.0 -> 1.6.0
@wordpress/data: 4.12.0 -> 4.13.0
@wordpress/data-controls: 1.6.0 -> 1.7.0
@wordpress/date: 3.7.0 -> 3.8.0
@wordpress/dependency-extraction-webpack-plugin: 2.1.0 -> 2.2.0
@wordpress/deprecated: 2.6.1 -> 2.7.0
@wordpress/dom: 2.7.0 -> 2.8.0
@wordpress/dom-ready: 2.6.0 -> 2.7.0
@wordpress/e2e-test-utils: 4.1.0 -> 4.2.0
@wordpress/edit-post: 3.11.0 -> 3.12.0
@wordpress/editor: 9.10.0 -> 9.11.0
@wordpress/element: 2.10.0 -> 2.11.0
@wordpress/escape-html: 1.6.0 -> 1.7.0
@wordpress/format-library: 1.12.0 -> 1.13.0
@wordpress/hooks: 2.6.0 -> 2.7.0
@wordpress/html-entities: 2.5.0 -> 2.6.0
@wordpress/i18n: 3.8.0 -> 3.9.0
@wordpress/is-shallow-equal: 1.7.0 -> 1.8.0
@wordpress/keyboard-shortcuts: 0.2.0 -> 1.0.0
@wordpress/keycodes: 2.8.0 -> 2.9.0
@wordpress/library-export-default-webpack-plugin: 1.5.0 -> 1.6.0
@wordpress/list-reusable-blocks: 1.11.0 -> 1.12.0
@wordpress/media-utils: 1.5.0 -> 1.6.0
@wordpress/notices: 1.11.0 -> 1.12.0
@wordpress/nux: 3.10.0 -> 3.11.0
@wordpress/plugins: 2.10.0 -> 2.11.0
@wordpress/priority-queue: 1.4.0 -> 1.5.0
@wordpress/redux-routine: 3.6.2 -> 3.7.0
@wordpress/rich-text: 3.10.0 -> 3.11.0
@wordpress/scripts: 6.2.0 -> 7.0.0
@wordpress/server-side-render: 1.6.0 -> 1.7.0
@wordpress/shortcode: 2.5.0 -> 2.6.0
@wordpress/token-list: 1.8.0 -> 1.9.0
@wordpress/url: 2.9.0 -> 2.10.0
@wordpress/viewport: 2.11.0 -> 2.12.0
@wordpress/wordcount: 2.6.2 -> 2.7.0
Added these new packages:
@wordpress/warning
@wordpress/primitives
@wordpress/icons
Re-added keyboard-shortcuts to script loader removed by mistake on revision 47198.

Props gziolo, itsjonq, youknowriad, mcsf, andraganescu.
Fixes #49358.

#10 @gziolo
4 years ago

You included @wordpress/scripts: 6.2.0 -> 7.0.0 in the description of the commit but it wasn't included. Noting to ensure that everything went well.

There is still one thing that needs to be improved on Gutenberg side:

gutenberg_remove_empty_navigation_links_recursive - this name of the function in Navigation block is problematic, as it will fatal in the plugin after release. It should have gutenberg_ prefix removed. In general, all the names of functions used should be prefixed with something common, maybe block_core_navigation_?

To avoid function redeclaration in the Gutenberg plugin, there is Webpack task that prepends all PHP functions with gutenberg_:
https://github.com/WordPress/gutenberg/blob/c605373f3e845da983193d2fa649d9a3cf777de8/webpack.config.js#L145-L179

Looking at it a bit more, it might work I have to double-check if the function would be renamed to:
gutenberg_gutenberg_remove_empty_navigation_links_recursive
Still, the issue remains valid in general. @aduth do you have some recommendations?

#11 @gziolo
4 years ago

I found: https://github.com/WordPress/gutenberg/pull/20039. Ignore my previous comment. Implementation is nearly identical to what I shared. Cheers @TimothyBlynJacobs :)

#12 @aduth
4 years ago

Added these new packages:
@wordpress/warning

I believe this package needs to be included in this set:

https://github.com/WordPress/wordpress-develop/blob/f97a60c9b/tools/webpack/packages.js#L215-L223

Matching the equivalent Gutenberg configuration:

https://github.com/WordPress/gutenberg/blob/59d7463/webpack.config.js#L97-L108

This makes it so that the default export is available at wp.warning. Otherwise (and as currently implemented), it can only be called via wp.warning.default( '...' );, which is not desirable. I've not confirmed, but it might also cause errors for code which depends on this, if that code defines an external of @wordpress/warning to wp.warning.

#13 @gziolo
4 years ago

Good call @aduth. I totally forgot about it. We need to find a better way to handle those exceptions.

This ticket was mentioned in Slack in #core-js by gziolo. View the logs.


4 years ago

#15 @desrosj
4 years ago

  • Milestone changed from Awaiting Review to 5.4
Note: See TracTickets for help on using tickets.