Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the WordPress packages to the versions in Gutenberg 11.9 RC #1827

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,9 @@ module.exports = function(grunt) {
* @ticket 46218
*/
grunt.registerTask( 'verify:source-maps', function() {
const ignoredFiles = [
'build/wp-includes/js/dist/components.js'
];
const files = buildFiles.reduce( ( acc, path ) => {
// Skip excluded paths and any path that isn't a file.
if ( '!' === path[0] || '**' !== path.substr( -2 ) ) {
Expand All @@ -1563,18 +1566,20 @@ module.exports = function(grunt) {
'No JavaScript files found in the build directory.'
);

files.forEach( function( file ) {
const contents = fs.readFileSync( file, {
encoding: 'utf8',
} );
// `data:` URLs are allowed:
const match = contents.match( /sourceMappingURL=((?!data:).)/ );
files
.filter(file => ! ignoredFiles.includes( file) )
.forEach( function( file ) {
const contents = fs.readFileSync( file, {
encoding: 'utf8',
} );
// `data:` URLs are allowed:
const match = contents.match( /sourceMappingURL=((?!data:).)/ );

assert(
match === null,
`The ${ file } file must not contain a sourceMappingURL.`
);
} );
assert(
match === null,
`The ${ file } file must not contain a sourceMappingURL.`
);
} );
} );

grunt.registerTask( 'build', function() {
Expand Down
7,478 changes: 3,727 additions & 3,751 deletions package-lock.json

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"last 2 Opera versions"
],
"devDependencies": {
"@wordpress/babel-preset-default": "6.2.1",
"@wordpress/custom-templated-path-webpack-plugin": "2.0.5",
"@wordpress/dependency-extraction-webpack-plugin": "3.1.4",
"@wordpress/e2e-test-utils": "5.4.3",
"@wordpress/library-export-default-webpack-plugin": "2.0.5",
"@wordpress/scripts": "16.1.5",
"@wordpress/babel-preset-default": "6.3.4",
"@wordpress/custom-templated-path-webpack-plugin": "2.1.0",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/e2e-test-utils": "5.4.6",
"@wordpress/library-export-default-webpack-plugin": "2.2.0",
"@wordpress/scripts": "19.1.0",
"autoprefixer": "^9.8.6",
"chalk": "4.1.1",
"check-node-version": "4.1.0",
Expand Down Expand Up @@ -78,58 +78,58 @@
"webpack-livereload-plugin": "2.3.0"
},
"dependencies": {
"@wordpress/a11y": "3.1.2",
"@wordpress/annotations": "2.1.6",
"@wordpress/api-fetch": "5.1.2",
"@wordpress/autop": "3.1.2",
"@wordpress/blob": "3.1.2",
"@wordpress/block-directory": "2.1.21",
"@wordpress/block-editor": "6.1.14",
"@wordpress/block-library": "3.2.19",
"@wordpress/block-serialization-default-parser": "4.1.2",
"@wordpress/blocks": "9.1.8",
"@wordpress/components": "14.1.11",
"@wordpress/compose": "4.1.6",
"@wordpress/core-data": "3.1.12",
"@wordpress/customize-widgets": "1.0.20",
"@wordpress/data": "5.1.6",
"@wordpress/data-controls": "2.1.6",
"@wordpress/date": "4.1.2",
"@wordpress/deprecated": "3.1.2",
"@wordpress/dom": "3.1.5",
"@wordpress/dom-ready": "3.1.2",
"@wordpress/edit-post": "4.1.21",
"@wordpress/edit-widgets": "2.1.21",
"@wordpress/editor": "10.1.17",
"@wordpress/element": "3.1.2",
"@wordpress/escape-html": "2.1.2",
"@wordpress/format-library": "2.1.14",
"@wordpress/hooks": "3.1.1",
"@wordpress/html-entities": "3.1.2",
"@wordpress/i18n": "4.1.2",
"@wordpress/icons": "4.0.3",
"@wordpress/interface": "3.1.12",
"@wordpress/is-shallow-equal": "4.1.1",
"@wordpress/keyboard-shortcuts": "2.1.7",
"@wordpress/keycodes": "3.1.2",
"@wordpress/list-reusable-blocks": "2.1.11",
"@wordpress/media-utils": "2.1.2",
"@wordpress/notices": "3.1.6",
"@wordpress/nux": "4.1.11",
"@wordpress/plugins": "3.1.6",
"@wordpress/primitives": "2.1.2",
"@wordpress/priority-queue": "2.1.2",
"@wordpress/redux-routine": "4.1.2",
"@wordpress/reusable-blocks": "2.1.17",
"@wordpress/rich-text": "4.1.6",
"@wordpress/server-side-render": "2.1.12",
"@wordpress/shortcode": "3.1.2",
"@wordpress/token-list": "2.1.1",
"@wordpress/url": "3.1.2",
"@wordpress/viewport": "3.1.6",
"@wordpress/warning": "2.1.2",
"@wordpress/widgets": "1.1.19",
"@wordpress/wordcount": "3.1.2",
"@wordpress/a11y": "3.2.3",
"@wordpress/annotations": "2.2.6",
"@wordpress/api-fetch": "5.2.5",
"@wordpress/autop": "3.2.2",
"@wordpress/blob": "3.2.1",
"@wordpress/block-directory": "3.0.5",
"@wordpress/block-editor": "8.0.0",
"@wordpress/block-library": "6.0.3",
"@wordpress/block-serialization-default-parser": "4.2.2",
"@wordpress/blocks": "11.1.3",
"@wordpress/components": "19.0.1",
"@wordpress/compose": "5.0.5",
"@wordpress/core-data": "4.0.5",
"@wordpress/customize-widgets": "2.0.5",
"@wordpress/data": "6.1.3",
"@wordpress/data-controls": "2.2.6",
"@wordpress/date": "4.2.2",
"@wordpress/deprecated": "3.2.2",
"@wordpress/dom": "3.2.6",
"@wordpress/dom-ready": "3.2.2",
"@wordpress/edit-post": "5.0.5",
"@wordpress/edit-widgets": "3.1.0",
"@wordpress/editor": "12.0.2",
"@wordpress/element": "4.0.3",
"@wordpress/escape-html": "2.2.2",
"@wordpress/format-library": "3.0.5",
"@wordpress/hooks": "3.2.1",
"@wordpress/html-entities": "3.2.2",
"@wordpress/i18n": "4.2.3",
"@wordpress/icons": "6.1.0",
"@wordpress/interface": "4.1.3",
"@wordpress/is-shallow-equal": "4.2.0",
"@wordpress/keyboard-shortcuts": "3.0.5",
"@wordpress/keycodes": "3.2.3",
"@wordpress/list-reusable-blocks": "3.0.5",
"@wordpress/media-utils": "3.0.4",
"@wordpress/notices": "3.2.6",
"@wordpress/nux": "5.0.5",
"@wordpress/plugins": "4.0.5",
"@wordpress/primitives": "3.0.3",
"@wordpress/priority-queue": "2.2.2",
"@wordpress/redux-routine": "4.2.1",
"@wordpress/reusable-blocks": "3.0.5",
"@wordpress/rich-text": "5.0.5",
"@wordpress/server-side-render": "3.0.5",
"@wordpress/shortcode": "3.2.2",
"@wordpress/token-list": "2.2.1",
"@wordpress/url": "3.3.0",
"@wordpress/viewport": "4.0.5",
"@wordpress/warning": "2.2.2",
"@wordpress/widgets": "2.0.5",
"@wordpress/wordcount": "3.2.2",
"backbone": "1.4.0",
"clipboard": "2.0.8",
"core-js-url-browser": "3.6.4",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,22 @@ function get_default_block_editor_settings() {
}
}

// These styles are used if the "no theme styles" options is triggered or on
// themes without their own editor styles.
$default_editor_styles_file = ABSPATH . WPINC . '/css/dist/block-editor/default-editor-styles.css';
if ( file_exists( $default_editor_styles_file ) ) {
$default_editor_styles = array(
array( 'css' => file_get_contents( $default_editor_styles_file ) ),
);
} else {
$default_editor_styles = array();
}

$editor_settings = array(
'alignWide' => get_theme_support( 'align-wide' ),
'allowedBlockTypes' => true,
'allowedMimeTypes' => get_allowed_mime_types(),
'defaultEditorStyles' => $default_editor_styles,
'blockCategories' => get_default_block_categories(),
'disableCustomColors' => get_theme_support( 'disable-custom-colors' ),
'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ),
Expand Down Expand Up @@ -464,22 +476,12 @@ function block_editor_rest_api_preload( array $preload_paths, $block_editor_cont
*
* @global array $editor_styles
*
* @return array An array of theme styles for the block editor. Includes default font family
* style and theme stylesheets.
* @return array An array of theme styles for the block editor.
*/
function get_block_editor_theme_styles() {
global $editor_styles;

if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) {
$styles = array(
array(
'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }',
'__unstableType' => 'core',
),
);
} else {
$styles = array();
}
$styles = array();

if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) {
foreach ( $editor_styles as $style ) {
Expand Down
10 changes: 7 additions & 3 deletions src/wp-includes/blocks/archives.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ function render_block_core_archives( $attributes ) {

$archives = wp_get_archives( $dropdown_args );

$classnames = esc_attr( $class );

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );

switch ( $dropdown_args['type'] ) {
case 'yearly':
$label = __( 'Select Year' );
Expand All @@ -60,13 +64,13 @@ function render_block_core_archives( $attributes ) {

$label = esc_html( $label );

$block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label>
$block_content = '<label for="' . $dropdown_id . '">' . $title . '</label>
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . $label . '</option>' . $archives . '</select>';

return sprintf(
'<div class="%1$s">%2$s</div>',
esc_attr( $class ),
'<div %1$s>%2$s</div>',
$wrapper_attributes,
$block_content
);
}
Expand Down
12 changes: 11 additions & 1 deletion src/wp-includes/blocks/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,19 @@
},
"typography": {
"fontSize": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"reusable": false,
"spacing": {
"__experimentalSkipSerialization": true,
"padding": [ "horizontal", "vertical" ],
"__experimentalDefaultControls": {
"padding": true
}
},
"__experimentalBorder": {
"radius": true,
"__experimentalSkipSerialization": true
Expand Down
26 changes: 16 additions & 10 deletions src/wp-includes/blocks/buttons/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
"description": "Prompt visitors to take action with a group of button-style links.",
"keywords": [ "link" ],
"textdomain": "default",
"attributes": {
"contentJustification": {
"type": "string"
},
"orientation": {
"type": "string",
"default": "horizontal"
}
},
"supports": {
"anchor": true,
"align": [ "wide", "full" ]
"align": [ "wide", "full" ],
"__experimentalExposeControlsToChildren": true,
"spacing": {
"blockGap": true,
"margin": ["top", "bottom" ],
"__experimentalDefaultControls": {
"blockGap": true
}
},
"__experimentalLayout": {
"allowSwitching": false,
"allowInheriting": false,
"default": {
"type": "flex"
}
}
},
"editorStyle": "wp-block-buttons-editor",
"style": "wp-block-buttons"
Expand Down
Loading