Block Editor: Update @wordpress package dependencies.

Update packages include:

- block-library
- components
- edit-post
- editor
- format-library
- list-reusable-blocks
- nux

Other changes:

- Fix a translator comment in `edit-form-blocks.php`.
- Rename the `gutenberg_` functions in `blocks/latest-comments.php`.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.

git-svn-id: https://develop.svn.wordpress.org/trunk@44273 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2018-12-17 19:05:30 +00:00
parent 5c6cc0f6ce
commit 9d85e5050d
10 changed files with 82 additions and 79 deletions

78
package-lock.json generated
View File

@ -286,20 +286,20 @@
}
},
"@wordpress/block-library": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-2.2.6.tgz",
"integrity": "sha512-HCRqGzGqeU36tUp26ml+2o8SXCB/gkvzJyeIKX4IGHKjONjxZim/0ht7KoyCEjup/cxNNP8NZ6BQaI3oi6P6JA==",
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-2.2.8.tgz",
"integrity": "sha512-86DiBPFQwGDWf/s4OwmTp2q+VoeNhmW1OQXu/on+c5MHgJh7W2uFasO4bhmz31+U9KwAFHQr3pCcxaasdP17vQ==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/autop": "^2.0.2",
"@wordpress/blob": "^2.1.0",
"@wordpress/blocks": "^6.0.2",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/core-data": "^2.0.14",
"@wordpress/data": "^4.0.1",
"@wordpress/deprecated": "^2.0.3",
"@wordpress/editor": "^9.0.1",
"@wordpress/editor": "^9.0.3",
"@wordpress/element": "^2.1.8",
"@wordpress/html-entities": "^2.0.3",
"@wordpress/i18n": "^3.1.0",
@ -362,9 +362,9 @@
}
},
"@wordpress/components": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-7.0.1.tgz",
"integrity": "sha512-6Efciw+CwFa0b51bLZUNWv0C2p5j8VIVb6vAHB/ghwD0BkNHZ0N4JBafOIB+6toAtmLzC+SONfHNmFNJHibZ+Q==",
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-7.0.3.tgz",
"integrity": "sha512-7TgmhXz8+KRknFNYe+AYHpq3EreB40OZWEYzXF5tSJdjC6wElrDMKqRCGgWdTlpgZ/09g2cDo7a+GJ8iQTm9ig==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/a11y": "^2.0.2",
@ -483,26 +483,26 @@
}
},
"@wordpress/edit-post": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-3.1.1.tgz",
"integrity": "sha512-sjGNSTBh6xKZUtpskkc1Hx0y+iqcfOyX+i09I+zrRyoelHvw/0nZ9iHvN34lTszAgPOx9vjy8nHc8obH0gr8AA==",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-3.1.3.tgz",
"integrity": "sha512-bA9OIkzInCLvf2YB4b6H0Ubghmv+AjOrCpZcp/5sdWLAg7hE6ZzZZ5Pz/2o5bBd+mTkalALJFMxgy7DKvH3WgQ==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/a11y": "^2.0.2",
"@wordpress/api-fetch": "^2.2.5",
"@wordpress/block-library": "^2.2.6",
"@wordpress/block-library": "^2.2.8",
"@wordpress/blocks": "^6.0.2",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/core-data": "^2.0.14",
"@wordpress/data": "^4.0.1",
"@wordpress/editor": "^9.0.1",
"@wordpress/editor": "^9.0.3",
"@wordpress/element": "^2.1.8",
"@wordpress/format-library": "^1.2.4",
"@wordpress/format-library": "^1.2.6",
"@wordpress/hooks": "^2.0.3",
"@wordpress/i18n": "^3.1.0",
"@wordpress/keycodes": "^2.0.5",
"@wordpress/nux": "^3.0.2",
"@wordpress/nux": "^3.0.4",
"@wordpress/plugins": "^2.0.9",
"@wordpress/url": "^2.3.1",
"@wordpress/viewport": "^2.0.12",
@ -512,16 +512,16 @@
}
},
"@wordpress/editor": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-9.0.1.tgz",
"integrity": "sha512-ZhihGx9huZkJfKRM5dlzesmjoC0Tcl7LwdMC4UXjQSey7blriRGrEMUdhLikbqdLuK1/tVNA2HHIlHUaRBAMMA==",
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-9.0.3.tgz",
"integrity": "sha512-Iz2B2JccsluiV0CdIkeH7sdl+3JcM7u9OqQSRC+0G2gfq8c09c98BE9myRUN16EVvL6zf025DzRU3hSx9r3AbQ==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/a11y": "^2.0.2",
"@wordpress/api-fetch": "^2.2.5",
"@wordpress/blob": "^2.1.0",
"@wordpress/blocks": "^6.0.2",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/core-data": "^2.0.14",
"@wordpress/data": "^4.0.1",
@ -535,7 +535,7 @@
"@wordpress/is-shallow-equal": "^1.1.4",
"@wordpress/keycodes": "^2.0.5",
"@wordpress/notices": "^1.1.0",
"@wordpress/nux": "^3.0.2",
"@wordpress/nux": "^3.0.4",
"@wordpress/token-list": "^1.1.0",
"@wordpress/url": "^2.3.1",
"@wordpress/viewport": "^2.0.12",
@ -617,14 +617,14 @@
}
},
"@wordpress/format-library": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-1.2.4.tgz",
"integrity": "sha512-zHkYSu01Qpzc0UNAYTe/X39tzCv3ANPeQpdEGKyPOjhNoUi7qYh26Yheas4gWrx2pOs4tG3DfGDbFMIvgPiwZw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-1.2.6.tgz",
"integrity": "sha512-8GkrMRSZ287qotsYzJh0kzDRjDAYJLicwbSRSv4AR2+4dSW6ZX1CK2jt/ihxg5cbqxMitPPTqRA0PmUk+AtdDA==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/dom": "^2.0.7",
"@wordpress/editor": "^9.0.1",
"@wordpress/editor": "^9.0.3",
"@wordpress/element": "^2.1.8",
"@wordpress/i18n": "^3.1.0",
"@wordpress/keycodes": "^2.0.5",
@ -698,13 +698,13 @@
}
},
"@wordpress/list-reusable-blocks": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-1.1.14.tgz",
"integrity": "sha512-dRoxJHTClp6tQ5w4RjrLaJTdTkI0tU9do4gz3MNcTi6C/UAE/s/kc5pr6bEmm2hNHsLLhRQPExrNPwh98S7KaA==",
"version": "1.1.16",
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-1.1.16.tgz",
"integrity": "sha512-kkamXKC6lp7ZddFt+VPOaiTftXfldU6qiRNab9JU9BXBD0XmyWl1Ee24RjQtO9ILA8UK9OpYsYCAMP/LSA1Cgg==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/api-fetch": "^2.2.5",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/element": "^2.1.8",
"@wordpress/i18n": "^3.1.0",
@ -723,12 +723,12 @@
}
},
"@wordpress/nux": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-3.0.2.tgz",
"integrity": "sha512-La82tFww/UzWjywaFODvZ8YODvDK4GeX8ckkaP1zFk0UelkS8gRZdaWDfkEsBzbKHyhZj3JJGT1WrM1/JJYKFw==",
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-3.0.4.tgz",
"integrity": "sha512-0GjMmEI8GM/lbRLAxPel6fMjf5rbEB9wGRzVr1dDD7Ak6CfgVfasK/B9UMgngcO0sbCCXkHopjd8QQhUobffPg==",
"requires": {
"@babel/runtime": "^7.0.0",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/data": "^4.0.1",
"@wordpress/element": "^2.1.8",
@ -11599,6 +11599,14 @@
"async": "^1.5.2",
"debug": "^2.2.0",
"mkdirp": "0.5.x"
},
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
"dev": true
}
}
},
"posix-character-classes": {
@ -12992,7 +13000,7 @@
},
"regjsgen": {
"version": "0.2.0",
"resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc="
},
"regjsparser": {

View File

@ -60,10 +60,10 @@
"@wordpress/api-fetch": "^2.2.5",
"@wordpress/autop": "^2.0.2",
"@wordpress/blob": "^2.1.0",
"@wordpress/block-library": "^2.2.6",
"@wordpress/block-library": "^2.2.8",
"@wordpress/block-serialization-default-parser": "^2.0.0",
"@wordpress/blocks": "^6.0.2",
"@wordpress/components": "^7.0.1",
"@wordpress/components": "^7.0.3",
"@wordpress/compose": "^3.0.0",
"@wordpress/core-data": "^2.0.14",
"@wordpress/data": "^4.0.1",
@ -71,19 +71,19 @@
"@wordpress/deprecated": "^2.0.3",
"@wordpress/dom": "^2.0.7",
"@wordpress/dom-ready": "^2.0.2",
"@wordpress/edit-post": "^3.1.1",
"@wordpress/editor": "^9.0.1",
"@wordpress/edit-post": "^3.1.3",
"@wordpress/editor": "^9.0.3",
"@wordpress/element": "^2.1.8",
"@wordpress/escape-html": "^1.0.1",
"@wordpress/format-library": "^1.2.4",
"@wordpress/format-library": "^1.2.6",
"@wordpress/hooks": "^2.0.3",
"@wordpress/html-entities": "^2.0.3",
"@wordpress/i18n": "^3.1.0",
"@wordpress/is-shallow-equal": "^1.1.4",
"@wordpress/keycodes": "^2.0.5",
"@wordpress/list-reusable-blocks": "^1.1.14",
"@wordpress/list-reusable-blocks": "^1.1.16",
"@wordpress/notices": "^1.1.0",
"@wordpress/nux": "^3.0.2",
"@wordpress/nux": "^3.0.4",
"@wordpress/plugins": "^2.0.9",
"@wordpress/redux-routine": "^3.0.3",
"@wordpress/rich-text": "^3.0.2",

View File

@ -178,10 +178,7 @@ $styles = array(
),
);
/*
* Set a locale specific default font.
* Translators: Use this to specify the CSS font family for the default font
*/
/* Translators: Use this to specify the CSS font family for the default font */
$locale_font_family = esc_html_x( 'Noto Serif', 'CSS Font Family for Editor Font' );
$styles[] = array(
'css' => "body { font-family: '$locale_font_family' }",

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/archives` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -32,7 +32,7 @@ function render_block_core_archives( $attributes ) {
$class .= ' wp-block-archives-dropdown';
$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
$title = __( 'Archives', 'default' );
$title = __( 'Archives' );
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$dropdown_args = apply_filters(
@ -50,19 +50,19 @@ function render_block_core_archives( $attributes ) {
switch ( $dropdown_args['type'] ) {
case 'yearly':
$label = __( 'Select Year', 'default' );
$label = __( 'Select Year' );
break;
case 'monthly':
$label = __( 'Select Month', 'default' );
$label = __( 'Select Month' );
break;
case 'daily':
$label = __( 'Select Day', 'default' );
$label = __( 'Select Day' );
break;
case 'weekly':
$label = __( 'Select Week', 'default' );
$label = __( 'Select Week' );
break;
default:
$label = __( 'Select Post', 'default' );
$label = __( 'Select Post' );
break;
}
@ -101,7 +101,7 @@ function render_block_core_archives( $attributes ) {
$block_content = sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No archives to show.', 'default' )
__( 'No archives to show.' )
);
} else {

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/block` block.
*
* @package gutenberg
* @package WordPress
*/
/**

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/categories` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -27,7 +27,7 @@ function render_block_core_categories( $attributes ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category', 'default' );
$args['show_option_none'] = __( 'Select Category' );
$wrapper_markup = '<div class="%1$s">%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';

View File

@ -2,10 +2,10 @@
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package gutenberg
* @package WordPress
*/
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
if ( ! function_exists( 'wp_latest_comments_draft_or_post_title' ) ) {
/**
* Get the post title.
*
@ -26,10 +26,10 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set.
*/
function gutenberg_draft_or_post_title( $post = 0 ) {
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)', 'default' );
$title = __( '(no title)' );
}
return esc_html( $title );
}
@ -42,7 +42,7 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
*
* @return string Returns the post content with latest comments added.
*/
function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
@ -94,11 +94,11 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s', 'default' ),
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
@ -143,7 +143,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.', 'default' )
__( 'No comments to show.' )
);
return $block_content;
@ -179,6 +179,6 @@ register_block_type(
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'gutenberg_render_block_core_latest_comments',
'render_callback' => 'render_block_core_latest_comments',
)
);

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/latest-posts` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -21,7 +21,7 @@ function render_block_core_latest_posts( $attributes ) {
);
if ( isset( $attributes['categories'] ) ) {
$args['categories'] = $attributes['categories'];
$args['category'] = $attributes['categories'];
}
$recent_posts = wp_get_recent_posts( $args );
@ -33,7 +33,7 @@ function render_block_core_latest_posts( $attributes ) {
$title = get_the_title( $post_id );
if ( ! $title ) {
$title = __( '(Untitled)', 'default' );
$title = __( '(Untitled)' );
}
$list_items_markup .= sprintf(
'<li><a href="%1$s">%2$s</a>',

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/shortcode` block.
*
* @package gutenberg
* @package WordPress
*/
/**

View File

@ -210,13 +210,12 @@ function wp_default_packages_scripts( &$scripts ) {
'api-fetch' => '2.2.5',
'a11y' => '2.0.2',
'annotations' => '1.0.3',
'api-fetch' => '2.2.5',
'autop' => '2.0.2',
'blob' => '2.1.0',
'block-library' => '2.2.6',
'block-library' => '2.2.8',
'block-serialization-default-parser' => '2.0.0',
'blocks' => '6.0.2',
'components' => '7.0.1',
'components' => '7.0.3',
'compose' => '3.0.0',
'core-data' => '2.0.14',
'data' => '4.0.1',
@ -224,19 +223,19 @@ function wp_default_packages_scripts( &$scripts ) {
'deprecated' => '2.0.3',
'dom' => '2.0.7',
'dom-ready' => '2.0.2',
'edit-post' => '3.1.1',
'editor' => '9.0.1',
'edit-post' => '3.1.3',
'editor' => '9.0.3',
'element' => '2.1.8',
'escape-html' => '1.0.1',
'format-library' => '1.2.4',
'format-library' => '1.2.6',
'hooks' => '2.0.3',
'html-entities' => '2.0.3',
'i18n' => '3.1.0',
'is-shallow-equal' => '1.1.4',
'keycodes' => '2.0.5',
'list-reusable-blocks' => '1.1.14',
'list-reusable-blocks' => '1.1.16',
'notices' => '1.1.0',
'nux' => '3.0.2',
'nux' => '3.0.4',
'plugins' => '2.0.9',
'redux-routine' => '3.0.3',
'rich-text' => '3.0.2',
@ -277,7 +276,6 @@ function wp_default_packages_scripts( &$scripts ) {
'block-library' => array(
'editor',
'lodash',
'moment',
'wp-api-fetch',
'wp-autop',
'wp-blob',