Skip to content

Commit

Permalink
Build Tools: Upgrade @wordpress packages to the latest version.
Browse files Browse the repository at this point in the history
This also includes the new `@wordpress/format-library` and `@wordpress/notices` packages.

`package-lock.json` has been completely regenerated in this commit.

See #45145.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43840 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
pento committed Oct 29, 2018
1 parent b2bd399 commit f578821
Show file tree
Hide file tree
Showing 8 changed files with 15,320 additions and 15,749 deletions.
30,965 changes: 15,244 additions & 15,721 deletions package-lock.json

Large diffs are not rendered by default.

44 changes: 23 additions & 21 deletions package.json
Expand Up @@ -51,39 +51,41 @@
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@wordpress/a11y": "^2.0.2",
"@wordpress/api-fetch": "^2.1.0",
"@wordpress/api-fetch": "^2.2.0",
"@wordpress/autop": "^2.0.2",
"@wordpress/blob": "^2.1.0",
"@wordpress/block-library": "^2.1.4",
"@wordpress/block-library": "^2.1.5",
"@wordpress/block-serialization-default-parser": "^1.0.1",
"@wordpress/blocks": "^4.0.4",
"@wordpress/components": "^4.2.1",
"@wordpress/compose": "^2.0.5",
"@wordpress/core-data": "^2.0.6",
"@wordpress/data": "^2.1.4",
"@wordpress/date": "^2.0.3",
"@wordpress/deprecated": "^2.0.2",
"@wordpress/blocks": "^5.0.0",
"@wordpress/components": "^5.0.0",
"@wordpress/compose": "^2.1.0",
"@wordpress/core-data": "^2.0.7",
"@wordpress/data": "^3.0.0",
"@wordpress/date": "^2.1.0",
"@wordpress/deprecated": "^2.0.3",
"@wordpress/dom": "^2.0.4",
"@wordpress/dom-ready": "^2.0.2",
"@wordpress/edit-post": "^1.0.4",
"@wordpress/editor": "^5.0.1",
"@wordpress/element": "^2.1.4",
"@wordpress/edit-post": "^2.0.0",
"@wordpress/editor": "^6.0.0",
"@wordpress/element": "^2.1.5",
"@wordpress/escape-html": "^1.0.1",
"@wordpress/hooks": "^2.0.2",
"@wordpress/format-library": "^1.0.0",
"@wordpress/hooks": "^2.0.3",
"@wordpress/html-entities": "^2.0.2",
"@wordpress/i18n": "^3.0.1",
"@wordpress/is-shallow-equal": "^1.1.4",
"@wordpress/keycodes": "^2.0.2",
"@wordpress/list-reusable-blocks": "^1.1.4",
"@wordpress/nux": "^2.0.6",
"@wordpress/plugins": "^2.0.5",
"@wordpress/list-reusable-blocks": "^1.1.5",
"@wordpress/notices": "^1.0.0",
"@wordpress/nux": "^2.0.7",
"@wordpress/plugins": "^2.0.6",
"@wordpress/redux-routine": "^3.0.3",
"@wordpress/rich-text": "^1.0.1",
"@wordpress/rich-text": "^1.0.2",
"@wordpress/shortcode": "^2.0.2",
"@wordpress/token-list": "^1.0.2",
"@wordpress/url": "^2.1.0",
"@wordpress/viewport": "^2.0.5",
"@wordpress/wordcount": "^2.0.2",
"@wordpress/url": "^2.2.0",
"@wordpress/viewport": "^2.0.6",
"@wordpress/wordcount": "^2.0.3",
"element-closest": "^2.0.2",
"formdata-polyfill": "^3.0.12",
"lodash": "^4.17.11",
Expand All @@ -93,7 +95,7 @@
"react-dom": "^16.5.2",
"whatwg-fetch": "^3.0.0"
},
"scripts":{
"scripts": {
"grunt": "grunt"
}
}
2 changes: 2 additions & 0 deletions src/wp-admin/edit-form-blocks.php
Expand Up @@ -37,6 +37,7 @@

wp_enqueue_script( 'heartbeat' );
wp_enqueue_script( 'wp-edit-post' );
wp_enqueue_script( 'wp-format-library' );

$rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;

Expand Down Expand Up @@ -355,6 +356,7 @@
* Styles
*/
wp_enqueue_style( 'wp-edit-post' );
wp_enqueue_style( 'wp-format-library' );

/**
* Fires after block assets have been enqueued for the editing interface.
Expand Down
6 changes: 6 additions & 0 deletions src/wp-admin/includes/post.php
Expand Up @@ -1958,26 +1958,32 @@ function get_block_categories( $post ) {
array(
'slug' => 'common',
'title' => __( 'Common Blocks' ),
'icon' => 'screenoptions',
),
array(
'slug' => 'formatting',
'title' => __( 'Formatting' ),
'icon' => null,
),
array(
'slug' => 'layout',
'title' => __( 'Layout Elements' ),
'icon' => null,
),
array(
'slug' => 'widgets',
'title' => __( 'Widgets' ),
'icon' => null,
),
array(
'slug' => 'embed',
'title' => __( 'Embeds' ),
'icon' => null,
),
array(
'slug' => 'reusable',
'title' => __( 'Reusable Blocks' ),
'icon' => null,
),
);

Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/archives.php
Expand Up @@ -29,6 +29,8 @@ function render_block_core_archives( $attributes ) {

if ( ! empty( $attributes['displayAsDropdown'] ) ) {

$class .= ' wp-block-archives-dropdown';

$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
$title = __( 'Archives', 'gutenberg' );

Expand Down Expand Up @@ -77,6 +79,8 @@ function render_block_core_archives( $attributes ) {
);
} else {

$class .= ' wp-block-archives-list';

/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$archives_args = apply_filters(
'widget_archives_args',
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/latest-posts.php
Expand Up @@ -62,6 +62,10 @@ function render_block_core_latest_posts( $attributes ) {
$class .= ' columns-' . $attributes['columns'];
}

if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
$class .= ' has-dates';
}

if ( isset( $attributes['className'] ) ) {
$class .= ' ' . $attributes['className'];
}
Expand Down
42 changes: 35 additions & 7 deletions src/wp-includes/script-loader.php
Expand Up @@ -175,7 +175,6 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-blob',
'wp-block-serialization-default-parser',
'wp-data',
'wp-deprecated',
'wp-dom',
'wp-element',
'wp-hooks',
Expand All @@ -184,7 +183,6 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-polyfill',
'wp-shortcode',
'lodash',
'wp-rich-text',
),
'block-library' => array(
'editor',
Expand Down Expand Up @@ -225,15 +223,20 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-is-shallow-equal',
'wp-keycodes',
'wp-polyfill',
'wp-url',
'wp-rich-text',
'wp-url',
),
'compose' => array(
'lodash',
'wp-deprecated',
'wp-element',
'wp-is-shallow-equal',
'wp-polyfill'
),
'compose' => array( 'lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill' ),
'core-data' => array( 'wp-data', 'wp-api-fetch', 'wp-polyfill', 'wp-url', 'lodash' ),
'data' => array(
'lodash',
'wp-compose',
'wp-deprecated',
'wp-element',
'wp-is-shallow-equal',
'wp-polyfill',
Expand Down Expand Up @@ -291,6 +294,7 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-i18n',
'wp-is-shallow-equal',
'wp-keycodes',
'wp-notices',
'wp-nux',
'wp-polyfill',
'wp-tinymce',
Expand All @@ -302,6 +306,17 @@ function wp_default_packages_scripts( &$scripts ) {
),
'element' => array( 'wp-polyfill', 'react', 'react-dom', 'lodash', 'wp-escape-html' ),
'escape-html' => array( 'wp-polyfill' ),
'format-library' => array(
'wp-components',
'wp-dom',
'wp-editor',
'wp-element',
'wp-i18n',
'wp-keycodes',
'wp-polyfill',
'wp-rich-text',
'wp-url',
),
'hooks' => array( 'wp-polyfill' ),
'html-entities' => array( 'wp-polyfill' ),
'i18n' => array( 'wp-polyfill' ),
Expand All @@ -316,18 +331,31 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-i18n',
'wp-polyfill',
),
'notices' => array(
'lodash',
'wp-a11y',
'wp-data',
'wp-polyfill-ecmascript',
),
'nux' => array(
'wp-element',
'wp-components',
'wp-compose',
'wp-data',
'wp-deprecated',
'wp-i18n',
'wp-polyfill',
'lodash',
),
'plugins' => array( 'lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill' ),
'redux-routine' => array( 'wp-polyfill' ),
'rich-text' => array( 'wp-polyfill', 'wp-escape-html', 'lodash' ),
'rich-text' => array(
'lodash',
'wp-blocks',
'wp-data',
'wp-escape-html',
'wp-polyfill',
),
'shortcode' => array( 'wp-polyfill', 'lodash' ),
'token-list' => array( 'lodash', 'wp-polyfill' ),
'url' => array( 'wp-polyfill' ),
Expand Down Expand Up @@ -380,7 +408,6 @@ function wp_default_packages_inline_scripts( &$scripts ) {
' var storageKey = "WP_DATA_USER_" + userId;',
' wp.data',
' .use( wp.data.plugins.persistence, { storageKey: storageKey } )',
' .use( wp.data.plugins.asyncGenerator )',
' .use( wp.data.plugins.controls );',
'} )()',
)
Expand Down Expand Up @@ -1632,6 +1659,7 @@ function wp_default_styles( &$styles ) {
'components' => array(),
'edit-post' => array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ),
'editor' => array( 'wp-components', 'wp-editor-font', 'wp-nux' ),
'format-library' => array(),
'list-reusable-blocks' => array( 'wp-components' ),
'nux' => array( 'wp-components' ),
);
Expand Down
2 changes: 2 additions & 0 deletions tools/webpack/packages.js
Expand Up @@ -74,12 +74,14 @@ module.exports = function( env = { environment: 'production', watch: false } ) {
'editor',
'element',
'escape-html',
'format-library',
'hooks',
'html-entities',
'i18n',
'is-shallow-equal',
'keycodes',
'list-reusable-blocks',
'notices',
'nux',
'plugins',
'redux-routine',
Expand Down

0 comments on commit f578821

Please sign in to comment.