Build Tools: Update the @wordpress/* packages.

Merges [43801,43803] from the 5.0 branch to trunk.

See #45145.



git-svn-id: https://develop.svn.wordpress.org/trunk@44163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2018-12-14 04:42:55 +00:00
parent a8f4e58e75
commit dc6b225023
6 changed files with 278 additions and 1283 deletions

1381
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,8 +13,8 @@
"author": "The WordPress Contributors", "author": "The WordPress Contributors",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"devDependencies": { "devDependencies": {
"@wordpress/custom-templated-path-webpack-plugin": "^1.1.5", "@wordpress/custom-templated-path-webpack-plugin": "1.1.5",
"@wordpress/library-export-default-webpack-plugin": "^1.0.4", "@wordpress/library-export-default-webpack-plugin": "1.0.4",
"autoprefixer": "^9.1.5", "autoprefixer": "^9.1.5",
"check-node-version": "3.2.0", "check-node-version": "3.2.0",
"copy-webpack-plugin": "^4.5.2", "copy-webpack-plugin": "^4.5.2",
@ -54,40 +54,40 @@
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.0.0", "@babel/polyfill": "^7.0.0",
"@wordpress/a11y": "^2.0.2", "@wordpress/a11y": "2.0.2",
"@wordpress/api-fetch": "^2.0.2", "@wordpress/api-fetch": "2.1.0",
"@wordpress/autop": "^2.0.2", "@wordpress/autop": "2.0.2",
"@wordpress/blob": "^2.0.2", "@wordpress/blob": "2.1.0",
"@wordpress/block-library": "2.1.0", "@wordpress/block-library": "2.1.4",
"@wordpress/block-serialization-default-parser": "^1.0.1", "@wordpress/block-serialization-default-parser": "1.0.1",
"@wordpress/blocks": "^4.0.1", "@wordpress/blocks": "4.0.4",
"@wordpress/components": "^4.1.0", "@wordpress/components": "4.2.1",
"@wordpress/compose": "^2.0.2", "@wordpress/compose": "2.0.5",
"@wordpress/core-data": "^2.0.2", "@wordpress/core-data": "2.0.6",
"@wordpress/data": "^2.1.1", "@wordpress/data": "2.1.4",
"@wordpress/date": "^2.0.2", "@wordpress/date": "2.0.3",
"@wordpress/deprecated": "^2.0.2", "@wordpress/deprecated": "2.0.2",
"@wordpress/dom": "^2.0.2", "@wordpress/dom": "2.0.4",
"@wordpress/dom-ready": "^2.0.2", "@wordpress/dom-ready": "2.0.2",
"@wordpress/edit-post": "1.0.0", "@wordpress/edit-post": "1.0.4",
"@wordpress/editor": "^4.0.1", "@wordpress/editor": "5.0.1",
"@wordpress/element": "^2.1.1", "@wordpress/element": "2.1.4",
"@wordpress/escape-html": "^1.0.0-beta.1", "@wordpress/escape-html": "1.0.1",
"@wordpress/hooks": "^2.0.2", "@wordpress/hooks": "2.0.2",
"@wordpress/html-entities": "^2.0.2", "@wordpress/html-entities": "2.0.2",
"@wordpress/i18n": "^3.0.1", "@wordpress/i18n": "3.0.1",
"@wordpress/is-shallow-equal": "^1.1.4", "@wordpress/is-shallow-equal": "1.1.4",
"@wordpress/keycodes": "^2.0.2", "@wordpress/keycodes": "2.0.2",
"@wordpress/list-reusable-blocks": "^1.1.0", "@wordpress/list-reusable-blocks": "1.1.4",
"@wordpress/nux": "^2.0.1", "@wordpress/nux": "2.0.6",
"@wordpress/plugins": "^2.0.2", "@wordpress/plugins": "2.0.5",
"@wordpress/redux-routine": "^3.0.1", "@wordpress/redux-routine": "3.0.3",
"@wordpress/rich-text": "^1.0.0-beta.1", "@wordpress/rich-text": "1.0.1",
"@wordpress/shortcode": "^2.0.2", "@wordpress/shortcode": "2.0.2",
"@wordpress/token-list": "^1.0.2", "@wordpress/token-list": "1.0.2",
"@wordpress/url": "^2.0.2", "@wordpress/url": "2.1.0",
"@wordpress/viewport": "^2.0.2", "@wordpress/viewport": "2.0.5",
"@wordpress/wordcount": "^2.0.2", "@wordpress/wordcount": "2.0.2",
"backbone": "1.3.3", "backbone": "1.3.3",
"element-closest": "^2.0.2", "element-closest": "^2.0.2",
"formdata-polyfill": "^3.0.12", "formdata-polyfill": "^3.0.12",

View File

@ -16,11 +16,6 @@ function render_block_core_categories( $attributes ) {
static $block_id = 0; static $block_id = 0;
$block_id++; $block_id++;
$align = 'center';
if ( isset( $attributes['align'] ) && in_array( $attributes['align'], array( 'left', 'right', 'full' ), true ) ) {
$align = $attributes['align'];
}
$args = array( $args = array(
'echo' => false, 'echo' => false,
'hierarchical' => ! empty( $attributes['showHierarchy'] ), 'hierarchical' => ! empty( $attributes['showHierarchy'] ),
@ -46,10 +41,14 @@ function render_block_core_categories( $attributes ) {
$type = 'list'; $type = 'list';
} }
$class = "wp-block-categories wp-block-categories-{$type} align{$align}"; $class = "wp-block-categories wp-block-categories-{$type}";
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( isset( $attributes['className'] ) ) { if ( isset( $attributes['className'] ) ) {
$class .= ' ' . $attributes['className']; $class .= " {$attributes['className']}";
} }
$block_content = sprintf( $block_content = sprintf(

View File

@ -5,6 +5,7 @@
* @package gutenberg * @package gutenberg
*/ */
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
/** /**
* Get the post title. * Get the post title.
* *
@ -32,6 +33,7 @@ function gutenberg_draft_or_post_title( $post = 0 ) {
} }
return esc_html( $title ); return esc_html( $title );
} }
}
/** /**
* Renders the `core/latest-comments` block on server. * Renders the `core/latest-comments` block on server.

View File

@ -166,7 +166,7 @@ function wp_default_packages_scripts( &$scripts ) {
$suffix = wp_scripts_get_suffix(); $suffix = wp_scripts_get_suffix();
$packages_dependencies = array( $packages_dependencies = array(
'api-fetch' => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n' ), 'api-fetch' => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n', 'wp-url' ),
'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ), 'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ),
'autop' => array( 'wp-polyfill' ), 'autop' => array( 'wp-polyfill' ),
'blob' => array( 'wp-polyfill' ), 'blob' => array( 'wp-polyfill' ),
@ -962,12 +962,14 @@ function wp_default_scripts( &$scripts ) {
'mejs.fullscreen-on' => __( 'Go Fullscreen' ), 'mejs.fullscreen-on' => __( 'Go Fullscreen' ),
'mejs.download-video' => __( 'Download Video' ), 'mejs.download-video' => __( 'Download Video' ),
'mejs.fullscreen' => __( 'Fullscreen' ), 'mejs.fullscreen' => __( 'Fullscreen' ),
'mejs.time-jump-forward' => array( __( 'Jump forward 1 second' ), __( 'Jump forward %1 seconds' ) ),
'mejs.loop' => __( 'Toggle Loop' ), 'mejs.loop' => __( 'Toggle Loop' ),
'mejs.play' => __( 'Play' ), 'mejs.play' => __( 'Play' ),
'mejs.pause' => __( 'Pause' ), 'mejs.pause' => __( 'Pause' ),
'mejs.close' => __( 'Close' ), 'mejs.close' => __( 'Close' ),
'mejs.time-slider' => __( 'Time Slider' ), 'mejs.time-slider' => __( 'Time Slider' ),
'mejs.time-help-text' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ), 'mejs.time-help-text' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
'mejs.time-skip-back' => array( __( 'Skip back 1 second' ), __( 'Skip back %1 seconds' ) ),
'mejs.captions-subtitles' => __( 'Captions/Subtitles' ), 'mejs.captions-subtitles' => __( 'Captions/Subtitles' ),
'mejs.captions-chapters' => __( 'Chapters' ), 'mejs.captions-chapters' => __( 'Chapters' ),
'mejs.none' => __( 'None' ), 'mejs.none' => __( 'None' ),
@ -979,6 +981,7 @@ function wp_default_scripts( &$scripts ) {
'mejs.video-player' => __( 'Video Player' ), 'mejs.video-player' => __( 'Video Player' ),
'mejs.audio-player' => __( 'Audio Player' ), 'mejs.audio-player' => __( 'Audio Player' ),
'mejs.ad-skip' => __( 'Skip ad' ), 'mejs.ad-skip' => __( 'Skip ad' ),
'mejs.ad-skip-info' => array( __( 'Skip in 1 second' ), __( 'Skip in %1 seconds' ) ),
'mejs.source-chooser' => __( 'Source Chooser' ), 'mejs.source-chooser' => __( 'Source Chooser' ),
'mejs.stop' => __( 'Stop' ), 'mejs.stop' => __( 'Stop' ),
'mejs.speed-rate' => __( 'Speed Rate' ), 'mejs.speed-rate' => __( 'Speed Rate' ),
@ -1067,8 +1070,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.js', array(), '5.29.1-alpha-ee20357' ); $scripts->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.js', array(), '5.29.1-alpha-ee20357' );
$scripts->add( 'csslint', '/wp-includes/js/codemirror/csslint.js', array(), '1.0.5' ); $scripts->add( 'csslint', '/wp-includes/js/codemirror/csslint.js', array(), '1.0.5' );
$scripts->add( 'jshint', '/wp-includes/js/codemirror/fakejshint.js', array( 'esprima' ), '2.9.5' ); $scripts->add( 'jshint', '/wp-includes/js/codemirror/jshint.js', array(), '2.9.5.999' );
$scripts->add( 'esprima', '/wp-includes/js/codemirror/esprima.js', array(), '4.0.0' );
$scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' ); $scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' );
$scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' ); $scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' );
$scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) ); $scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) );
@ -1335,17 +1337,6 @@ function wp_default_scripts( &$scripts ) {
'termSelected' => __( 'Term selected.' ), 'termSelected' => __( 'Term selected.' ),
'termAdded' => __( 'Term added.' ), 'termAdded' => __( 'Term added.' ),
'termRemoved' => __( 'Term removed.' ), 'termRemoved' => __( 'Term removed.' ),
'restURL' => rest_url( '/wp/v2/tags' ),
/**
* Filters the minimum number of characters required to fire a tag search via Ajax.
*
* Previous to 5.0.0, this filter passed taxonomy and search context parameters.
* @since 4.0.0
*
* @param int $characters The minimum number of characters required. Default 2.
*/
'minChars' => (int) apply_filters( 'term_search_min_chars', 2 ),
) )
); );
@ -1398,7 +1389,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-a11y' ), false, 1 ); $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 );
did_action( 'init' ) && $scripts->add_inline_script( did_action( 'init' ) && $scripts->add_inline_script(
'admin-widgets', 'admin-widgets',
sprintf( sprintf(
@ -1408,7 +1399,6 @@ function wp_default_scripts( &$scripts ) {
'save' => __( 'Save' ), 'save' => __( 'Save' ),
'saved' => __( 'Saved' ), 'saved' => __( 'Saved' ),
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
'widgetAdded' => __( 'Widget has been added to the selected sidebar' ),
) )
) )
) )
@ -2416,74 +2406,3 @@ function script_concat_settings() {
} }
} }
} }
/**
* Handles the enqueueing of block scripts and styles that are common to both
* the editor and the front-end.
*
* @since 5.0.0
*
* @global WP_Screen $current_screen
*/
function wp_common_block_scripts_and_styles() {
global $current_screen;
if ( is_admin() && ! $current_screen->is_block_editor() ) {
return;
}
wp_enqueue_style( 'wp-block-library' );
if ( current_theme_supports( 'wp-block-styles' ) ) {
wp_enqueue_style( 'wp-block-library-theme' );
}
/**
* Fires after enqueuing block assets for both editor and front-end.
*
* Call `add_action` on any hook before 'wp_enqueue_scripts'.
*
* In the function call you supply, simply use `wp_enqueue_script` and
* `wp_enqueue_style` to add your functionality to the Gutenberg editor.
*
* @since 5.0.0
*/
do_action( 'enqueue_block_assets' );
}
/**
* Enqueues registered block scripts and styles, depending on current rendered
* context (only enqueuing editor scripts while in context of the editor).
*
* @since 5.0.0
*
* @global WP_Screen $current_screen
*/
function wp_enqueue_registered_block_scripts_and_styles() {
global $current_screen;
$is_editor = ( is_admin() && $current_screen->is_block_editor() );
$block_registry = WP_Block_Type_Registry::get_instance();
foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
// Front-end styles.
if ( ! empty( $block_type->style ) ) {
wp_enqueue_style( $block_type->style );
}
// Front-end script.
if ( ! empty( $block_type->script ) ) {
wp_enqueue_script( $block_type->script );
}
// Editor styles.
if ( $is_editor && ! empty( $block_type->editor_style ) ) {
wp_enqueue_style( $block_type->editor_style );
}
// Editor script.
if ( $is_editor && ! empty( $block_type->editor_script ) ) {
wp_enqueue_script( $block_type->editor_script );
}
}
}

View File

@ -1 +1 @@
<ul class="wp-block-categories wp-block-categories-list aligncenter"><li class="cat-item-none">No categories</li></ul> <ul class="wp-block-categories wp-block-categories-list"><li class="cat-item-none">No categories</li></ul>