diff --git a/.eslintrc.js b/.eslintrc.js
index 6f2726c9237132..a3762e98c368bb 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -37,35 +37,6 @@ module.exports = {
selector: 'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' + majorMinorRegExp + '/]',
message: 'Deprecated functions must be removed before releasing this version.',
},
- {
- // Builds a selector which handles CallExpression with path
- // argument at varied position by function.
- //
- // See: https://github.com/WordPress/gutenberg/pull/9615
- selector: map( {
- 1: [
- 'property',
- 'matchesProperty',
- 'path',
- ],
- 2: [
- 'invokeMap',
- 'get',
- 'has',
- 'hasIn',
- 'invoke',
- 'result',
- 'set',
- 'setWith',
- 'unset',
- 'update',
- 'updateWith',
- ],
- }, ( functionNames, argPosition ) => (
- `CallExpression[callee.name=/^(${ functionNames.join( '|' ) })$/] > Literal:nth-child(${ argPosition })`
- ) ).join( ',' ),
- message: 'Always pass an array as the path argument',
- },
{
selector: 'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] Literal[value=/\\.{3}/]',
message: 'Use ellipsis character (…) in place of three dots',
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b4001b7eda58c7..9fe873dbb50e56 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -83,9 +83,7 @@
# PHP
/lib @youknowriad @gziolo @aduth
-
-# Styles
-*.scss @chrisvanpatten
+*-controller.php @youknowriad @gziolo @aduth @timothybjacobs
# Native (Unowned)
*.native.js @ghost
diff --git a/.travis.yml b/.travis.yml
index e1a21e3f72cc5c..d0de440677a9f2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -64,41 +64,77 @@ jobs:
script:
- ./bin/run-wp-unit-tests.sh
- - name: E2E tests (Admin with plugins) (1/2)
+ - name: E2E tests (Admin with plugins) (1/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
install:
- ./bin/setup-local-env.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- npm run build
- - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )
- - name: E2E tests (Admin with plugins) (2/2)
+ - name: E2E tests (Admin with plugins) (2/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
install:
- ./bin/setup-local-env.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- npm run build
- - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )
- - name: E2E tests (Author without plugins) (1/2)
+ - name: E2E tests (Admin with plugins) (3/4)
+ env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
+ install:
+ - ./bin/setup-local-env.sh
+ script:
+ - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
+ - npm run build
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )
+
+ - name: E2E tests (Admin with plugins) (4/4)
+ env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
+ install:
+ - ./bin/setup-local-env.sh
+ script:
+ - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
+ - npm run build
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
+
+ - name: E2E tests (Author without plugins) (1/4)
+ env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
+ install:
+ - ./bin/setup-local-env.sh
+ script:
+ - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
+ - npm run build
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )
+
+ - name: E2E tests (Author without plugins) (2/4)
+ env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
+ install:
+ - ./bin/setup-local-env.sh
+ script:
+ - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
+ - npm run build
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )
+
+ - name: E2E tests (Author without plugins) (3/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
install:
- ./bin/setup-local-env.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- npm run build
- - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )
- - name: E2E tests (Author without plugins) (2/2)
+ - name: E2E tests (Author without plugins) (4/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
install:
- ./bin/setup-local-env.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- npm run build
- - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )
+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
allow_failures:
- name: PHP unit tests (PHP 5.3)
env: WP_VERSION=latest SWITCH_TO_PHP=5.3
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f3c371c089f38a..24994336cbeb46 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,125 +10,9 @@ All WordPress projects are [licensed under the GPLv2+](/LICENSE.md), and all con
This document covers the technical details around setup, and submitting your contribution to the Gutenberg project.
-## Getting Started
+## Developer Contributions
-Gutenberg is a Node.js-based project, built primarily in JavaScript.
-
-The easiest way to get started (on MacOS, Linux, or Windows 10 with the Linux Subsystem) is by running the Local Environment setup script, `./bin/setup-local-env.sh`. This will check if you have everything installed and updated, and help you download any extra tools you need.
-
-For another version of Windows, or if you prefer to set things up manually, be sure to have Node.js installed first. You should be running a Node version matching the [current active LTS release](https://github.com/nodejs/Release#release-schedule) or newer for this plugin to work correctly. You can check your Node.js version by typing `node -v` in the Terminal prompt.
-
-If you have an incompatible version of Node in your development environment, you can use [nvm](https://github.com/creationix/nvm) to change node versions on the command line:
-
-```
-nvm install
-nvm use
-```
-
-You also should have the latest release of [npm installed][npm]. npm is a separate project from Node.js and is updated frequently. If you've just installed Node.js which includes a version of npm within the installation you most likely will need also to update your npm installation. To update npm, type this into your terminal: `npm install npm@latest -g`
-
-To test the plugin, or to contribute to it, you can clone this repository and build the plugin files using Node. How you do that depends on whether you're developing locally or uploading the plugin to a remote host.
-
-### Local Environment
-
-First, you need a WordPress Environment to run the plugin on. The quickest way to get up and running is to use the provided docker setup. Install [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) by following the most recent instructions on the docker site.
-
-In the folder of your preference, clone this project and enter the working directory:
-```bash
-git clone git@github.com:WordPress/gutenberg.git
-cd gutenberg
-```
-
-Then, run a setup script to check if docker and node are configured properly and starts the local WordPress instance. You may need to run this script multiple times if prompted.
-```
-./bin/setup-local-env.sh
-```
-
-**If you're developing themes, or core WordPress functionality alongside Gutenberg**, you can make the WordPress files accessible in `wordpress/` by following these instructions instead:
-
-1. If this is your first time setting up the environment, run `DOCKER_ENV=localwpdev ./bin/setup-local-env.sh` instead of `./bin/setup-local-env.sh`
-2. If you've already had the previous environment set up, you need to start fresh, and you can do that by first running `docker-compose down --rmi all`. After that, you can repeat step 1.
-3. If you turn off your computer or restart Docker, you can get your local WordPress dev environment back by typing `docker-compose -f docker-compose.yml -f docker-compose-localdev.yml up`. If you just run `docker-compose up`, you will get the vanilla install that doesn't expose the WordPress folder.
-
-**If everything was successful**, you'll see the following ASCII art:
-```
-Welcome to...
-
-,⁻⁻⁻· . |
-| ،⁓’. . |--- ,---. ,---. |---. ,---. ,---. ,---.
-| | | | | |---' | | | | |---' | | |
-`---' `---' `---’ `---’ ' ` `---' `---’ ` `---|
- `---'
-```
-
-The WordPress installation should be available at `http://localhost:8888` (**Username**: `admin`, **Password**: `password`).
-Inside the "docker" directory, you can use any docker command to interact with your containers. If this port is in use, you can override it in your `docker-compose.override.yml` file. If you're running [e2e tests](/docs/contributors/testing-overview.md#end-to-end-testing), this change will be used correctly.
-
-To bring down this local WordPress instance later run:
-```
-docker-compose down
-```
-
-If you'd like to see your changes reflected in this local WordPress instance, run:
-```
-npm install
-npm run dev
-```
-
-Alternatively, you can use your own local WordPress environment and clone this repository right into your `wp-content/plugins` directory.
-
-Next, open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Then you can type `npm run dev` in your terminal or command prompt to keep the plugin building in the background as you work on it.
-
-WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command:
-```
-SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh
-```
-By default, both flags will be set to `true`.
-
-### On A Remote Server
-
-Open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Once that finishes, you can type `npm run build`. You can now upload the entire repository to your `wp-content/plugins` directory on your web server and activate the plugin from the WordPress admin.
-
-You can also type `npm run package-plugin` which will run the two commands above and create a zip file automatically for you which you can use to install Gutenberg through the WordPress admin.
-
-## Workflow
-
-A good workflow for new contributors to follow is listed below:
-- Fork Gutenberg repository
-- Clone forked repository
-- Create a new branch
-- Make code changes
-- Commit code changes within the newly created branch
-- Push branch to forked repository
-- Submit Pull Request to Gutenberg repository
-
-Ideally name your branches with prefixes and descriptions, like this: `[type]/[change]`. A good prefix would be:
-
-- `add/` = add a new feature
-- `try/` = experimental feature, "tentatively add"
-- `update/` = update an existing feature
-
-For example, `add/gallery-block` means you're working on adding a new gallery block.
-
-You can pick among all the tickets, or some of the ones labelled Good First Issue.
-
-The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document.
-
-## Playground
-
-The Gutenberg repository also includes a static Gutenberg playground that allows testing and developing in a WordPress-agnostic context. This is very helpful for developing reusable components and trying generic JavaScript modules without any backend dependency.
-
-You can launch the playground by running `npm run playground:start` locally. The playground should be available on [http://localhost:1234](http://localhost:1234).
-
-## Testing
-
-Gutenberg contains both PHP and JavaScript code and encourages testing and code style linting for both. It also incorporates end-to-end testing using [Google Puppeteer](https://developers.google.com/web/tools/puppeteer/). You can find out more details in [Testing Overview document](/docs/contributors/testing-overview.md).
-
-## Managing Packages
-
-This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation.
-
-Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section.
+Please see the [Developer Contributions section](/docs/contributors/develop.md) of the Contributor Handbook.
## How Can Designers Contribute?
@@ -147,16 +31,3 @@ If you're contributing to the documentation of any component from the `@wordpres
## Reporting Security Issues
Please see [SECURITY.md](/SECURITY.md).
-
-## Localizing Gutenberg Plugin
-
-To translate Gutenberg in your locale or language, [select your locale here](https://translate.wordpress.org/projects/wp-plugins/gutenberg) and translate *Development* (which contains the plugin's string) and/or *Development Readme* (please translate what you see in the Details tab of the [plugin page](https://wordpress.org/plugins/gutenberg/)).
-
-A Global Translation Editor (GTE) or Project Translation Editor (PTE) with suitable rights will process your translations in due time.
-
-Language packs are automatically generated once 95% of the plugin's strings are translated and approved for a locale.
-
-The eventual inclusion of Gutenberg into WordPress core means that more than 51% of WordPress installations running a translated WordPress installation will have Gutenberg's translated strings compiled into the core language pack as well.
-
-[lerna]: https://lernajs.io/
-[npm]: https://www.npmjs.com/
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index e80c404136ed90..2256d669c7dddb 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -54,7 +54,7 @@ This list is manually curated to include valuable contributions by volunteers th
| @pento | @pento |
| @karmatosed | @karmatosed |
| @nitrajka | @nitrajka |
-| @sirreal | |
+| @sirreal | @jonsurrell |
| @inhil | |
| @georgeolaru | @babbardel |
| @martinlugton | @martinlugton |
diff --git a/TESTS.md b/TESTS.md
deleted file mode 100644
index f98baf4cf3bc3e..00000000000000
--- a/TESTS.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Gutenberg User Tests
-
-Stub file. Please add to this! ✨
diff --git a/assets/stylesheets/_colors.scss b/assets/stylesheets/_colors.scss
index 3575248e3c2241..cafa84fba44cac 100644
--- a/assets/stylesheets/_colors.scss
+++ b/assets/stylesheets/_colors.scss
@@ -44,6 +44,7 @@ $dark-opacity-light-400: rgba(#95959c, 0.2);
$dark-opacity-light-300: rgba(#829493, 0.15);
$dark-opacity-light-200: rgba(#8b8b96, 0.1);
$dark-opacity-light-100: rgba(#747474, 0.05);
+$dark-opacity-background-fill: rgba($dark-gray-700, 0.7); // Similar to $dark-opacity-light-200, but more opaque.
// Light opacities, for use with dark themes.
$light-opacity-900: rgba($white, 1);
@@ -64,6 +65,7 @@ $light-opacity-light-400: rgba($white, 0.25);
$light-opacity-light-300: rgba($white, 0.2);
$light-opacity-light-200: rgba($white, 0.15);
$light-opacity-light-100: rgba($white, 0.1);
+$light-opacity-background-fill: rgba($light-gray-300, 0.8); // Similar to $light-opacity-light-200, but more opaque.
// Additional colors.
// Some are from https://make.wordpress.org/design/handbook/foundations/colors/.
diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh
index a518e83b0e3119..7e76a2032228ca 100755
--- a/bin/build-plugin-zip.sh
+++ b/bin/build-plugin-zip.sh
@@ -107,7 +107,7 @@ npm run build
php bin/generate-gutenberg-php.php > gutenberg.tmp.php
mv gutenberg.tmp.php gutenberg.php
-build_files=$(ls build/*/*.{js,css} build/block-library/blocks/*.php)
+build_files=$(ls build/*/*.{js,css,deps.json} build/block-library/blocks/*.php)
# Generate the plugin zip file.
status "Creating archive... 🎁"
diff --git a/bin/packages/watch.js b/bin/packages/watch.js
index cb319c15c6b176..ccfcc0b7dd85c7 100644
--- a/bin/packages/watch.js
+++ b/bin/packages/watch.js
@@ -3,7 +3,7 @@
*/
const fs = require( 'fs' );
const watch = require( 'node-watch' );
-const { execSync } = require( 'child_process' );
+const { spawn } = require( 'child_process' );
const path = require( 'path' );
const chalk = require( 'chalk' );
@@ -12,7 +12,7 @@ const chalk = require( 'chalk' );
*/
const getPackages = require( './get-packages' );
-const BUILD_CMD = `node \"${ path.resolve( __dirname, './build.js' ) }\"`;
+const BUILD_SCRIPT = path.resolve( __dirname, './build.js' );
let filesToBuild = new Map();
@@ -69,7 +69,7 @@ setInterval( () => {
if ( files.length ) {
filesToBuild = new Map();
try {
- execSync( `${ BUILD_CMD } \"${ files.join( ' ' ) }\"`, { stdio: [ 0, 1, 2 ] } );
+ spawn( 'node', [ BUILD_SCRIPT, ...files ], { stdio: [ 0, 1, 2 ] } );
} catch ( e ) {}
}
}, 100 );
diff --git a/bin/update-readmes.js b/bin/update-readmes.js
index 809357c68682d2..1aca8699f9c07b 100755
--- a/bin/update-readmes.js
+++ b/bin/update-readmes.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-const path = require( 'path' );
+const { join } = require( 'path' );
const { promisify } = require( 'util' );
const spawn = promisify( require( 'child_process' ).spawn );
@@ -13,6 +13,10 @@ const packages = [
'block-serialization-default-parser',
'blocks',
'compose',
+ [ 'core-data', {
+ 'Autogenerated actions': 'src/actions.js',
+ 'Autogenerated selectors': 'src/selectors.js',
+ } ],
'data',
'date',
'deprecated',
@@ -35,20 +39,30 @@ const packages = [
'wordcount',
];
-Promise.all( packages.map( async ( packageName ) => {
- const { status, stderr } = await spawn(
- path.join( __dirname, '..', 'node_modules', '.bin', 'docgen' ),
- [
- `packages/${ packageName }/src/index.js`,
- `--output packages/${ packageName }/README.md`,
- '--to-token',
- '--ignore "/unstable|experimental/i"',
- ],
- { shell: true },
- );
- if ( status !== 0 ) {
- throw stderr.toString();
+Promise.all( packages.map( ( entry ) => {
+ if ( ! Array.isArray( entry ) ) {
+ entry = [ entry, { 'Autogenerated API docs': 'src/index.js' } ];
}
+
+ const [ packageName, targets ] = entry;
+
+ return Promise.all( Object.entries( targets ).map( async ( [ token, path ] ) => {
+ const { status, stderr } = await spawn(
+ join( __dirname, '..', 'node_modules', '.bin', 'docgen' ),
+ [
+ join( 'packages', packageName, path ),
+ `--output packages/${ packageName }/README.md`,
+ '--to-token',
+ `--use-token "${ token }"`,
+ '--ignore "/unstable|experimental/i"',
+ ],
+ { shell: true },
+ );
+
+ if ( status !== 0 ) {
+ throw stderr.toString();
+ }
+ } ) );
} ) ).catch( ( error ) => {
process.stderr.write( `${ error }\n` );
process.exit( 1 );
diff --git a/docs/contributors/coding-guidelines.md b/docs/contributors/coding-guidelines.md
index 01daee8c386f3f..bb763af00018b8 100644
--- a/docs/contributors/coding-guidelines.md
+++ b/docs/contributors/coding-guidelines.md
@@ -201,6 +201,6 @@ alert( `My name is ${ name }.` );
We use
[`phpcs` (PHP\_CodeSniffer)](https://github.com/squizlabs/PHP_CodeSniffer) with the [WordPress Coding Standards ruleset](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) to run a lot of automated checks against all PHP code in this project. This ensures that we are consistent with WordPress PHP coding standards.
-The easiest way to use PHPCS is [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment). Once that's installed, you can check your PHP by running `npm run lint-php`.
+The easiest way to use PHPCS is [local environment](/docs/contributors/getting-started.md#local-environment). Once that's installed, you can check your PHP by running `npm run lint-php`.
If you prefer to install PHPCS locally, you should use `composer`. [Install `composer`](https://getcomposer.org/download/) on your computer, then run `composer install`. This will install `phpcs` and `WordPress-Coding-Standards` which you can the run via `vendor/bin/phpcs`.
diff --git a/docs/contributors/develop.md b/docs/contributors/develop.md
index 97fa91aab0f78d..7b8ad300ee3163 100644
--- a/docs/contributors/develop.md
+++ b/docs/contributors/develop.md
@@ -1,11 +1,15 @@
# Developer Contributions
-Please see [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for technical details on how to setup and make contributions to the Gutenberg repository.
+Please also see [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for general information about contributions to the Gutenberg repository.
The following resources offer additional information for developers who wish to contribute to Gutenberg:
+* [Getting Started](/docs/contributors/getting-started.md).
+* [Git Workflow](/docs/contributors/git-workflow.md).
* [Coding Guidelines](/docs/contributors/coding-guidelines.md) outline additional patterns and conventions used in the Gutenberg project.
-* [Gutenberg Block Grammar](/docs/contributors/grammar.md)
* [Testing Overview](/docs/contributors/testing-overview.md) for PHP and JavaScript development in Gutenberg.
-* [Scripts](/docs/contributors/scripts.md) a list of vendor and internal scripts available to plugin developers.
-* [Gutenberg Release Process](/docs/contributors/release.md) a checklist for the different type of releases for Gutenberg project.
+* [Gutenberg Block Grammar](/docs/contributors/grammar.md).
+* [Scripts](/docs/contributors/scripts.md) - a list of vendor and internal scripts available to plugin developers.
+* [Managing Packages](/docs/contributors/managing-packages.md).
+* [Gutenberg Release Process](/docs/contributors/release.md) - a checklist for the different type of releases for Gutenberg project.
+* [Localizing Gutenberg Plugin](/docs/contributors/localizing.md) - a guide on how to translate Gutenberg in your locale or language.
diff --git a/docs/contributors/getting-started.md b/docs/contributors/getting-started.md
new file mode 100644
index 00000000000000..ed84cb6e81376b
--- /dev/null
+++ b/docs/contributors/getting-started.md
@@ -0,0 +1,90 @@
+# Getting Started
+
+Gutenberg is a Node.js-based project, built primarily in JavaScript.
+
+The easiest way to get started (on MacOS, Linux, or Windows 10 with the Linux Subsystem) is by running the Local Environment setup script, `./bin/setup-local-env.sh`. This will check if you have everything installed and updated, and help you download any extra tools you need.
+
+For another version of Windows, or if you prefer to set things up manually, be sure to have Node.js installed first. You should be running a Node version matching the [current active LTS release](https://github.com/nodejs/Release#release-schedule) or newer for this plugin to work correctly. You can check your Node.js version by typing `node -v` in the Terminal prompt.
+
+If you have an incompatible version of Node in your development environment, you can use [nvm] to change node versions on the command line:
+
+```
+nvm install
+nvm use
+```
+
+You also should have the latest release of [npm installed][npm]. npm is a separate project from Node.js and is updated frequently. If you've just installed Node.js which includes a version of npm within the installation you most likely will need also to update your npm installation. To update npm, type this into your terminal: `npm install npm@latest -g`
+
+To test the plugin, or to contribute to it, you can clone this repository and build the plugin files using Node. How you do that depends on whether you're developing locally or uploading the plugin to a remote host.
+
+## Local Environment
+
+First, you need a WordPress Environment to run the plugin on. The quickest way to get up and running is to use the provided docker setup. Install [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) by following the most recent instructions on the docker site.
+
+In the folder of your preference, clone this project and enter the working directory:
+```bash
+git clone git@github.com:WordPress/gutenberg.git
+cd gutenberg
+```
+
+Then, run a setup script to check if docker and node are configured properly and starts the local WordPress instance. You may need to run this script multiple times if prompted.
+```
+./bin/setup-local-env.sh
+```
+
+**If you're developing themes, or core WordPress functionality alongside Gutenberg**, you can make the WordPress files accessible in `wordpress/` by following these instructions instead:
+
+1. If this is your first time setting up the environment, run `DOCKER_ENV=localwpdev ./bin/setup-local-env.sh` instead of `./bin/setup-local-env.sh`
+2. If you've already had the previous environment set up, you need to start fresh, and you can do that by first running `docker-compose down --rmi all`. After that, you can repeat step 1.
+3. If you turn off your computer or restart Docker, you can get your local WordPress dev environment back by typing `docker-compose -f docker-compose.yml -f docker-compose-localdev.yml up`. If you just run `docker-compose up`, you will get the vanilla install that doesn't expose the WordPress folder.
+
+**If everything was successful**, you'll see the following ASCII art:
+```
+Welcome to...
+
+,⁻⁻⁻· . |
+| ،⁓’. . |--- ,---. ,---. |---. ,---. ,---. ,---.
+| | | | | |---' | | | | |---' | | |
+`---' `---' `---’ `---’ ' ` `---' `---’ ` `---|
+ `---'
+```
+
+The WordPress installation should be available at `http://localhost:8888` (**Username**: `admin`, **Password**: `password`).
+Inside the "docker" directory, you can use any docker command to interact with your containers. If this port is in use, you can override it in your `docker-compose.override.yml` file. If you're running [e2e tests](/docs/contributors/testing-overview.md#end-to-end-testing), this change will be used correctly.
+
+To bring down this local WordPress instance later run:
+```
+docker-compose down
+```
+
+If you'd like to see your changes reflected in this local WordPress instance, run:
+```
+npm install
+npm run dev
+```
+
+Alternatively, you can use your own local WordPress environment and clone this repository right into your `wp-content/plugins` directory.
+
+Next, open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Then you can type `npm run dev` in your terminal or command prompt to keep the plugin building in the background as you work on it.
+
+WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command:
+```
+SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh
+```
+By default, both flags will be set to `true`.
+
+## On A Remote Server
+
+Open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Once that finishes, you can type `npm run build`. You can now upload the entire repository to your `wp-content/plugins` directory on your web server and activate the plugin from the WordPress admin.
+
+You can also type `npm run package-plugin` which will run the two commands above and create a zip file automatically for you which you can use to install Gutenberg through the WordPress admin.
+
+[npm]: https://www.npmjs.com/
+[nvm]: https://github.com/creationix/nvm
+
+## Playground
+
+The Gutenberg repository also includes a static Gutenberg playground that allows testing and developing in a WordPress-agnostic context. This is very helpful for developing reusable components and trying generic JavaScript modules without any backend dependency.
+
+You can launch the playground by running `npm run playground:start` locally. The playground should be available on [http://localhost:1234](http://localhost:1234).
+
diff --git a/docs/contributors/git-workflow.md b/docs/contributors/git-workflow.md
index f159b46126e617..7f1499bc7de34a 100644
--- a/docs/contributors/git-workflow.md
+++ b/docs/contributors/git-workflow.md
@@ -1,5 +1,26 @@
# Git Workflow
+A good workflow for new contributors to follow is listed below:
+- Fork Gutenberg repository
+- Clone forked repository
+- Create a new branch
+- Make code changes
+- Commit code changes within the newly created branch
+- Push branch to forked repository
+- Submit Pull Request to Gutenberg repository
+
+Ideally name your branches with prefixes and descriptions, like this: `[type]/[change]`. A good prefix would be:
+
+- `add/` = add a new feature
+- `try/` = experimental feature, "tentatively add"
+- `update/` = update an existing feature
+
+For example, `add/gallery-block` means you're working on adding a new gallery block.
+
+You can pick among all the tickets, or some of the ones labelled Good First Issue.
+
+The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document.
+
## Keeping Your Branch Up To Date
When many different people are working on a project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the main line of development, and it needs to be updated before it can be merged into the project.
diff --git a/docs/contributors/localizing.md b/docs/contributors/localizing.md
new file mode 100644
index 00000000000000..c5b22e675d51ef
--- /dev/null
+++ b/docs/contributors/localizing.md
@@ -0,0 +1,9 @@
+# Localizing Gutenberg Plugin
+
+To translate Gutenberg in your locale or language, [select your locale here](https://translate.wordpress.org/projects/wp-plugins/gutenberg) and translate *Development* (which contains the plugin's string) and/or *Development Readme* (please translate what you see in the Details tab of the [plugin page](https://wordpress.org/plugins/gutenberg/)).
+
+A Global Translation Editor (GTE) or Project Translation Editor (PTE) with suitable rights will process your translations in due time.
+
+Language packs are automatically generated once 95% of the plugin's strings are translated and approved for a locale.
+
+The eventual inclusion of Gutenberg into WordPress core means that more than 51% of WordPress installations running a translated WordPress installation will have Gutenberg's translated strings compiled into the core language pack as well.
diff --git a/docs/contributors/managing-packages.md b/docs/contributors/managing-packages.md
new file mode 100644
index 00000000000000..000a74026469ff
--- /dev/null
+++ b/docs/contributors/managing-packages.md
@@ -0,0 +1,8 @@
+# Managing Packages
+
+This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation.
+
+Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section.
+
+[lerna]: https://lernajs.io/
+[npm]: https://www.npmjs.com/
diff --git a/docs/contributors/testing-overview.md b/docs/contributors/testing-overview.md
index 6992bd664c3ec2..0133f1792aced9 100644
--- a/docs/contributors/testing-overview.md
+++ b/docs/contributors/testing-overview.md
@@ -21,7 +21,7 @@ When writing tests consider the following:
Tests for JavaScript use [Jest](https://jestjs.io/) as the test runner and its API for [globals](https://jestjs.io/docs/en/api.html) (`describe`, `test`, `beforeEach` and so on) [assertions](https://jestjs.io/docs/en/expect.html), [mocks](https://jestjs.io/docs/en/mock-functions.html), [spies](https://jestjs.io/docs/en/jest-object.html#jestspyonobject-methodname) and [mock functions](https://jestjs.io/docs/en/mock-function-api.html). If needed, you can also use [Enzyme](https://github.com/airbnb/enzyme) for React component testing.
-Assuming you've followed the [instructions](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) to install Node and project dependencies, tests can be run from the command-line with NPM:
+Assuming you've followed the [instructions](/docs/contributors/getting-started.md) to install Node and project dependencies, tests can be run from the command-line with NPM:
```
npm test
@@ -344,7 +344,7 @@ It's tempting to snapshot deep renders, but that makes for huge snapshots. Addit
## End to end Testing
-If you're using the built-in [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment), you can run the e2e tests locally using this command:
+If you're using the built-in [local environment](/docs/contributors/getting-started.md#local-environment), you can run the e2e tests locally using this command:
```bash
npm run test-e2e
@@ -370,7 +370,7 @@ WP_BASE_URL=http://localhost:8888 WP_USERNAME=admin WP_PASSWORD=password npm run
## PHP Testing
-Tests for PHP use [PHPUnit](https://phpunit.de/) as the testing framework. If you're using the built-in [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment), you can run the PHP tests locally using this command:
+Tests for PHP use [PHPUnit](https://phpunit.de/) as the testing framework. If you're using the built-in [local environment](/docs/contributors/getting-started.md#local-environment), you can run the PHP tests locally using this command:
```bash
npm run test-php
diff --git a/docs/designers-developers/developers/data/data-core-annotations.md b/docs/designers-developers/developers/data/data-core-annotations.md
index 6600938219e0e9..0aaf9963ba48aa 100644
--- a/docs/designers-developers/developers/data/data-core-annotations.md
+++ b/docs/designers-developers/developers/data/data-core-annotations.md
@@ -2,93 +2,7 @@
## Selectors
-### __experimentalGetAnnotationsForBlock
-Returns the annotations for a specific client ID.
-
-*Parameters*
-
- * state: Editor state.
- * clientId: The ID of the block to get the annotations for.
-
-### __experimentalGetAnnotationsForRichText
-
-Returns the annotations that apply to the given RichText instance.
-
-Both a blockClientId and a richTextIdentifier are required. This is because
-a block might have multiple `RichText` components. This does mean that every
-block needs to implement annotations itself.
-
-*Parameters*
-
- * state: Editor state.
- * blockClientId: The client ID for the block.
- * richTextIdentifier: Unique identifier that identifies the given RichText.
-
-*Returns*
-
-All the annotations relevant for the `RichText`.
-
-### __experimentalGetAnnotations
-
-Returns all annotations in the editor state.
-
-*Parameters*
-
- * state: Editor state.
-
-*Returns*
-
-All annotations currently applied.
## Actions
-### __experimentalAddAnnotation
-
-Adds an annotation to a block.
-
-The `block` attribute refers to a block ID that needs to be annotated.
-`isBlockAnnotation` controls whether or not the annotation is a block
-annotation. The `source` is the source of the annotation, this will be used
-to identity groups of annotations.
-
-The `range` property is only relevant if the selector is 'range'.
-
-*Parameters*
-
- * annotation: The annotation to add.
- * blockClientId: The blockClientId to add the annotation to.
- * richTextIdentifier: Identifier for the RichText instance the annotation applies to.
- * range: The range at which to apply this annotation.
- * range.start: The offset where the annotation should start.
- * range.end: The offset where the annotation should end.
- * string: [selector="range"] The way to apply this annotation.
- * string: [source="default"] The source that added the annotation.
- * string: [id=uuid()] The ID the annotation should have.
- Generates a UUID by default.
-
-### __experimentalRemoveAnnotation
-
-Removes an annotation with a specific ID.
-
-*Parameters*
-
- * annotationId: The annotation to remove.
-
-### __experimentalUpdateAnnotationRange
-
-Updates the range of an annotation.
-
-*Parameters*
-
- * annotationId: ID of the annotation to update.
- * start: The start of the new range.
- * end: The end of the new range.
-
-### __experimentalRemoveAnnotationsBySource
-
-Removes all annotations of a specific source.
-
-*Parameters*
-
- * source: The source to remove.
\ No newline at end of file
diff --git a/docs/designers-developers/developers/data/data-core-block-editor.md b/docs/designers-developers/developers/data/data-core-block-editor.md
index 5bdea7a18a34e5..d152b4475f8b24 100644
--- a/docs/designers-developers/developers/data/data-core-block-editor.md
+++ b/docs/designers-developers/developers/data/data-core-block-editor.md
@@ -158,6 +158,32 @@ Returns the number of blocks currently present in the post.
Number of blocks in the post.
+### getSelectionStart
+
+Returns the current selection start block client ID, attribute key and text
+offset.
+
+*Parameters*
+
+ * state: Block editor state.
+
+*Returns*
+
+Selection start information.
+
+### getSelectionEnd
+
+Returns the current selection end block client ID, attribute key and text
+offset.
+
+*Parameters*
+
+ * state: Block editor state.
+
+*Returns*
+
+Selection end information.
+
### getBlockSelectionStart
Returns the current block selection start. This value may be null, and it
@@ -775,20 +801,6 @@ via its `onChange` callback, in addition to `onInput`.
Whether the most recent block change was persistent.
-### __unstableIsLastBlockChangeIgnored
-
-Returns true if the most recent block change is be considered ignored, or
-false otherwise. An ignored change is one not to be committed by
-BlockEditorProvider, neither via `onChange` nor `onInput`.
-
-*Parameters*
-
- * state: Block editor state.
-
-*Returns*
-
-Whether the most recent block change was ignored.
-
## Actions
### resetBlocks
@@ -1042,6 +1054,18 @@ Returns an action object used in signalling that the caret has entered formatted
Returns an action object used in signalling that the user caret has exited formatted text.
+### selectionChange
+
+Returns an action object used in signalling that the user caret has changed
+position.
+
+*Parameters*
+
+ * clientId: The selected block client ID.
+ * attributeKey: The selected block attribute key.
+ * startOffset: The start offset.
+ * endOffset: The end offset.
+
### insertDefaultBlock
Returns an action object used in signalling that a new block of the default
@@ -1070,18 +1094,4 @@ Returns an action object used in signalling that the block editor settings have
*Parameters*
- * settings: Updated settings
-
-### __unstableSaveReusableBlock
-
-Returns an action object used in signalling that a temporary reusable blocks have been saved
-in order to switch its temporary id with the real id.
-
-*Parameters*
-
- * id: Reusable block's id.
- * updatedId: Updated block's id.
-
-### __unstableMarkLastChangeAsPersistent
-
-Returns an action object used in signalling that the last block change should be marked explicitely as persistent.
\ No newline at end of file
+ * settings: Updated settings
\ No newline at end of file
diff --git a/docs/designers-developers/developers/data/data-core-editor.md b/docs/designers-developers/developers/data/data-core-editor.md
index 69059845b2ad91..8a770b01e30293 100644
--- a/docs/designers-developers/developers/data/data-core-editor.md
+++ b/docs/designers-developers/developers/data/data-core-editor.md
@@ -496,58 +496,6 @@ before falling back to serialization of block state.
Post content.
-### __experimentalGetReusableBlock
-
-Returns the reusable block with the given ID.
-
-*Parameters*
-
- * state: Global application state.
- * ref: The reusable block's ID.
-
-*Returns*
-
-The reusable block, or null if none exists.
-
-### __experimentalIsSavingReusableBlock
-
-Returns whether or not the reusable block with the given ID is being saved.
-
-*Parameters*
-
- * state: Global application state.
- * ref: The reusable block's ID.
-
-*Returns*
-
-Whether or not the reusable block is being saved.
-
-### __experimentalIsFetchingReusableBlock
-
-Returns true if the reusable block with the given ID is being fetched, or
-false otherwise.
-
-*Parameters*
-
- * state: Global application state.
- * ref: The reusable block's ID.
-
-*Returns*
-
-Whether the reusable block is being fetched.
-
-### __experimentalGetReusableBlocks
-
-Returns an array of all reusable blocks.
-
-*Parameters*
-
- * state: Global application state.
-
-*Returns*
-
-An array of all reusable blocks.
-
### getStateBeforeOptimisticTransaction
Returns state object prior to a specified optimist transaction ID, or `null`
@@ -723,18 +671,6 @@ Return the current block list.
Block list.
-### __unstableIsEditorReady
-
-Is the editor ready
-
-*Parameters*
-
- * state: null
-
-*Returns*
-
-is Ready.
-
### getEditorSettings
Returns the post editor settings.
@@ -783,43 +719,6 @@ Deprecated since 5.6. Callers should use the `receiveAutosaves( postId, autosave
* newAutosave: Autosave post object.
-### __experimentalRequestPostUpdateStart
-
-Optimistic action for dispatching that a post update request has started.
-
-*Parameters*
-
- * options: null
-
-### __experimentalRequestPostUpdateSuccess
-
-Optimistic action for indicating that the request post update has completed
-successfully.
-
-*Parameters*
-
- * data: The data for the action.
- * data.previousPost: The previous post prior to update.
- * data.post: The new post after update
- * data.isRevision: Whether the post is a revision or not.
- * data.options: Options passed through from the original
- action dispatch.
- * data.postType: The post type object.
-
-### __experimentalRequestPostUpdateFailure
-
-Optimistic action for indicating that the request post update has completed
-with a failure.
-
-*Parameters*
-
- * data: The data for the action
- * data.post: The post that failed updating.
- * data.edits: The fields that were being updated.
- * data.error: The error from the failed call.
- * data.options: Options passed through from the original
- action dispatch.
-
### updatePost
Returns an action object used in signalling that a patch of updates for the
@@ -847,15 +746,6 @@ been edited.
* edits: Post attributes to edit.
-### __experimentalOptimisticUpdatePost
-
-Returns action object produced by the updatePost creator augmented by
-an optimist option that signals optimistically applying updates.
-
-*Parameters*
-
- * edits: Updated post fields.
-
### savePost
Action generator for saving the current post in the editor.
@@ -902,72 +792,6 @@ Returns an action object used to lock the editor.
* lock: Details about the post lock status, user, and nonce.
-### __experimentalFetchReusableBlocks
-
-Returns an action object used to fetch a single reusable block or all
-reusable blocks from the REST API into the store.
-
-*Parameters*
-
- * id: If given, only a single reusable block with this ID will
- be fetched.
-
-### __experimentalReceiveReusableBlocks
-
-Returns an action object used in signalling that reusable blocks have been
-received. `results` is an array of objects containing:
- - `reusableBlock` - Details about how the reusable block is persisted.
- - `parsedBlock` - The original block.
-
-*Parameters*
-
- * results: Reusable blocks received.
-
-### __experimentalSaveReusableBlock
-
-Returns an action object used to save a reusable block that's in the store to
-the REST API.
-
-*Parameters*
-
- * id: The ID of the reusable block to save.
-
-### __experimentalDeleteReusableBlock
-
-Returns an action object used to delete a reusable block via the REST API.
-
-*Parameters*
-
- * id: The ID of the reusable block to delete.
-
-### __experimentalUpdateReusableBlockTitle
-
-Returns an action object used in signalling that a reusable block's title is
-to be updated.
-
-*Parameters*
-
- * id: The ID of the reusable block to update.
- * title: The new title.
-
-### __experimentalConvertBlockToStatic
-
-Returns an action object used to convert a reusable block into a static
-block.
-
-*Parameters*
-
- * clientId: The client ID of the block to attach.
-
-### __experimentalConvertBlockToReusable
-
-Returns an action object used to convert a static block into a reusable
-block.
-
-*Parameters*
-
- * clientIds: The client IDs of the block to detach.
-
### enablePublishSidebar
Returns an action object used in signalling that the user has enabled the
diff --git a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md
index 2c311b513751a8..2e6b1f4d21a419 100644
--- a/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md
+++ b/docs/designers-developers/developers/tutorials/javascript/js-build-setup.md
@@ -2,7 +2,7 @@
This page covers how to set up your development environment to use the ESNext and [JSX](https://reactjs.org/docs/introducing-jsx.html) syntaxes. ESNext is JavaScript code written using features that are only available in a specification greater than ECMAScript 5 (ES5 for short). JSX is a custom syntax extension to JavaScript which helps you to describe what the UI should look like.
-This documentation covers development for your plugin to work with Gutenberg. If you want to setup a development environment for developing Gutenberg itself, see the [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) documentation.
+This documentation covers development for your plugin to work with Gutenberg. If you want to setup a development environment for developing Gutenberg itself, see the [Getting Started](/docs/contributors/getting-started.md) documentation.
Most browsers can not interpret or run ESNext and JSX syntaxes, so we use a transformation step to convert these syntaxes to code that browsers can understand.
diff --git a/docs/designers-developers/developers/tutorials/javascript/readme.md b/docs/designers-developers/developers/tutorials/javascript/readme.md
index f425f2726df67e..1c2f9c2c110716 100644
--- a/docs/designers-developers/developers/tutorials/javascript/readme.md
+++ b/docs/designers-developers/developers/tutorials/javascript/readme.md
@@ -1,12 +1,12 @@
# Getting Started with JavaScript
-The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new block editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is get you comfortable on how to use the API reference and snippets of code found within.
+The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new block editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is to get you comfortable on how to use the API reference and snippets of code found within.
### What is JavaScript
JavaScript is a programming language which is loaded and executed in your web browser; compared to PHP which is run by a web server with the results sent to the browser, typically as HTML.
-The block editor introduced in WordPress 5.0 is written entirely in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires to learn how to use JavaScript to extend and enhance the block editor.
+The block editor introduced in WordPress 5.0 is written in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires you to learn how to use JavaScript to extend and enhance the block editor.
### Table of Contents
diff --git a/docs/manifest.json b/docs/manifest.json
index 984142d7ed55ed..523a83487f11c1 100644
--- a/docs/manifest.json
+++ b/docs/manifest.json
@@ -431,6 +431,18 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/develop.md",
"parent": "contributors"
},
+ {
+ "title": "Getting Started",
+ "slug": "getting-started",
+ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/getting-started.md",
+ "parent": "develop"
+ },
+ {
+ "title": "Git Workflow",
+ "slug": "git-workflow",
+ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/git-workflow.md",
+ "parent": "develop"
+ },
{
"title": "Coding Guidelines",
"slug": "coding-guidelines",
@@ -443,12 +455,6 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/testing-overview.md",
"parent": "develop"
},
- {
- "title": "Git Workflow",
- "slug": "git-workflow",
- "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/git-workflow.md",
- "parent": "develop"
- },
{
"title": "Block Grammar",
"slug": "grammar",
@@ -461,12 +467,24 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/scripts.md",
"parent": "develop"
},
+ {
+ "title": "Managing Packages",
+ "slug": "managing-packages",
+ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/managing-packages.md",
+ "parent": "develop"
+ },
{
"title": "Gutenberg Release Process",
"slug": "release",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/release.md",
"parent": "develop"
},
+ {
+ "title": "Localizing Gutenberg Plugin",
+ "slug": "localizing",
+ "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/localizing.md",
+ "parent": "develop"
+ },
{
"title": "Documentation Contributions",
"slug": "document",
diff --git a/docs/toc.json b/docs/toc.json
index 8d87e52bc89755..774796da6a4fba 100644
--- a/docs/toc.json
+++ b/docs/toc.json
@@ -85,12 +85,15 @@
{"docs/contributors/reference.md": []}
]},
{"docs/contributors/develop.md": [
+ {"docs/contributors/getting-started.md": []},
+ {"docs/contributors/git-workflow.md": []},
{"docs/contributors/coding-guidelines.md": []},
{"docs/contributors/testing-overview.md": []},
- {"docs/contributors/git-workflow.md": []},
{"docs/contributors/grammar.md": []},
{"docs/contributors/scripts.md": []},
- {"docs/contributors/release.md": []}
+ {"docs/contributors/managing-packages.md": []},
+ {"docs/contributors/release.md": []},
+ {"docs/contributors/localizing.md": []}
]},
{"docs/contributors/document.md": [
{"docs/contributors/copy-guide.md": []}
diff --git a/docs/tool/parser.js b/docs/tool/parser.js
index 41b02c87bb314e..25dc7e34d41f8d 100644
--- a/docs/tool/parser.js
+++ b/docs/tool/parser.js
@@ -6,7 +6,7 @@ const fs = require( 'fs' );
/**
* External dependencies
*/
-const { last, size, first } = require( 'lodash' );
+const { last, size, first, some, overEvery, negate, isEmpty } = require( 'lodash' );
const espree = require( 'espree' );
const doctrine = require( 'doctrine' );
@@ -25,6 +25,29 @@ function isDocumentedNamedExport( node ) {
);
}
+/**
+ * Returns true if the given exported declaration name is considered stable for
+ * documentation, or false otherwise.
+ *
+ * @see https://github.com/WordPress/gutenberg/blob/master/docs/contributors/coding-guidelines.md#experimental-and-unstable-apis
+ *
+ * @param {string} name Name to test.
+ *
+ * @return {boolean} Whether the provided name describes a stable API.
+ */
+const isStableExportName = ( name ) => ! /^__(unstable|experimental)/.test( name );
+
+/**
+ * Returns true if the given export name is eligible to be included in
+ * generated output, or false otherwise.
+ *
+ * @type {boolean} Whether name is eligible for documenting.
+ */
+const isEligibleExportedName = overEvery( [
+ negate( isEmpty ),
+ isStableExportName,
+] );
+
/**
* Returns the assigned name for a given declaration node type, or undefined if
* it cannot be determined.
@@ -49,6 +72,37 @@ function getDeclarationExportedName( declaration ) {
}
}
+/**
+ * Returns true if the given DocBlock contains at least one reference to the
+ * tag named by the provided title, or false otherwise.
+ *
+ * @param {Object} docBlock Parsed DocBlock node.
+ * @param {string} title Title to search.
+ *
+ * @return {boolean} Whether DocBlock contains tag by title.
+ */
+const hasDocBlockTag = ( docBlock, title ) => some( docBlock.tags, { title } );
+
+/**
+ * Returns true if the given DocBlock contains at least one reference to a
+ * private tag.
+ *
+ * @param {Object} docBlock Parsed DocBlock node.
+ *
+ * @return {boolean} Whether DocBlock contains private tag.
+ */
+const hasPrivateTag = ( docBlock ) => hasDocBlockTag( docBlock, 'private' );
+
+/**
+ * Returns true if the given DocBlock contains at least one reference to a
+ * param tag.
+ *
+ * @param {Object} docBlock Parsed DocBlock node.
+ *
+ * @return {boolean} Whether DocBlock contains param tag.
+ */
+const hasParamTag = ( docBlock ) => hasDocBlockTag( docBlock, 'param' );
+
/**
* Maps parse type to specific filtering logic by which to consider for
* inclusion a parsed named export.
@@ -57,18 +111,25 @@ function getDeclarationExportedName( declaration ) {
*/
const FILTER_PARSED_DOCBLOCK_BY_TYPE = {
/**
- * Selectors filter. Excludes documented exports which do not include at
- * least one `@param` DocBlock tag. This is used to distinguish between
- * selectors (which at least receive state as an argument) and exported
- * constant values.
+ * Selectors filter. Excludes documented exports either marked as private
+ * or which do not include at least one `@param` DocBlock tag. This is used
+ * to distinguish between selectors (which at least receive state as an
+ * argument) and exported constant values.
*
* @param {Object} docBlock DocBlock object to test.
*
* @return {boolean} Whether documented selector should be included.
*/
- selectors( docBlock ) {
- return !! docBlock.tags.some( ( tag ) => tag.title === 'param' );
- },
+ selectors: overEvery( [ hasParamTag, negate( hasPrivateTag ) ] ),
+
+ /**
+ * Actions filter. Excludes documented exports marked as private.
+ *
+ * @param {Object} docBlock DocBlock object to test.
+ *
+ * @return {boolean} Whether documented action should be included.
+ */
+ actions: negate( hasPrivateTag ),
};
module.exports = function( config ) {
@@ -107,7 +168,7 @@ module.exports = function( config ) {
}
const name = getDeclarationExportedName( node.declaration );
- if ( ! name ) {
+ if ( ! isEligibleExportedName( name ) ) {
return;
}
diff --git a/gutenberg.php b/gutenberg.php
index a72000fd626edc..006fcfb6aeeb20 100644
--- a/gutenberg.php
+++ b/gutenberg.php
@@ -3,7 +3,7 @@
* Plugin Name: Gutenberg
* Plugin URI: https://github.com/WordPress/gutenberg
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
- * Version: 5.5.0
+ * Version: 5.6.0-rc.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
@@ -11,7 +11,7 @@
*/
### BEGIN AUTO-GENERATED DEFINES
-define( 'GUTENBERG_DEVELOPMENT_MODE', true );
+defined( 'GUTENBERG_DEVELOPMENT_MODE' ) or define( 'GUTENBERG_DEVELOPMENT_MODE', true );
### END AUTO-GENERATED DEFINES
gutenberg_pre_init();
diff --git a/lib/client-assets.php b/lib/client-assets.php
index 419c4131c98e8e..47949cdccea4f0 100644
--- a/lib/client-assets.php
+++ b/lib/client-assets.php
@@ -114,9 +114,14 @@ function gutenberg_override_translation_file( $file, $handle ) {
return $file;
}
- // Only override script handles generated from the Gutenberg plugin.
- $packages_dependencies = include dirname( __FILE__ ) . '/packages-dependencies.php';
- if ( ! isset( $packages_dependencies[ $handle ] ) ) {
+ // Ignore scripts whose handle does not have the "wp-" prefix.
+ if ( 'wp-' !== substr( $handle, 0, 3 ) ) {
+ return $file;
+ }
+
+ // Ignore scripts that are not found in the expected `build/` location.
+ $script_path = gutenberg_dir_path() . 'build/' . substr( $handle, 3 ) . '/index.js';
+ if ( ! file_exists( $script_path ) ) {
return $file;
}
@@ -177,17 +182,37 @@ function gutenberg_override_style( $handle, $src, $deps = array(), $ver = false,
* @since 4.5.0
*/
function gutenberg_register_packages_scripts() {
- $packages_dependencies = include dirname( __FILE__ ) . '/packages-dependencies.php';
+ foreach ( glob( gutenberg_dir_path() . 'build/*/index.js' ) as $path ) {
+ // Prefix `wp-` to package directory to get script handle.
+ // For example, `…/build/a11y/index.js` becomes `wp-a11y`.
+ $handle = 'wp-' . basename( dirname( $path ) );
+
+ // Replace `.js` extension with `.deps.json` to find the generated dependencies file.
+ $dependencies_file = substr( $path, 0, -3 ) . '.deps.json';
+
+ $dependencies = is_readable( $dependencies_file )
+ ? json_decode( file_get_contents( $dependencies_file ) )
+ : array();
+
+ // Add dependencies that cannot be detected and generated by build tools.
+ switch ( $handle ) {
+ case 'wp-block-library':
+ array_push( $dependencies, 'editor' );
+ break;
+
+ case 'wp-edit-post':
+ array_push( $dependencies, 'media-models', 'media-views', 'postbox' );
+ break;
+ }
+
+ // Get the path from Gutenberg directory as expected by `gutenberg_url`.
+ $gutenberg_path = substr( $path, strlen( gutenberg_dir_path() ) );
- foreach ( $packages_dependencies as $handle => $dependencies ) {
- // Remove `wp-` prefix from the handle to get the package's name.
- $package_name = strpos( $handle, 'wp-' ) === 0 ? substr( $handle, 3 ) : $handle;
- $path = "build/$package_name/index.js";
gutenberg_override_script(
$handle,
- gutenberg_url( $path ),
- array_merge( $dependencies, array( 'wp-polyfill' ) ),
- filemtime( gutenberg_dir_path() . $path ),
+ gutenberg_url( $gutenberg_path ),
+ $dependencies,
+ filemtime( $path ),
true
);
}
@@ -560,3 +585,32 @@ function gutenberg_extend_block_editor_styles( $settings ) {
return $settings;
}
add_filter( 'block_editor_settings', 'gutenberg_extend_block_editor_styles' );
+
+/**
+ * Extends block editor preload paths to preload additional data. Note that any
+ * additions here should be complemented with a corresponding core ticket to
+ * reconcile the change upstream for future removal from Gutenberg.
+ *
+ * @since 5.6.0
+ *
+ * @param array $preload_paths $preload_paths Array of paths to preload.
+ *
+ * @return array Filtered array of paths to preload.
+ */
+function gutenberg_extend_block_editor_preload_paths( $preload_paths ) {
+ /*
+ * Used in considering user permissions for creating and updating blocks,
+ * as condition for displaying relevant actions in the interface.
+ *
+ * Trac ticket: https://core.trac.wordpress.org/ticket/46429
+ *
+ * This is present in WordPress 5.2 and should be removed from Gutenberg
+ * once WordPress 5.2 is the minimum supported version.
+ */
+ if ( ! in_array( array( '/wp/v2/blocks', 'OPTIONS' ), $preload_paths ) ) {
+ $preload_paths[] = array( '/wp/v2/blocks', 'OPTIONS' );
+ }
+
+ return $preload_paths;
+}
+add_filter( 'block_editor_preload_paths', 'gutenberg_extend_block_editor_preload_paths' );
diff --git a/lib/packages-dependencies.php b/lib/packages-dependencies.php
deleted file mode 100644
index 8a1f78fafe4565..00000000000000
--- a/lib/packages-dependencies.php
+++ /dev/null
@@ -1,265 +0,0 @@
- array(
- 'wp-dom-ready',
- ),
- 'wp-annotations' => array(
- 'wp-data',
- 'wp-hooks',
- 'wp-i18n',
- 'wp-rich-text',
- ),
- 'wp-api-fetch' => array(
- 'wp-i18n',
- 'wp-url',
- ),
- 'wp-autop' => array(),
- 'wp-blob' => array(),
- 'wp-block-library' => array(
- 'editor',
- 'lodash',
- 'wp-api-fetch',
- 'wp-autop',
- 'wp-blob',
- 'wp-block-editor',
- 'wp-blocks',
- 'wp-components',
- 'wp-compose',
- 'wp-core-data',
- 'wp-data',
- 'wp-date',
- 'wp-editor',
- 'wp-element',
- 'wp-html-entities',
- 'wp-i18n',
- 'wp-keycodes',
- 'wp-rich-text',
- 'wp-url',
- 'wp-viewport',
- ),
- 'wp-block-serialization-default-parser' => array(),
- 'wp-block-serialization-spec-parser' => array(),
- 'wp-block-editor' => array(
- 'lodash',
- 'wp-a11y',
- 'wp-blob',
- 'wp-blocks',
- 'wp-compose',
- 'wp-components',
- 'wp-data',
- 'wp-dom',
- 'wp-element',
- 'wp-hooks',
- 'wp-html-entities',
- 'wp-i18n',
- 'wp-is-shallow-equal',
- 'wp-keycodes',
- 'wp-rich-text',
- 'wp-token-list',
- 'wp-url',
- 'wp-viewport',
- 'wp-wordcount',
- ),
- 'wp-blocks' => array(
- 'lodash',
- 'wp-autop',
- 'wp-blob',
- 'wp-block-serialization-default-parser',
- 'wp-data',
- 'wp-dom',
- 'wp-element',
- 'wp-hooks',
- 'wp-html-entities',
- 'wp-i18n',
- 'wp-is-shallow-equal',
- 'wp-shortcode',
- ),
- 'wp-components' => array(
- 'lodash',
- 'moment',
- 'wp-a11y',
- 'wp-api-fetch',
- 'wp-compose',
- 'wp-dom',
- 'wp-element',
- 'wp-hooks',
- 'wp-html-entities',
- 'wp-i18n',
- 'wp-is-shallow-equal',
- 'wp-keycodes',
- 'wp-rich-text',
- 'wp-url',
- ),
- 'wp-compose' => array(
- 'lodash',
- 'wp-element',
- 'wp-is-shallow-equal',
- ),
- 'wp-core-data' => array(
- 'lodash',
- 'wp-api-fetch',
- 'wp-data',
- 'wp-deprecated',
- 'wp-url',
- ),
- 'wp-data' => array(
- 'lodash',
- 'wp-compose',
- 'wp-deprecated',
- 'wp-element',
- 'wp-is-shallow-equal',
- 'wp-priority-queue',
- 'wp-redux-routine',
- ),
- 'wp-date' => array(
- 'moment',
- ),
- 'wp-deprecated' => array(
- 'wp-hooks',
- ),
- 'wp-dom' => array(
- 'lodash',
- ),
- 'wp-dom-ready' => array(),
- 'wp-edit-post' => array(
- 'jquery',
- 'lodash',
- 'postbox',
- 'media-models',
- 'media-views',
- 'wp-a11y',
- 'wp-api-fetch',
- 'wp-block-editor',
- 'wp-block-library',
- 'wp-blocks',
- 'wp-components',
- 'wp-compose',
- 'wp-core-data',
- 'wp-data',
- 'wp-dom-ready',
- 'wp-editor',
- 'wp-element',
- 'wp-embed',
- 'wp-i18n',
- 'wp-keycodes',
- 'wp-notices',
- 'wp-nux',
- 'wp-plugins',
- 'wp-url',
- 'wp-viewport',
- ),
- 'wp-edit-widgets' => array(
- 'wp-block-editor',
- 'wp-block-library',
- 'wp-components',
- 'wp-element',
- 'wp-i18n',
- ),
- 'wp-editor' => array(
- 'lodash',
- 'wp-a11y',
- 'wp-api-fetch',
- 'wp-blob',
- 'wp-block-editor',
- 'wp-blocks',
- 'wp-components',
- 'wp-compose',
- 'wp-core-data',
- 'wp-data',
- 'wp-date',
- 'wp-deprecated',
- 'wp-dom',
- 'wp-element',
- 'wp-hooks',
- 'wp-html-entities',
- 'wp-i18n',
- 'wp-is-shallow-equal',
- 'wp-keycodes',
- 'wp-notices',
- 'wp-nux',
- 'wp-rich-text',
- 'wp-token-list',
- 'wp-url',
- 'wp-viewport',
- 'wp-wordcount',
- ),
- 'wp-element' => array(
- 'lodash',
- 'react',
- 'react-dom',
- 'wp-escape-html',
- ),
- 'wp-escape-html' => array(),
- 'wp-format-library' => array(
- 'wp-block-editor',
- 'wp-components',
- 'wp-editor',
- 'wp-element',
- 'wp-i18n',
- 'wp-keycodes',
- 'wp-rich-text',
- 'wp-url',
- ),
- 'wp-hooks' => array(),
- 'wp-html-entities' => array(),
- 'wp-i18n' => array(),
- 'wp-is-shallow-equal' => array(),
- 'wp-keycodes' => array(
- 'lodash',
- 'wp-i18n',
- ),
- 'wp-list-reusable-blocks' => array(
- 'lodash',
- 'wp-api-fetch',
- 'wp-components',
- 'wp-compose',
- 'wp-element',
- 'wp-i18n',
- ),
- 'wp-notices' => array(
- 'lodash',
- 'wp-a11y',
- 'wp-data',
- ),
- 'wp-nux' => array(
- 'lodash',
- 'wp-components',
- 'wp-compose',
- 'wp-data',
- 'wp-element',
- 'wp-i18n',
- ),
- 'wp-plugins' => array(
- 'lodash',
- 'wp-compose',
- 'wp-element',
- 'wp-hooks',
- ),
- 'wp-priority-queue' => array(),
- 'wp-redux-routine' => array(),
- 'wp-rich-text' => array(
- 'lodash',
- 'wp-data',
- 'wp-escape-html',
- ),
- 'wp-shortcode' => array(
- 'lodash',
- ),
- 'wp-token-list' => array(
- 'lodash',
- ),
- 'wp-url' => array(),
- 'wp-viewport' => array(
- 'lodash',
- 'wp-compose',
- 'wp-data',
- 'wp-element',
- ),
- 'wp-wordcount' => array(),
-);
diff --git a/package-lock.json b/package-lock.json
index 689c0f89e40526..cac714a983cf21 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
- "version": "5.5.0",
+ "version": "5.6.0-rc.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -14,22 +14,22 @@
}
},
"@babel/core": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.2.2.tgz",
- "integrity": "sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.4.tgz",
+ "integrity": "sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.2.2",
- "@babel/helpers": "^7.2.0",
- "@babel/parser": "^7.2.2",
- "@babel/template": "^7.2.2",
- "@babel/traverse": "^7.2.2",
- "@babel/types": "^7.2.2",
+ "@babel/generator": "^7.4.4",
+ "@babel/helpers": "^7.4.4",
+ "@babel/parser": "^7.4.4",
+ "@babel/template": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4",
"convert-source-map": "^1.1.0",
"debug": "^4.1.0",
"json5": "^2.1.0",
- "lodash": "^4.17.10",
+ "lodash": "^4.17.11",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@@ -68,14 +68,14 @@
}
},
"@babel/generator": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz",
- "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz",
+ "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==",
"dev": true,
"requires": {
- "@babel/types": "^7.3.2",
+ "@babel/types": "^7.4.4",
"jsesc": "^2.5.1",
- "lodash": "^4.17.10",
+ "lodash": "^4.17.11",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
@@ -110,25 +110,25 @@
}
},
"@babel/helper-call-delegate": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz",
- "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz",
+ "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.0.0",
- "@babel/traverse": "^7.1.0",
- "@babel/types": "^7.0.0"
+ "@babel/helper-hoist-variables": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-define-map": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz",
- "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz",
+ "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==",
"dev": true,
"requires": {
"@babel/helper-function-name": "^7.1.0",
- "@babel/types": "^7.0.0",
- "lodash": "^4.17.10"
+ "@babel/types": "^7.4.4",
+ "lodash": "^4.17.11"
}
},
"@babel/helper-explode-assignable-expression": {
@@ -162,12 +162,12 @@
}
},
"@babel/helper-hoist-variables": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz",
- "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz",
+ "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==",
"dev": true,
"requires": {
- "@babel/types": "^7.0.0"
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-member-expression-to-functions": {
@@ -189,17 +189,17 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz",
- "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz",
+ "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/helper-simple-access": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
- "@babel/template": "^7.2.2",
- "@babel/types": "^7.2.2",
- "lodash": "^4.17.10"
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/template": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "lodash": "^4.17.11"
}
},
"@babel/helper-optimise-call-expression": {
@@ -218,12 +218,12 @@
"dev": true
},
"@babel/helper-regex": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz",
- "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz",
+ "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==",
"dev": true,
"requires": {
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
}
},
"@babel/helper-remap-async-to-generator": {
@@ -240,15 +240,15 @@
}
},
"@babel/helper-replace-supers": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz",
- "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz",
+ "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "^7.0.0",
"@babel/helper-optimise-call-expression": "^7.0.0",
- "@babel/traverse": "^7.2.3",
- "@babel/types": "^7.0.0"
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-simple-access": {
@@ -262,12 +262,12 @@
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz",
- "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz",
+ "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
"dev": true,
"requires": {
- "@babel/types": "^7.0.0"
+ "@babel/types": "^7.4.4"
}
},
"@babel/helper-wrap-function": {
@@ -283,14 +283,14 @@
}
},
"@babel/helpers": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz",
- "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz",
+ "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==",
"dev": true,
"requires": {
- "@babel/template": "^7.1.2",
- "@babel/traverse": "^7.1.5",
- "@babel/types": "^7.3.0"
+ "@babel/template": "^7.4.4",
+ "@babel/traverse": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/highlight": {
@@ -305,9 +305,9 @@
}
},
"@babel/parser": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz",
- "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz",
+ "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==",
"dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
@@ -332,9 +332,9 @@
}
},
"@babel/plugin-proposal-object-rest-spread": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.2.tgz",
- "integrity": "sha512-DjeMS+J2+lpANkYLLO+m6GjoTMygYglKmRe6cDTbFv3L9i6mmiE8fe6B8MtCSLZpVXscD5kn7s6SgtHrDoBWoA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz",
+ "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
@@ -352,14 +352,14 @@
}
},
"@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz",
- "integrity": "sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz",
+ "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.2.0"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/plugin-syntax-async-generators": {
@@ -426,9 +426,9 @@
}
},
"@babel/plugin-transform-async-to-generator": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz",
- "integrity": "sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz",
+ "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
@@ -446,28 +446,28 @@
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz",
- "integrity": "sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz",
+ "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
}
},
"@babel/plugin-transform-classes": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz",
- "integrity": "sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz",
+ "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.0.0",
- "@babel/helper-define-map": "^7.1.0",
+ "@babel/helper-define-map": "^7.4.4",
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-optimise-call-expression": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-replace-supers": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
+ "@babel/helper-replace-supers": "^7.4.4",
+ "@babel/helper-split-export-declaration": "^7.4.4",
"globals": "^11.1.0"
}
},
@@ -481,23 +481,23 @@
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz",
- "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz",
+ "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-transform-dotall-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz",
- "integrity": "sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz",
+ "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.1.3"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/plugin-transform-duplicate-keys": {
@@ -530,18 +530,18 @@
}
},
"@babel/plugin-transform-for-of": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz",
- "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz",
+ "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-transform-function-name": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz",
- "integrity": "sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz",
+ "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==",
"dev": true,
"requires": {
"@babel/helper-function-name": "^7.1.0",
@@ -557,6 +557,15 @@
"@babel/helper-plugin-utils": "^7.0.0"
}
},
+ "@babel/plugin-transform-member-expression-literals": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz",
+ "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
"@babel/plugin-transform-modules-amd": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz",
@@ -568,23 +577,23 @@
}
},
"@babel/plugin-transform-modules-commonjs": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz",
- "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz",
+ "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.1.0",
+ "@babel/helper-module-transforms": "^7.4.4",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-simple-access": "^7.1.0"
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz",
- "integrity": "sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz",
+ "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.0.0",
+ "@babel/helper-hoist-variables": "^7.4.4",
"@babel/helper-plugin-utils": "^7.0.0"
}
},
@@ -599,18 +608,18 @@
}
},
"@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz",
- "integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz",
+ "integrity": "sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA==",
"dev": true,
"requires": {
"regexp-tree": "^0.1.0"
}
},
"@babel/plugin-transform-new-target": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz",
- "integrity": "sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz",
+ "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
@@ -627,16 +636,25 @@
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz",
- "integrity": "sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz",
+ "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==",
"dev": true,
"requires": {
- "@babel/helper-call-delegate": "^7.1.0",
+ "@babel/helper-call-delegate": "^7.4.4",
"@babel/helper-get-function-arity": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0"
}
},
+ "@babel/plugin-transform-property-literals": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz",
+ "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
"@babel/plugin-transform-react-jsx": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz",
@@ -649,18 +667,27 @@
}
},
"@babel/plugin-transform-regenerator": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz",
- "integrity": "sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz",
+ "integrity": "sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g==",
"dev": true,
"requires": {
- "regenerator-transform": "^0.13.3"
+ "regenerator-transform": "^0.13.4"
}
},
- "@babel/plugin-transform-runtime": {
+ "@babel/plugin-transform-reserved-words": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz",
- "integrity": "sha512-jIgkljDdq4RYDnJyQsiWbdvGeei/0MOTtSHKO/rfbd/mXBxNpdlulMx49L0HQ4pug1fXannxoqCI+fYSle9eSw==",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz",
+ "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0"
+ }
+ },
+ "@babel/plugin-transform-runtime": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz",
+ "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
@@ -670,9 +697,9 @@
},
"dependencies": {
"semver": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
- "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
}
}
@@ -706,9 +733,9 @@
}
},
"@babel/plugin-transform-template-literals": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz",
- "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz",
+ "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.0.0",
@@ -725,111 +752,141 @@
}
},
"@babel/plugin-transform-unicode-regex": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz",
- "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz",
+ "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
- "@babel/helper-regex": "^7.0.0",
- "regexpu-core": "^4.1.3"
+ "@babel/helper-regex": "^7.4.4",
+ "regexpu-core": "^4.5.4"
}
},
"@babel/preset-env": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.1.tgz",
- "integrity": "sha512-FHKrD6Dxf30e8xgHQO0zJZpUPfVZg+Xwgz5/RdSWCbza9QLNk4Qbp40ctRoqDxml3O8RMzB1DU55SXeDG6PqHQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.4.tgz",
+ "integrity": "sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
- "@babel/plugin-proposal-object-rest-spread": "^7.3.1",
+ "@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
- "@babel/plugin-proposal-unicode-property-regex": "^7.2.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
"@babel/plugin-syntax-async-generators": "^7.2.0",
"@babel/plugin-syntax-json-strings": "^7.2.0",
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
"@babel/plugin-syntax-optional-catch-binding": "^7.2.0",
"@babel/plugin-transform-arrow-functions": "^7.2.0",
- "@babel/plugin-transform-async-to-generator": "^7.2.0",
+ "@babel/plugin-transform-async-to-generator": "^7.4.4",
"@babel/plugin-transform-block-scoped-functions": "^7.2.0",
- "@babel/plugin-transform-block-scoping": "^7.2.0",
- "@babel/plugin-transform-classes": "^7.2.0",
+ "@babel/plugin-transform-block-scoping": "^7.4.4",
+ "@babel/plugin-transform-classes": "^7.4.4",
"@babel/plugin-transform-computed-properties": "^7.2.0",
- "@babel/plugin-transform-destructuring": "^7.2.0",
- "@babel/plugin-transform-dotall-regex": "^7.2.0",
+ "@babel/plugin-transform-destructuring": "^7.4.4",
+ "@babel/plugin-transform-dotall-regex": "^7.4.4",
"@babel/plugin-transform-duplicate-keys": "^7.2.0",
"@babel/plugin-transform-exponentiation-operator": "^7.2.0",
- "@babel/plugin-transform-for-of": "^7.2.0",
- "@babel/plugin-transform-function-name": "^7.2.0",
+ "@babel/plugin-transform-for-of": "^7.4.4",
+ "@babel/plugin-transform-function-name": "^7.4.4",
"@babel/plugin-transform-literals": "^7.2.0",
+ "@babel/plugin-transform-member-expression-literals": "^7.2.0",
"@babel/plugin-transform-modules-amd": "^7.2.0",
- "@babel/plugin-transform-modules-commonjs": "^7.2.0",
- "@babel/plugin-transform-modules-systemjs": "^7.2.0",
+ "@babel/plugin-transform-modules-commonjs": "^7.4.4",
+ "@babel/plugin-transform-modules-systemjs": "^7.4.4",
"@babel/plugin-transform-modules-umd": "^7.2.0",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0",
- "@babel/plugin-transform-new-target": "^7.0.0",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.4",
+ "@babel/plugin-transform-new-target": "^7.4.4",
"@babel/plugin-transform-object-super": "^7.2.0",
- "@babel/plugin-transform-parameters": "^7.2.0",
- "@babel/plugin-transform-regenerator": "^7.0.0",
+ "@babel/plugin-transform-parameters": "^7.4.4",
+ "@babel/plugin-transform-property-literals": "^7.2.0",
+ "@babel/plugin-transform-regenerator": "^7.4.4",
+ "@babel/plugin-transform-reserved-words": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.0",
"@babel/plugin-transform-sticky-regex": "^7.2.0",
- "@babel/plugin-transform-template-literals": "^7.2.0",
+ "@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/plugin-transform-typeof-symbol": "^7.2.0",
- "@babel/plugin-transform-unicode-regex": "^7.2.0",
- "browserslist": "^4.3.4",
+ "@babel/plugin-transform-unicode-regex": "^7.4.4",
+ "@babel/types": "^7.4.4",
+ "browserslist": "^4.5.2",
+ "core-js-compat": "^3.0.0",
"invariant": "^2.2.2",
"js-levenshtein": "^1.1.3",
- "semver": "^5.3.0"
+ "semver": "^5.5.0"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "4.5.5",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.5.tgz",
+ "integrity": "sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30000960",
+ "electron-to-chromium": "^1.3.124",
+ "node-releases": "^1.1.14"
+ }
+ },
+ "caniuse-lite": {
+ "version": "1.0.30000963",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000963.tgz",
+ "integrity": "sha512-n4HUiullc7Lw0LyzpeLa2ffP8KxFBGdxqD/8G3bSL6oB758hZ2UE2CVK+tQN958tJIi0/tfpjAc67aAtoHgnrQ==",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.3.127",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.127.tgz",
+ "integrity": "sha512-1o25iFRf/dbgauTWalEzmD1EmRN3a2CzP/K7UVpYLEBduk96LF0FyUdCcf4Ry2mAWJ1VxyblFjC93q6qlLwA2A==",
+ "dev": true
+ }
}
},
"@babel/runtime": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz",
- "integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz",
+ "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==",
"requires": {
- "regenerator-runtime": "^0.12.0"
+ "regenerator-runtime": "^0.13.2"
}
},
- "@babel/runtime-corejs2": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.3.1.tgz",
- "integrity": "sha512-YpO13776h3e6Wy8dl2J8T9Qwlvopr+b4trCEhHE+yek6yIqV8sx6g3KozdHMbXeBpjosbPi+Ii5Z7X9oXFHUKA==",
+ "@babel/runtime-corejs3": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.4.4.tgz",
+ "integrity": "sha512-9uYCgQvCVw4Jl5vVyTt6ZYIAgsLyAKx0CvBqOJW0D/bRx/jSOQS1A+31GiisgKhgyTt3/CWnbdGzFxxw8NOtlw==",
"dev": true,
"requires": {
- "core-js": "^2.5.7",
- "regenerator-runtime": "^0.12.0"
+ "core-js-pure": "^3.0.0",
+ "regenerator-runtime": "^0.13.2"
}
},
"@babel/template": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz",
- "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz",
+ "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.2.2",
- "@babel/types": "^7.2.2"
+ "@babel/parser": "^7.4.4",
+ "@babel/types": "^7.4.4"
}
},
"@babel/traverse": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz",
- "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz",
+ "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@babel/generator": "^7.2.2",
+ "@babel/generator": "^7.4.4",
"@babel/helper-function-name": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.0.0",
- "@babel/parser": "^7.2.3",
- "@babel/types": "^7.2.2",
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/parser": "^7.4.4",
+ "@babel/types": "^7.4.4",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.10"
+ "lodash": "^4.17.11"
},
"dependencies": {
"debug": {
@@ -850,13 +907,13 @@
}
},
"@babel/types": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz",
- "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==",
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz",
+ "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"dev": true,
"requires": {
"esutils": "^2.0.2",
- "lodash": "^4.17.10",
+ "lodash": "^4.17.11",
"to-fast-properties": "^2.0.0"
}
},
@@ -2891,14 +2948,14 @@
"@wordpress/a11y": {
"version": "file:packages/a11y",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/dom-ready": "file:packages/dom-ready"
}
},
"@wordpress/annotations": {
"version": "file:packages/annotations",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/data": "file:packages/data",
"@wordpress/hooks": "file:packages/hooks",
"@wordpress/i18n": "file:packages/i18n",
@@ -2911,7 +2968,7 @@
"@wordpress/api-fetch": {
"version": "file:packages/api-fetch",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/i18n": "file:packages/i18n",
"@wordpress/url": "file:packages/url"
}
@@ -2919,7 +2976,7 @@
"@wordpress/autop": {
"version": "file:packages/autop",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/babel-plugin-import-jsx-pragma": {
@@ -2930,7 +2987,7 @@
"version": "file:packages/babel-plugin-makepot",
"dev": true,
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.11"
}
@@ -2939,13 +2996,13 @@
"version": "file:packages/babel-preset-default",
"dev": true,
"requires": {
- "@babel/core": "^7.2.2",
+ "@babel/core": "^7.4.4",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
- "@babel/plugin-proposal-object-rest-spread": "^7.3.2",
+ "@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-transform-react-jsx": "^7.3.0",
- "@babel/plugin-transform-runtime": "^7.2.0",
- "@babel/preset-env": "^7.3.1",
- "@babel/runtime": "^7.3.1",
+ "@babel/plugin-transform-runtime": "^7.4.4",
+ "@babel/preset-env": "^7.4.4",
+ "@babel/runtime": "^7.4.4",
"@wordpress/babel-plugin-import-jsx-pragma": "file:packages/babel-plugin-import-jsx-pragma",
"@wordpress/browserslist-config": "file:packages/browserslist-config"
}
@@ -2953,13 +3010,13 @@
"@wordpress/blob": {
"version": "file:packages/blob",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/block-editor": {
"version": "file:packages/block-editor",
"requires": {
- "@babel/runtime": "^7.0.0",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:packages/a11y",
"@wordpress/blob": "file:packages/blob",
"@wordpress/blocks": "file:packages/blocks",
@@ -2990,7 +3047,7 @@
"@wordpress/block-library": {
"version": "file:packages/block-library",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/autop": "file:packages/autop",
"@wordpress/blob": "file:packages/blob",
"@wordpress/block-editor": "file:packages/block-editor",
@@ -3016,7 +3073,7 @@
"@wordpress/block-serialization-default-parser": {
"version": "file:packages/block-serialization-default-parser",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/block-serialization-spec-parser": {
@@ -3028,7 +3085,7 @@
"@wordpress/blocks": {
"version": "file:packages/blocks",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/autop": "file:packages/autop",
"@wordpress/blob": "file:packages/blob",
"@wordpress/block-serialization-default-parser": "file:packages/block-serialization-default-parser",
@@ -3045,7 +3102,7 @@
"lodash": "^4.17.11",
"rememo": "^3.0.0",
"showdown": "^1.8.6",
- "simple-html-tokenizer": "^0.4.1",
+ "simple-html-tokenizer": "^0.5.7",
"tinycolor2": "^1.4.1",
"uuid": "^3.3.2"
}
@@ -3057,7 +3114,7 @@
"@wordpress/components": {
"version": "file:packages/components",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:packages/a11y",
"@wordpress/api-fetch": "file:packages/api-fetch",
"@wordpress/compose": "file:packages/compose",
@@ -3088,7 +3145,7 @@
"@wordpress/compose": {
"version": "file:packages/compose",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/element": "file:packages/element",
"@wordpress/is-shallow-equal": "file:packages/is-shallow-equal",
"lodash": "^4.17.11"
@@ -3097,7 +3154,7 @@
"@wordpress/core-data": {
"version": "file:packages/core-data",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:packages/api-fetch",
"@wordpress/data": "file:packages/data",
"@wordpress/deprecated": "file:packages/deprecated",
@@ -3111,14 +3168,14 @@
"version": "file:packages/custom-templated-path-webpack-plugin",
"dev": true,
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"escape-string-regexp": "^1.0.5"
}
},
"@wordpress/data": {
"version": "file:packages/data",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:packages/compose",
"@wordpress/deprecated": "file:packages/deprecated",
"@wordpress/element": "file:packages/element",
@@ -3135,7 +3192,7 @@
"@wordpress/date": {
"version": "file:packages/date",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"moment": "^2.22.1",
"moment-timezone": "^0.5.16"
}
@@ -3169,7 +3226,7 @@
"@wordpress/deprecated": {
"version": "file:packages/deprecated",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/hooks": "file:packages/hooks"
}
},
@@ -3187,21 +3244,21 @@
"@wordpress/dom": {
"version": "file:packages/dom",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
}
},
"@wordpress/dom-ready": {
"version": "file:packages/dom-ready",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/e2e-test-utils": {
"version": "file:packages/e2e-test-utils",
"dev": true,
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/keycodes": "file:packages/keycodes",
"@wordpress/url": "file:packages/url",
"lodash": "^4.17.11",
@@ -3222,7 +3279,7 @@
"@wordpress/edit-post": {
"version": "file:packages/edit-post",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:packages/a11y",
"@wordpress/api-fetch": "file:packages/api-fetch",
"@wordpress/block-editor": "file:packages/block-editor",
@@ -3250,7 +3307,7 @@
"@wordpress/edit-widgets": {
"version": "file:packages/edit-widgets",
"requires": {
- "@babel/runtime": "^7.0.0",
+ "@babel/runtime": "^7.4.4",
"@wordpress/block-editor": "file:packages/block-editor",
"@wordpress/components": "file:packages/components",
"@wordpress/element": "file:packages/element",
@@ -3260,7 +3317,7 @@
"@wordpress/editor": {
"version": "file:packages/editor",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:packages/api-fetch",
"@wordpress/blob": "file:packages/blob",
"@wordpress/block-editor": "file:packages/block-editor",
@@ -3295,7 +3352,7 @@
"@wordpress/element": {
"version": "file:packages/element",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/escape-html": "file:packages/escape-html",
"lodash": "^4.17.11",
"react": "^16.8.4",
@@ -3305,14 +3362,14 @@
"@wordpress/escape-html": {
"version": "file:packages/escape-html",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/eslint-plugin": {
"version": "file:packages/eslint-plugin",
"dev": true,
"requires": {
- "babel-eslint": "^8.0.3",
+ "babel-eslint": "^10.0.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.6.0",
@@ -3322,7 +3379,7 @@
"@wordpress/format-library": {
"version": "file:packages/format-library",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/block-editor": "file:packages/block-editor",
"@wordpress/components": "file:packages/components",
"@wordpress/editor": "file:packages/editor",
@@ -3336,19 +3393,19 @@
"@wordpress/hooks": {
"version": "file:packages/hooks",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/html-entities": {
"version": "file:packages/html-entities",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/i18n": {
"version": "file:packages/i18n",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.11",
"memize": "^1.0.5",
@@ -3359,14 +3416,14 @@
"@wordpress/is-shallow-equal": {
"version": "file:packages/is-shallow-equal",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/jest-console": {
"version": "file:packages/jest-console",
"dev": true,
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"jest-matcher-utils": "^24.7.0",
"lodash": "^4.17.11"
}
@@ -3392,7 +3449,7 @@
"@wordpress/keycodes": {
"version": "file:packages/keycodes",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/i18n": "file:packages/i18n",
"lodash": "^4.17.11"
}
@@ -3401,7 +3458,7 @@
"version": "file:packages/library-export-default-webpack-plugin",
"dev": true,
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11",
"webpack-sources": "^1.1.0"
}
@@ -3409,7 +3466,7 @@
"@wordpress/list-reusable-blocks": {
"version": "file:packages/list-reusable-blocks",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:packages/api-fetch",
"@wordpress/components": "file:packages/components",
"@wordpress/compose": "file:packages/compose",
@@ -3421,7 +3478,7 @@
"@wordpress/notices": {
"version": "file:packages/notices",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:packages/a11y",
"@wordpress/data": "file:packages/data",
"lodash": "^4.17.11"
@@ -3434,7 +3491,7 @@
"@wordpress/nux": {
"version": "file:packages/nux",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/components": "file:packages/components",
"@wordpress/compose": "file:packages/compose",
"@wordpress/data": "file:packages/data",
@@ -3447,7 +3504,7 @@
"@wordpress/plugins": {
"version": "file:packages/plugins",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:packages/compose",
"@wordpress/element": "file:packages/element",
"@wordpress/hooks": "file:packages/hooks",
@@ -3466,13 +3523,13 @@
"@wordpress/priority-queue": {
"version": "file:packages/priority-queue",
"requires": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
}
},
"@wordpress/redux-routine": {
"version": "file:packages/redux-routine",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"is-promise": "^2.1.0",
"rungen": "^0.3.2"
}
@@ -3480,7 +3537,7 @@
"@wordpress/rich-text": {
"version": "file:packages/rich-text",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:packages/compose",
"@wordpress/data": "file:packages/data",
"@wordpress/escape-html": "file:packages/escape-html",
@@ -3502,7 +3559,7 @@
"chalk": "^2.4.1",
"check-node-version": "^3.1.1",
"cross-spawn": "^5.1.0",
- "eslint": "^5.12.1",
+ "eslint": "^5.16.0",
"jest": "^24.7.1",
"jest-puppeteer": "^4.0.0",
"npm-package-json-lint": "^3.6.0",
@@ -3522,7 +3579,7 @@
"@wordpress/shortcode": {
"version": "file:packages/shortcode",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11",
"memize": "^1.0.5"
}
@@ -3530,21 +3587,21 @@
"@wordpress/token-list": {
"version": "file:packages/token-list",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
}
},
"@wordpress/url": {
"version": "file:packages/url",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"qs": "^6.5.2"
}
},
"@wordpress/viewport": {
"version": "file:packages/viewport",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:packages/compose",
"@wordpress/data": "file:packages/data",
"@wordpress/element": "file:packages/element",
@@ -3554,7 +3611,7 @@
"@wordpress/wordcount": {
"version": "file:packages/wordcount",
"requires": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
}
},
@@ -4095,105 +4152,28 @@
}
},
"babel-eslint": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.0.3.tgz",
- "integrity": "sha512-7D4iUpylEiKJPGbeSAlNddGcmA41PadgZ6UAb6JVyh003h3d0EbZusYFBR/+nBgqtaVJM2J2zUVa3N0hrpMH6g==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz",
+ "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==",
"dev": true,
"requires": {
- "@babel/code-frame": "7.0.0-beta.31",
- "@babel/traverse": "7.0.0-beta.31",
- "@babel/types": "7.0.0-beta.31",
- "babylon": "7.0.0-beta.31"
+ "@babel/code-frame": "^7.0.0",
+ "@babel/parser": "^7.0.0",
+ "@babel/traverse": "^7.0.0",
+ "@babel/types": "^7.0.0",
+ "eslint-scope": "3.7.1",
+ "eslint-visitor-keys": "^1.0.0"
},
"dependencies": {
- "@babel/code-frame": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz",
- "integrity": "sha512-yd7CkUughvHQoEahQqcMdrZw6o/6PwUxiRkfZuVDVHCDe77mysD/suoNyk5mK6phTnRW1kyIbPHyCJgxw++LXg==",
- "dev": true,
- "requires": {
- "chalk": "^2.0.0",
- "esutils": "^2.0.2",
- "js-tokens": "^3.0.0"
- }
- },
- "@babel/helper-function-name": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz",
- "integrity": "sha512-c+DAyp8LMm2nzSs2uXEuxp4LYGSUYEyHtU3fU57avFChjsnTmmpWmXj2dv0yUxHTEydgVAv5fIzA+4KJwoqWDA==",
- "dev": true,
- "requires": {
- "@babel/helper-get-function-arity": "7.0.0-beta.31",
- "@babel/template": "7.0.0-beta.31",
- "@babel/traverse": "7.0.0-beta.31",
- "@babel/types": "7.0.0-beta.31"
- }
- },
- "@babel/helper-get-function-arity": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz",
- "integrity": "sha512-m7rVVX/dMLbbB9NCzKYRrrFb0qZxgpmQ4Wv6y7zEsB6skoJHRuXVeb/hAFze79vXBbuD63ci7AVHXzAdZSk9KQ==",
- "dev": true,
- "requires": {
- "@babel/types": "7.0.0-beta.31"
- }
- },
- "@babel/template": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.31.tgz",
- "integrity": "sha512-97IRmLvoDhIDSQkqklVt3UCxJsv0LUEVb/0DzXWtc8Lgiyxj567qZkmTG9aR21CmcJVVIvq2Y/moZj4oEpl5AA==",
- "dev": true,
- "requires": {
- "@babel/code-frame": "7.0.0-beta.31",
- "@babel/types": "7.0.0-beta.31",
- "babylon": "7.0.0-beta.31",
- "lodash": "^4.2.0"
- }
- },
- "@babel/traverse": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.31.tgz",
- "integrity": "sha512-3N+VJW+KlezEjFBG7WSYeMyC5kIqVLPb/PGSzCDPFcJrnArluD1GIl7Y3xC7cjKiTq2/JohaLWHVPjJWHlo9Gg==",
- "dev": true,
- "requires": {
- "@babel/code-frame": "7.0.0-beta.31",
- "@babel/helper-function-name": "7.0.0-beta.31",
- "@babel/types": "7.0.0-beta.31",
- "babylon": "7.0.0-beta.31",
- "debug": "^3.0.1",
- "globals": "^10.0.0",
- "invariant": "^2.2.0",
- "lodash": "^4.2.0"
- }
- },
- "@babel/types": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.31.tgz",
- "integrity": "sha512-exAHB+NeFGxkfQ5dSUD03xl3zYGneeSk2Mw2ldTt/nTvYxuDiuSp3DlxgUBgzbdTFG4fbwPk0WtKWOoTXCmNGg==",
+ "eslint-scope": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
+ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
"dev": true,
"requires": {
- "esutils": "^2.0.2",
- "lodash": "^4.2.0",
- "to-fast-properties": "^2.0.0"
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
}
- },
- "babylon": {
- "version": "7.0.0-beta.31",
- "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.31.tgz",
- "integrity": "sha512-6lm2mV3S51yEnKmQQNnswoABL1U1H1KHoCCVwdwI3hvIv+W7ya4ki7Aw4o4KxtUHjNKkK5WpZb22rrMMOcJXJQ==",
- "dev": true
- },
- "globals": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-10.4.0.tgz",
- "integrity": "sha512-uNUtxIZpGyuaq+5BqGGQHsL4wUlJAXRqOm6g3Y48/CWNGTLONgBibI0lh6lGxjR2HljFYUfszb+mk4WkgMntsA==",
- "dev": true
- },
- "js-tokens": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
- "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
- "dev": true
}
}
},
@@ -4340,14 +4320,14 @@
}
},
"babel-plugin-istanbul": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz",
- "integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==",
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.3.tgz",
+ "integrity": "sha512-IFyehbvRRwdBlI1lDp+FaMsWNnEndEk7065IB8NhzBX+ZKLPwPodgk4I5Gobw/8SNUUzso2Dv3hbqRh88eiSCQ==",
"dev": true,
"requires": {
"find-up": "^3.0.0",
- "istanbul-lib-instrument": "^3.0.0",
- "test-exclude": "^5.0.0"
+ "istanbul-lib-instrument": "^3.2.0",
+ "test-exclude": "^5.2.2"
},
"dependencies": {
"find-up": {
@@ -4359,6 +4339,27 @@
"locate-path": "^3.0.0"
}
},
+ "istanbul-lib-coverage": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
+ "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==",
+ "dev": true
+ },
+ "istanbul-lib-instrument": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz",
+ "integrity": "sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg==",
+ "dev": true,
+ "requires": {
+ "@babel/generator": "^7.0.0",
+ "@babel/parser": "^7.0.0",
+ "@babel/template": "^7.0.0",
+ "@babel/traverse": "^7.0.0",
+ "@babel/types": "^7.0.0",
+ "istanbul-lib-coverage": "^2.0.4",
+ "semver": "^6.0.0"
+ }
+ },
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@@ -4392,6 +4393,12 @@
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
+ },
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
+ "dev": true
}
}
},
@@ -4424,6 +4431,12 @@
"regenerator-runtime": "^0.11.0"
},
"dependencies": {
+ "core-js": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
+ "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
+ "dev": true
+ },
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
@@ -5871,12 +5884,6 @@
"safe-buffer": "^5.0.1"
}
},
- "circular-json": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
- "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
- "dev": true
- },
"clap": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz",
@@ -7005,9 +7012,58 @@
}
},
"core-js": {
- "version": "2.5.7",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
- "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz",
+ "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==",
+ "dev": true
+ },
+ "core-js-compat": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz",
+ "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.5.4",
+ "core-js": "3.0.1",
+ "core-js-pure": "3.0.1",
+ "semver": "^6.0.0"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "4.5.5",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.5.tgz",
+ "integrity": "sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30000960",
+ "electron-to-chromium": "^1.3.124",
+ "node-releases": "^1.1.14"
+ }
+ },
+ "caniuse-lite": {
+ "version": "1.0.30000963",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000963.tgz",
+ "integrity": "sha512-n4HUiullc7Lw0LyzpeLa2ffP8KxFBGdxqD/8G3bSL6oB758hZ2UE2CVK+tQN958tJIi0/tfpjAc67aAtoHgnrQ==",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.3.125",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.125.tgz",
+ "integrity": "sha512-XxowpqQxJ4nDwUXHtVtmEhRqBpm2OnjBomZmZtHD0d2Eo0244+Ojezhk3sD/MBSSe2nxCdGQFRXHIsf/LUTL9A==",
+ "dev": true
+ },
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
+ "dev": true
+ }
+ }
+ },
+ "core-js-pure": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz",
+ "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==",
"dev": true
},
"core-util-is": {
@@ -8316,54 +8372,53 @@
}
},
"eslint": {
- "version": "5.12.1",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.1.tgz",
- "integrity": "sha512-54NV+JkTpTu0d8+UYSA8mMKAG4XAsaOrozA9rCW7tgneg1mevcL7wIotPC+fZ0SkWwdhNqoXoxnQCTBp7UvTsg==",
+ "version": "5.16.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
+ "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "ajv": "^6.5.3",
+ "ajv": "^6.9.1",
"chalk": "^2.1.0",
"cross-spawn": "^6.0.5",
"debug": "^4.0.1",
- "doctrine": "^2.1.0",
- "eslint-scope": "^4.0.0",
+ "doctrine": "^3.0.0",
+ "eslint-scope": "^4.0.3",
"eslint-utils": "^1.3.1",
"eslint-visitor-keys": "^1.0.0",
- "espree": "^5.0.0",
+ "espree": "^5.0.1",
"esquery": "^1.0.1",
"esutils": "^2.0.2",
- "file-entry-cache": "^2.0.0",
+ "file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
"glob": "^7.1.2",
"globals": "^11.7.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
- "inquirer": "^6.1.0",
- "js-yaml": "^3.12.0",
+ "inquirer": "^6.2.2",
+ "js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
- "lodash": "^4.17.5",
+ "lodash": "^4.17.11",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
"optionator": "^0.8.2",
"path-is-inside": "^1.0.2",
- "pluralize": "^7.0.0",
"progress": "^2.0.0",
"regexpp": "^2.0.1",
"semver": "^5.5.1",
"strip-ansi": "^4.0.0",
"strip-json-comments": "^2.0.1",
- "table": "^5.0.2",
+ "table": "^5.2.3",
"text-table": "^0.2.0"
},
"dependencies": {
"acorn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz",
- "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
+ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==",
"dev": true
},
"acorn-jsx": {
@@ -8373,9 +8428,9 @@
"dev": true
},
"ajv": {
- "version": "6.7.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz",
- "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==",
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
+ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"dev": true,
"requires": {
"fast-deep-equal": "^2.0.1",
@@ -8384,6 +8439,18 @@
"uri-js": "^4.2.2"
}
},
+ "ansi-escapes": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
+ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
@@ -8406,10 +8473,19 @@
"ms": "^2.1.1"
}
},
+ "doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ },
"eslint-scope": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz",
- "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
@@ -8417,12 +8493,12 @@
}
},
"espree": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.0.tgz",
- "integrity": "sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz",
+ "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==",
"dev": true,
"requires": {
- "acorn": "^6.0.2",
+ "acorn": "^6.0.7",
"acorn-jsx": "^5.0.0",
"eslint-visitor-keys": "^1.0.0"
}
@@ -8433,12 +8509,75 @@
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
"dev": true
},
+ "file-entry-cache": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+ "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "dev": true,
+ "requires": {
+ "flat-cache": "^2.0.1"
+ }
+ },
+ "flat-cache": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+ "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "dev": true,
+ "requires": {
+ "flatted": "^2.0.0",
+ "rimraf": "2.6.3",
+ "write": "1.0.3"
+ }
+ },
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
+ "inquirer": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
+ "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^3.2.0",
+ "chalk": "^2.4.2",
+ "cli-cursor": "^2.1.0",
+ "cli-width": "^2.0.0",
+ "external-editor": "^3.0.3",
+ "figures": "^2.0.0",
+ "lodash": "^4.17.11",
+ "mute-stream": "0.0.7",
+ "run-async": "^2.2.0",
+ "rxjs": "^6.4.0",
+ "string-width": "^2.1.0",
+ "strip-ansi": "^5.1.0",
+ "through": "^2.3.6"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
+ }
+ },
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -8451,11 +8590,99 @@
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
},
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ }
+ }
+ },
+ "rxjs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"semver": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
- "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
+ },
+ "slice-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+ "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.0",
+ "astral-regex": "^1.0.0",
+ "is-fullwidth-code-point": "^2.0.0"
+ }
+ },
+ "table": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz",
+ "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.9.1",
+ "lodash": "^4.17.11",
+ "slice-ansi": "^2.1.0",
+ "string-width": "^3.0.0"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
+ }
+ },
+ "write": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+ "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
+ "dev": true,
+ "requires": {
+ "mkdirp": "^0.5.1"
+ }
}
}
},
@@ -9038,16 +9265,6 @@
"escape-string-regexp": "^1.0.5"
}
},
- "file-entry-cache": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
- "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=",
- "dev": true,
- "requires": {
- "flat-cache": "^1.2.1",
- "object-assign": "^4.0.1"
- }
- },
"fileset": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
@@ -9259,18 +9476,6 @@
}
}
},
- "flat-cache": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz",
- "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==",
- "dev": true,
- "requires": {
- "circular-json": "^0.3.1",
- "graceful-fs": "^4.1.2",
- "rimraf": "~2.6.2",
- "write": "^0.2.1"
- }
- },
"flatted": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz",
@@ -14707,6 +14912,15 @@
"which": "^1.3.0"
}
},
+ "node-releases": {
+ "version": "1.1.17",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz",
+ "integrity": "sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==",
+ "dev": true,
+ "requires": {
+ "semver": "^5.3.0"
+ }
+ },
"node-sass": {
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz",
@@ -15884,6 +16098,182 @@
"ws": "^5.1.1"
},
"dependencies": {
+ "@babel/core": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz",
+ "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/generator": "^7.3.4",
+ "@babel/helpers": "^7.2.0",
+ "@babel/parser": "^7.3.4",
+ "@babel/template": "^7.2.2",
+ "@babel/traverse": "^7.3.4",
+ "@babel/types": "^7.3.4",
+ "convert-source-map": "^1.1.0",
+ "debug": "^4.1.0",
+ "json5": "^2.1.0",
+ "lodash": "^4.17.11",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz",
+ "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz",
+ "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.3.4",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.11",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ }
+ }
+ },
+ "@babel/parser": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz",
+ "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==",
+ "dev": true
+ },
+ "@babel/plugin-transform-modules-commonjs": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz",
+ "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.1.0",
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/helper-simple-access": "^7.1.0"
+ }
+ },
+ "@babel/preset-env": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz",
+ "integrity": "sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.0.0",
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/plugin-proposal-async-generator-functions": "^7.2.0",
+ "@babel/plugin-proposal-json-strings": "^7.2.0",
+ "@babel/plugin-proposal-object-rest-spread": "^7.3.4",
+ "@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
+ "@babel/plugin-proposal-unicode-property-regex": "^7.2.0",
+ "@babel/plugin-syntax-async-generators": "^7.2.0",
+ "@babel/plugin-syntax-json-strings": "^7.2.0",
+ "@babel/plugin-syntax-object-rest-spread": "^7.2.0",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.2.0",
+ "@babel/plugin-transform-arrow-functions": "^7.2.0",
+ "@babel/plugin-transform-async-to-generator": "^7.3.4",
+ "@babel/plugin-transform-block-scoped-functions": "^7.2.0",
+ "@babel/plugin-transform-block-scoping": "^7.3.4",
+ "@babel/plugin-transform-classes": "^7.3.4",
+ "@babel/plugin-transform-computed-properties": "^7.2.0",
+ "@babel/plugin-transform-destructuring": "^7.2.0",
+ "@babel/plugin-transform-dotall-regex": "^7.2.0",
+ "@babel/plugin-transform-duplicate-keys": "^7.2.0",
+ "@babel/plugin-transform-exponentiation-operator": "^7.2.0",
+ "@babel/plugin-transform-for-of": "^7.2.0",
+ "@babel/plugin-transform-function-name": "^7.2.0",
+ "@babel/plugin-transform-literals": "^7.2.0",
+ "@babel/plugin-transform-modules-amd": "^7.2.0",
+ "@babel/plugin-transform-modules-commonjs": "^7.2.0",
+ "@babel/plugin-transform-modules-systemjs": "^7.3.4",
+ "@babel/plugin-transform-modules-umd": "^7.2.0",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0",
+ "@babel/plugin-transform-new-target": "^7.0.0",
+ "@babel/plugin-transform-object-super": "^7.2.0",
+ "@babel/plugin-transform-parameters": "^7.2.0",
+ "@babel/plugin-transform-regenerator": "^7.3.4",
+ "@babel/plugin-transform-shorthand-properties": "^7.2.0",
+ "@babel/plugin-transform-spread": "^7.2.0",
+ "@babel/plugin-transform-sticky-regex": "^7.2.0",
+ "@babel/plugin-transform-template-literals": "^7.2.0",
+ "@babel/plugin-transform-typeof-symbol": "^7.2.0",
+ "@babel/plugin-transform-unicode-regex": "^7.2.0",
+ "browserslist": "^4.3.4",
+ "invariant": "^2.2.2",
+ "js-levenshtein": "^1.1.3",
+ "semver": "^5.3.0"
+ }
+ },
+ "@babel/runtime": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz",
+ "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==",
+ "dev": true,
+ "requires": {
+ "regenerator-runtime": "^0.12.0"
+ }
+ },
+ "@babel/template": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz",
+ "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/parser": "^7.2.2",
+ "@babel/types": "^7.2.2"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz",
+ "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/generator": "^7.3.4",
+ "@babel/helper-function-name": "^7.1.0",
+ "@babel/helper-split-export-declaration": "^7.0.0",
+ "@babel/parser": "^7.3.4",
+ "@babel/types": "^7.3.4",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.11"
+ }
+ },
+ "@babel/types": {
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz",
+ "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.11",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
@@ -15903,6 +16293,15 @@
"which": "^1.2.9"
}
},
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
@@ -15918,12 +16317,24 @@
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
+ "regenerator-runtime": {
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
+ "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==",
+ "dev": true
+ },
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -16218,12 +16629,6 @@
"irregular-plurals": "^2.0.0"
}
},
- "pluralize": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",
- "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==",
- "dev": true
- },
"pn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
@@ -18363,23 +18768,23 @@
"dev": true
},
"regenerate-unicode-properties": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz",
- "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==",
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz",
+ "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==",
"dev": true,
"requires": {
"regenerate": "^1.4.0"
}
},
"regenerator-runtime": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.0.tgz",
- "integrity": "sha512-SpV2LhF5Dm9UYMEprB3WwsBnWwqTrmjrm2UZb42cl2G02WVGgx7Mg8aa9pdLEKp6hZ+/abcMc2NxKA8f02EG2w=="
+ "version": "0.13.2",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz",
+ "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA=="
},
"regenerator-transform": {
- "version": "0.13.3",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.3.tgz",
- "integrity": "sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA==",
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz",
+ "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==",
"dev": true,
"requires": {
"private": "^0.1.6"
@@ -18590,29 +18995,29 @@
"dev": true
},
"regexpu-core": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz",
- "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==",
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz",
+ "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==",
"dev": true,
"requires": {
"regenerate": "^1.4.0",
- "regenerate-unicode-properties": "^7.0.0",
- "regjsgen": "^0.4.0",
- "regjsparser": "^0.3.0",
+ "regenerate-unicode-properties": "^8.0.2",
+ "regjsgen": "^0.5.0",
+ "regjsparser": "^0.6.0",
"unicode-match-property-ecmascript": "^1.0.4",
- "unicode-match-property-value-ecmascript": "^1.0.2"
+ "unicode-match-property-value-ecmascript": "^1.1.0"
}
},
"regjsgen": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz",
- "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz",
+ "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==",
"dev": true
},
"regjsparser": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz",
- "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz",
+ "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==",
"dev": true,
"requires": {
"jsesc": "~0.5.0"
@@ -19535,9 +19940,9 @@
}
},
"simple-html-tokenizer": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.4.1.tgz",
- "integrity": "sha1-AomIu3/osuZkVnbYIFJYfUQLAtM="
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.7.tgz",
+ "integrity": "sha512-APW9iYbkJ5cijjX4Ljhf3VG8SwYPUJT5gZrwci/wieMabQxWFiV5VwsrP5c6GMRvXKEQMGkAB1d9dvW66dTqpg=="
},
"simple-swizzle": {
"version": "0.2.2",
@@ -20865,15 +21270,15 @@
}
},
"test-exclude": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz",
- "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==",
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.2.tgz",
+ "integrity": "sha512-N2pvaLpT8guUpb5Fe1GJlmvmzH3x+DAKmmyEQmFP792QcLYoGE1syxztSvPD1V8yPe6VrcCt6YGQVjSRjCASsA==",
"dev": true,
"requires": {
- "arrify": "^1.0.1",
+ "glob": "^7.1.3",
"minimatch": "^3.0.4",
"read-pkg-up": "^4.0.0",
- "require-main-filename": "^1.0.1"
+ "require-main-filename": "^2.0.0"
},
"dependencies": {
"find-up": {
@@ -20885,6 +21290,20 @@
"locate-path": "^3.0.0"
}
},
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
"load-json-file": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
@@ -20968,6 +21387,12 @@
"read-pkg": "^3.0.0"
}
},
+ "require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+ "dev": true
+ },
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
@@ -21460,9 +21885,9 @@
}
},
"unicode-match-property-value-ecmascript": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz",
- "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz",
+ "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==",
"dev": true
},
"unicode-property-aliases-ecmascript": {
@@ -22999,15 +23424,6 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
- "write": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
- "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
- "dev": true,
- "requires": {
- "mkdirp": "^0.5.1"
- }
- },
"write-file-atomic": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz",
@@ -23146,6 +23562,12 @@
"requires": {
"regenerator-runtime": "^0.12.0"
}
+ },
+ "regenerator-runtime": {
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
+ "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==",
+ "dev": true
}
}
}
diff --git a/package.json b/package.json
index ac04a20f8f6646..9e6b1cab001396 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
- "version": "5.5.0",
+ "version": "5.6.0-rc.1",
"private": true,
"description": "A new WordPress editor experience",
"repository": "git+https://github.com/WordPress/gutenberg.git",
@@ -57,10 +57,10 @@
"@wordpress/wordcount": "file:packages/wordcount"
},
"devDependencies": {
- "@babel/core": "7.2.2",
+ "@babel/core": "7.4.4",
"@babel/plugin-syntax-jsx": "7.2.0",
- "@babel/runtime-corejs2": "7.3.1",
- "@babel/traverse": "7.2.3",
+ "@babel/runtime-corejs3": "7.4.4",
+ "@babel/traverse": "7.4.4",
"@wordpress/babel-plugin-import-jsx-pragma": "file:packages/babel-plugin-import-jsx-pragma",
"@wordpress/babel-plugin-makepot": "file:packages/babel-plugin-makepot",
"@wordpress/babel-preset-default": "file:packages/babel-preset-default",
@@ -84,7 +84,7 @@
"chalk": "2.4.1",
"concurrently": "3.5.0",
"copy-webpack-plugin": "4.5.2",
- "core-js": "2.5.7",
+ "core-js": "3.0.1",
"cross-env": "3.2.4",
"cssnano": "4.1.10",
"deasync": "0.1.14",
diff --git a/packages/README.md b/packages/README.md
index 315a53740bc1c4..3edfe78fe7dea8 100644
--- a/packages/README.md
+++ b/packages/README.md
@@ -29,7 +29,7 @@ When creating a new package, you need to provide at least the following:
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.0.0"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/a11y/package.json b/packages/a11y/package.json
index f6a496b495a24e..e7ce3cb38a718f 100644
--- a/packages/a11y/package.json
+++ b/packages/a11y/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/dom-ready": "file:../dom-ready"
},
"publishConfig": {
diff --git a/packages/annotations/package.json b/packages/annotations/package.json
index 0cc802aabfce0d..af3c4c4a80087c 100644
--- a/packages/annotations/package.json
+++ b/packages/annotations/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/data": "file:../data",
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n",
diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json
index 968ed33449cc40..67ed8e87c88556 100644
--- a/packages/api-fetch/package.json
+++ b/packages/api-fetch/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/i18n": "file:../i18n",
"@wordpress/url": "file:../url"
},
diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md
index 53373272a2459d..20ffac25626560 100644
--- a/packages/autop/CHANGELOG.md
+++ b/packages/autop/CHANGELOG.md
@@ -1,3 +1,9 @@
+## Master
+
+### Bug Fix
+
+- `removep` will correctly preserve multi-line paragraph tags where attributes are present.
+
## 2.1.0 (2019-03-06)
### Bug Fix
diff --git a/packages/autop/package.json b/packages/autop/package.json
index 280dae7741d08b..104fed8661a8e6 100644
--- a/packages/autop/package.json
+++ b/packages/autop/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/autop/src/index.js b/packages/autop/src/index.js
index 809a66b412d698..3e3e2fedc36b8c 100644
--- a/packages/autop/src/index.js
+++ b/packages/autop/src/index.js
@@ -343,7 +343,7 @@ export function removep( html ) {
html = html.replace( new RegExp( '\\s*<((?:' + blocklist1 + ')(?: [^>]*)?)>', 'g' ), '\n<$1>' );
// Mark
if it has any attributes.
- html = html.replace( /(
]+>.*?)<\/p>/g, '$1
' );
+ html = html.replace( /(
]+>[\s\S]*?)<\/p>/g, '$1
' );
// Preserve the first
inside a
.
html = html.replace( /
]*)?>\s*
/gi, '
\n\n' );
diff --git a/packages/autop/src/test/index.test.js b/packages/autop/src/test/index.test.js
index 9e945d3d9e8ced..8fc73f4e039651 100644
--- a/packages/autop/src/test/index.test.js
+++ b/packages/autop/src/test/index.test.js
@@ -3,6 +3,7 @@
*/
import {
autop,
+ removep,
} from '../';
test( 'empty string', () => {
@@ -502,3 +503,12 @@ test( 'that autop correctly adds a start and end tag when followed by a div', ()
expect( autop( content ).trim() ).toBe( expected );
} );
+
+describe( 'removep', () => {
+ test( 'preserves paragraphs with attributes', () => {
+ const content = '
\nHello World\n
';
+ const expected = '
\nHello World
';
+
+ expect( removep( content ) ).toBe( expected );
+ } );
+} );
diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md
index 69c48331c9b90a..27860040e61090 100644
--- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md
+++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 2.1.0 (unreleased)
+
+### New Feature
+
+- Add Fragment import handling ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).
+
## 2.0.0 (2019-03-06)
### Breaking Change
@@ -6,7 +12,7 @@
### Enhancement
-- Plugin skips now adding import JSX pragma when the scope variable is defined for all JSX elements ([#13809](https://github.com/WordPress/gutenberg/pull/13809)).
+- Plugin skips now adding import JSX pragma when the scope variable is defined for all JSX elements ([#13809](https://github.com/WordPress/gutenberg/pull/13809)).
## 1.1.0 (2018-09-05)
diff --git a/packages/babel-plugin-import-jsx-pragma/README.md b/packages/babel-plugin-import-jsx-pragma/README.md
index aa43bc1285dcc7..2459cea08be451 100644
--- a/packages/babel-plugin-import-jsx-pragma/README.md
+++ b/packages/babel-plugin-import-jsx-pragma/README.md
@@ -44,11 +44,13 @@ module.exports = {
plugins: [
[ '@wordpress/babel-plugin-import-jsx-pragma', {
scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
source: '@wordpress/element',
isDefault: false,
} ],
[ '@babel/transform-react-jsx', {
pragma: 'createElement',
+ pragmaFrag: 'Fragment',
} ],
],
};
@@ -60,6 +62,13 @@ _Type:_ String
Name of variable required to be in scope for use by the JSX pragma. For the default pragma of React.createElement, the React variable must be within scope.
+### `scopeVariableFrag`
+
+_Type:_ String
+
+Name of variable required to be in scope for `<>>` `Fragment` JSX. Named `` elements
+expect Fragment to be in scope and will not add the import.
+
### `source`
_Type:_ String
@@ -70,6 +79,7 @@ The module from which the scope variable is to be imported when missing.
_Type:_ Boolean
-Whether the scopeVariable is the default import of the source module.
+Whether the scopeVariable is the default import of the source module. Note that this has no impact
+on `scopeVariableFrag`.
diff --git a/packages/babel-plugin-import-jsx-pragma/index.js b/packages/babel-plugin-import-jsx-pragma/index.js
index 7953640c484ab3..273df752611c15 100644
--- a/packages/babel-plugin-import-jsx-pragma/index.js
+++ b/packages/babel-plugin-import-jsx-pragma/index.js
@@ -1,17 +1,20 @@
/**
* Default options for the plugin.
*
- * @property {string} scopeVariable Name of variable required to be in scope
- * for use by the JSX pragma. For the default
- * pragma of React.createElement, the React
- * variable must be within scope.
- * @property {string} source The module from which the scope variable
- * is to be imported when missing.
- * @property {boolean} isDefault Whether the scopeVariable is the default
- * import of the source module.
+ * @property {string} scopeVariable Name of variable required to be in scope
+ * for use by the JSX pragma. For the default
+ * pragma of React.createElement, the React
+ * variable must be within scope.
+ * @property {string} scopeVariableFrag Name of variable required to be in scope
+ * for use by the Fragment pragma.
+ * @property {string} source The module from which the scope variable
+ * is to be imported when missing.
+ * @property {boolean} isDefault Whether the scopeVariable is the default
+ * import of the source module.
*/
const DEFAULT_OPTIONS = {
scopeVariable: 'React',
+ scopeVariableFrag: null,
source: 'react',
isDefault: true,
};
@@ -39,7 +42,7 @@ module.exports = function( babel ) {
return {
visitor: {
- JSXElement( path, state ) {
+ JSX( path, state ) {
if ( state.hasUndeclaredScopeVariable ) {
return;
}
@@ -47,32 +50,55 @@ module.exports = function( babel ) {
const { scopeVariable } = getOptions( state );
state.hasUndeclaredScopeVariable = ! path.scope.hasBinding( scopeVariable );
},
+ JSXFragment( path, state ) {
+ if ( state.hasUndeclaredScopeVariableFrag ) {
+ return;
+ }
+
+ const { scopeVariableFrag } = getOptions( state );
+ if ( scopeVariableFrag === null ) {
+ return;
+ }
+
+ state.hasUndeclaredScopeVariableFrag = ! path.scope.hasBinding( scopeVariableFrag );
+ },
Program: {
exit( path, state ) {
- if ( ! state.hasUndeclaredScopeVariable ) {
- return;
- }
+ const { scopeVariable, scopeVariableFrag, source, isDefault } = getOptions( state );
- const { scopeVariable, source, isDefault } = getOptions( state );
+ let scopeVariableSpecifier;
+ let scopeVariableFragSpecifier;
- let specifier;
- if ( isDefault ) {
- specifier = t.importDefaultSpecifier(
- t.identifier( scopeVariable )
- );
- } else {
- specifier = t.importSpecifier(
- t.identifier( scopeVariable ),
- t.identifier( scopeVariable )
+ if ( state.hasUndeclaredScopeVariable ) {
+ if ( isDefault ) {
+ scopeVariableSpecifier = t.importDefaultSpecifier( t.identifier( scopeVariable ) );
+ } else {
+ scopeVariableSpecifier = t.importSpecifier(
+ t.identifier( scopeVariable ),
+ t.identifier( scopeVariable )
+ );
+ }
+ }
+
+ if ( state.hasUndeclaredScopeVariableFrag ) {
+ scopeVariableFragSpecifier = t.importSpecifier(
+ t.identifier( scopeVariableFrag ),
+ t.identifier( scopeVariableFrag )
);
}
- const importDeclaration = t.importDeclaration(
- [ specifier ],
- t.stringLiteral( source )
- );
+ const importDeclarationSpecifiers = [
+ scopeVariableSpecifier,
+ scopeVariableFragSpecifier,
+ ].filter( Boolean );
+ if ( importDeclarationSpecifiers.length ) {
+ const importDeclaration = t.importDeclaration(
+ importDeclarationSpecifiers,
+ t.stringLiteral( source )
+ );
- path.unshiftContainer( 'body', importDeclaration );
+ path.unshiftContainer( 'body', importDeclaration );
+ }
},
},
},
diff --git a/packages/babel-plugin-import-jsx-pragma/test/index.js b/packages/babel-plugin-import-jsx-pragma/test/index.js
index a10207a5d55634..c3e098476db3d2 100644
--- a/packages/babel-plugin-import-jsx-pragma/test/index.js
+++ b/packages/babel-plugin-import-jsx-pragma/test/index.js
@@ -9,18 +9,6 @@ import { transformSync } from '@babel/core';
import plugin from '../';
describe( 'babel-plugin-import-jsx-pragma', () => {
- function getTransformedCode( source, options = {} ) {
- const { code } = transformSync( source, {
- configFile: false,
- plugins: [
- [ plugin, options ],
- '@babel/plugin-syntax-jsx',
- ],
- } );
-
- return code;
- }
-
it( 'does nothing if there is no jsx', () => {
const original = 'let foo;';
const string = getTransformedCode( original );
@@ -49,6 +37,13 @@ describe( 'babel-plugin-import-jsx-pragma', () => {
expect( string ).toBe( 'import React from "react";\n' + original );
} );
+ it( 'adds import for scope variable for Fragments', () => {
+ const original = 'let foo = <>>;';
+ const string = getTransformedCode( original );
+
+ expect( string ).toBe( 'import React from "react";\nlet foo = <>>;' );
+ } );
+
it( 'allows options customization', () => {
const original = 'let foo = ;';
const string = getTransformedCode( original, {
@@ -61,7 +56,8 @@ describe( 'babel-plugin-import-jsx-pragma', () => {
} );
it( 'adds import for scope variable even when defined inside the local scope', () => {
- const original = 'let foo = ;\n\nfunction local() {\n const createElement = wp.element.createElement;\n}';
+ const original =
+ 'let foo = ;\n\nfunction local() {\n const createElement = wp.element.createElement;\n}';
const string = getTransformedCode( original, {
scopeVariable: 'createElement',
source: '@wordpress/element',
@@ -72,20 +68,93 @@ describe( 'babel-plugin-import-jsx-pragma', () => {
} );
it( 'does nothing if the outer scope variable is already defined when using custom options', () => {
- const original = 'const {\n createElement\n} = wp.element;\nlet foo = ;';
+ const original =
+ 'const {\n createElement,\n Fragment\n} = wp.element;\nlet foo = <>>;';
const string = getTransformedCode( original, {
scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
} );
expect( string ).toBe( original );
} );
+ it( 'adds only Fragment when required', () => {
+ const original = 'const {\n createElement\n} = wp.element;\nlet foo = <>>;';
+ const string = getTransformedCode( original, {
+ scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
+ } );
+
+ expect( string ).toBe(
+ 'import { Fragment } from "@wordpress/element";\nconst {\n createElement\n} = wp.element;\nlet foo = <>>;'
+ );
+ } );
+
+ it( 'adds only createElement when required', () => {
+ const original = 'const {\n Fragment\n} = wp.element;\nlet foo = <>>;';
+ const string = getTransformedCode( original, {
+ scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
+ } );
+
+ expect( string ).toBe(
+ 'import { createElement } from "@wordpress/element";\nconst {\n Fragment\n} = wp.element;\nlet foo = <>>;'
+ );
+ } );
+
it( 'does nothing if the inner scope variable is already defined when using custom options', () => {
- const original = '(function () {\n const {\n createElement\n } = wp.element;\n let foo = ;\n})();';
+ const original =
+ '(function () {\n const {\n createElement\n } = wp.element;\n let foo = ;\n})();';
const string = getTransformedCode( original, {
scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
} );
expect( string ).toBe( original );
} );
+
+ it( 'adds Fragment as for <>>', () => {
+ const original = 'let foo = <>>;';
+ const string = getTransformedCode( original, {
+ scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
+ } );
+
+ expect( string ).toBe(
+ 'import { createElement, Fragment } from "@wordpress/element";\nlet foo = <>>;'
+ );
+ } );
+
+ it( 'does not add Fragment import for ', () => {
+ const original = 'let foo = ;';
+ const string = getTransformedCode( original, {
+ scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
+ source: '@wordpress/element',
+ isDefault: false,
+ } );
+
+ expect( string ).toBe(
+ 'import { createElement } from "@wordpress/element";\nlet foo = ;'
+ );
+ } );
} );
+
+function getTransformedCode( source, options = {} ) {
+ const { code } = transformSync( source, {
+ configFile: false,
+ plugins: [ [ plugin, options ], '@babel/plugin-syntax-jsx' ],
+ } );
+
+ return code;
+}
diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json
index 973c4162a48dc5..e90a946925ed82 100644
--- a/packages/babel-plugin-makepot/package.json
+++ b/packages/babel-plugin-makepot/package.json
@@ -29,7 +29,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.11"
},
diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md
index ab2a808cdfee40..e6e939549f026f 100644
--- a/packages/babel-preset-default/CHANGELOG.md
+++ b/packages/babel-preset-default/CHANGELOG.md
@@ -1,3 +1,10 @@
+## Unreleased
+
+### New Features
+
+- Handle `<>>` JSX Fragments with `@wordpress/element` `Fragment` ([#15120](https://github.com/WordPress/gutenberg/pull/15120)).
+- The bundled `@babel/core` dependency has been updated from requiring `^7.2.2` to requiring `^7.4.4`. Babel preset is now using `core-js@3` instead of `core-js@2` (see [Migration Guide](https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2)).
+
## 4.0.0 (2019-03-06)
### Breaking Change
diff --git a/packages/babel-preset-default/index.js b/packages/babel-preset-default/index.js
index 5c7f22d98439a8..1e1ca3c2980b15 100644
--- a/packages/babel-preset-default/index.js
+++ b/packages/babel-preset-default/index.js
@@ -19,6 +19,7 @@ module.exports = function( api ) {
if ( isTestEnv ) {
opts.useBuiltIns = 'usage';
+ opts.corejs = 3;
} else {
opts.modules = false;
opts.targets = {
@@ -58,12 +59,14 @@ module.exports = function( api ) {
require.resolve( '@wordpress/babel-plugin-import-jsx-pragma' ),
{
scopeVariable: 'createElement',
+ scopeVariableFrag: 'Fragment',
source: '@wordpress/element',
isDefault: false,
},
],
[ require.resolve( '@babel/plugin-transform-react-jsx' ), {
pragma: 'createElement',
+ pragmaFrag: 'Fragment',
} ],
require.resolve( '@babel/plugin-proposal-async-generator-functions' ),
maybeGetPluginTransformRuntime(),
diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json
index 44adbe812038c3..88302e0cd14b39 100644
--- a/packages/babel-preset-default/package.json
+++ b/packages/babel-preset-default/package.json
@@ -27,13 +27,13 @@
],
"main": "index.js",
"dependencies": {
- "@babel/core": "^7.2.2",
+ "@babel/core": "^7.4.4",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
- "@babel/plugin-proposal-object-rest-spread": "^7.3.2",
+ "@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-transform-react-jsx": "^7.3.0",
- "@babel/plugin-transform-runtime": "^7.2.0",
- "@babel/preset-env": "^7.3.1",
- "@babel/runtime": "^7.3.1",
+ "@babel/plugin-transform-runtime": "^7.4.4",
+ "@babel/preset-env": "^7.4.4",
+ "@babel/runtime": "^7.4.4",
"@wordpress/babel-plugin-import-jsx-pragma": "file:../babel-plugin-import-jsx-pragma",
"@wordpress/browserslist-config": "file:../browserslist-config"
},
diff --git a/packages/babel-preset-default/test/__snapshots__/index.js.snap b/packages/babel-preset-default/test/__snapshots__/index.js.snap
index ed8a87a05dbfe0..605c23a784b401 100644
--- a/packages/babel-preset-default/test/__snapshots__/index.js.snap
+++ b/packages/babel-preset-default/test/__snapshots__/index.js.snap
@@ -30,7 +30,7 @@ describe('Babel preset default', function () {
return _context.stop();
}
}
- }, _callee, this);
+ }, _callee);
}));
return _foo.apply(this, arguments);
}
@@ -63,7 +63,7 @@ describe('Babel preset default', function () {
return _context2.stop();
}
}
- }, _callee2, this);
+ }, _callee2);
})));
});"
`;
diff --git a/packages/blob/package.json b/packages/blob/package.json
index 219eac53f1aa23..27f407e49e3f17 100644
--- a/packages/blob/package.json
+++ b/packages/blob/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md
index ff189e70ba88aa..d5d432fa944826 100644
--- a/packages/block-editor/README.md
+++ b/packages/block-editor/README.md
@@ -74,7 +74,9 @@ Undocumented declaration.
# **Autocomplete**
-Undocumented declaration.
+_Related_
+
+- # **BlockAlignmentToolbar**
@@ -138,11 +140,15 @@ Undocumented declaration.
# **BlockVerticalAlignmentToolbar**
-Undocumented declaration.
+_Related_
+
+- # **ButtonBlockerAppender**
-Undocumented declaration.
+_Related_
+
+- # **ColorPalette**
@@ -261,7 +267,9 @@ _Returns_
# **InnerBlocks**
-Undocumented declaration.
+_Related_
+
+- # **Inserter**
@@ -273,19 +281,27 @@ Undocumented declaration.
# **InspectorControls**
-Undocumented declaration.
+_Related_
+
+- # **MediaPlaceholder**
-Undocumented declaration.
+_Related_
+
+- # **MediaUpload**
-Undocumented declaration.
+_Related_
+
+- # **MediaUploadCheck**
-Undocumented declaration.
+_Related_
+
+- # **MultiBlocksSwitcher**
@@ -301,7 +317,9 @@ Undocumented declaration.
# **ObserveTyping**
-Undocumented declaration.
+_Related_
+
+- # **PanelColorSettings**
@@ -309,7 +327,9 @@ Undocumented declaration.
# **PlainText**
-Undocumented declaration.
+_Related_
+
+- # **PreserveScrollInReorder**
@@ -317,7 +337,9 @@ Undocumented declaration.
# **RichText**
-Undocumented declaration.
+_Related_
+
+- # **RichTextShortcut**
@@ -354,15 +376,21 @@ Undocumented declaration.
# **URLInput**
-Undocumented declaration.
+_Related_
+
+- # **URLInputButton**
-Undocumented declaration.
+_Related_
+
+- # **URLPopover**
-Undocumented declaration.
+_Related_
+
+- # **Warning**
diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json
index 43c302d53ae08c..6b0cbc7e708720 100644
--- a/packages/block-editor/package.json
+++ b/packages/block-editor/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.0.0",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:../a11y",
"@wordpress/blob": "file:../blob",
"@wordpress/blocks": "file:../blocks",
diff --git a/packages/block-editor/src/components/autocomplete/index.js b/packages/block-editor/src/components/autocomplete/index.js
index 419ae8a8af8126..4e6e9475d26176 100644
--- a/packages/block-editor/src/components/autocomplete/index.js
+++ b/packages/block-editor/src/components/autocomplete/index.js
@@ -114,6 +114,9 @@ export function withFilteredAutocompleters( Autocomplete ) {
};
}
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/autocomplete/README.md
+ */
export default compose( [
withBlockEditContext( ( { name } ) => {
return {
diff --git a/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap
index ba44cc9445f656..ff2040497b12a7 100644
--- a/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap
+++ b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap
@@ -5,11 +5,10 @@ exports[`BlockControls should render a dynamic toolbar of controls 1`] = `
value={
Object {
"clientId": undefined,
- "focusedElement": null,
"isSelected": true,
"name": undefined,
+ "onCaretVerticalPositionChange": undefined,
"onFocus": undefined,
- "setFocusedElement": [Function],
}
}
>
diff --git a/packages/block-editor/src/components/block-edit/index.js b/packages/block-editor/src/components/block-edit/index.js
index 582e3a9f3ed17c..63c475a50692ff 100644
--- a/packages/block-editor/src/components/block-edit/index.js
+++ b/packages/block-editor/src/components/block-edit/index.js
@@ -1,3 +1,8 @@
+/**
+ * External dependencies
+ */
+import memize from 'memize';
+
/**
* WordPress dependencies
*/
@@ -10,40 +15,28 @@ import Edit from './edit';
import { BlockEditContextProvider } from './context';
class BlockEdit extends Component {
- constructor( props ) {
- super( props );
-
- this.setFocusedElement = this.setFocusedElement.bind( this );
-
- this.state = {
- focusedElement: null,
- setFocusedElement: this.setFocusedElement,
- };
+ constructor() {
+ super( ...arguments );
+
+ // It is important to return the same object if props haven't changed
+ // to avoid unnecessary rerenders.
+ // See https://reactjs.org/docs/context.html#caveats.
+ this.propsToContext = memize(
+ this.propsToContext.bind( this ),
+ { maxSize: 1 }
+ );
}
- setFocusedElement( focusedElement ) {
- this.setState( ( prevState ) => {
- if ( prevState.focusedElement === focusedElement ) {
- return null;
- }
- return { focusedElement };
- } );
- }
-
- static getDerivedStateFromProps( props ) {
- const { clientId, name, isSelected, onFocus } = props;
-
- return {
- name,
- isSelected,
- clientId,
- onFocus,
- };
+ propsToContext( name, isSelected, clientId, onFocus, onCaretVerticalPositionChange ) {
+ return { name, isSelected, clientId, onFocus, onCaretVerticalPositionChange };
}
render() {
+ const { name, isSelected, clientId, onFocus, onCaretVerticalPositionChange } = this.props;
+ const value = this.propsToContext( name, isSelected, clientId, onFocus, onCaretVerticalPositionChange );
+
return (
-
+
);
diff --git a/packages/block-editor/src/components/block-list-appender/style.scss b/packages/block-editor/src/components/block-list-appender/style.scss
index 026e899dbe3025..e1725aa00873a6 100644
--- a/packages/block-editor/src/components/block-list-appender/style.scss
+++ b/packages/block-editor/src/components/block-list-appender/style.scss
@@ -1,5 +1,11 @@
.block-list-appender {
margin: $block-padding;
+
+ // Add additional margin to the appender when inside a group with a background color.
+ // If changing this, be sure to sync up with group/editor.scss line 13.
+ .has-background & {
+ margin: ($block-padding*2 + $block-spacing) $block-padding;
+ }
}
.block-list-appender > .block-editor-inserter {
diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js
index b3c743d4a397c0..84dfd7491920d6 100644
--- a/packages/block-editor/src/components/block-list/block.js
+++ b/packages/block-editor/src/components/block-list/block.js
@@ -12,7 +12,6 @@ import {
focus,
isTextField,
placeCaretAtHorizontalEdge,
- placeCaretAtVerticalEdge,
} from '@wordpress/dom';
import { BACKSPACE, DELETE, ENTER } from '@wordpress/keycodes';
import {
@@ -154,13 +153,7 @@ export class BlockListBlock extends Component {
return;
}
- target.focus();
-
- // In reverse case, need to explicitly place caret position.
- if ( isReverse ) {
- placeCaretAtHorizontalEdge( target, true );
- placeCaretAtVerticalEdge( target, true );
- }
+ placeCaretAtHorizontalEdge( target, isReverse );
}
setAttributes( attributes ) {
@@ -404,7 +397,6 @@ export class BlockListBlock extends Component {
! isEmptyDefaultBlock;
// We render block movers and block settings to keep them tabbale even if hidden
const shouldRenderMovers =
- ! isFocusMode &&
( isSelected || hoverArea === 'left' ) &&
! showEmptyBlockSideInserter &&
! isPartOfMultiSelection &&
diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss
index cac92988dc9602..216fac5253cf3a 100644
--- a/packages/block-editor/src/components/block-list/style.scss
+++ b/packages/block-editor/src/components/block-list/style.scss
@@ -445,6 +445,11 @@
display: inline-flex;
}
}
+
+ // If the block movers are visible, push the breadcrumb down to make room for them.
+ .block-editor-block-mover.is-visible + .block-editor-block-list__breadcrumb {
+ top: (-$block-padding - $block-left-border-width - ($grid-size-small / 2));
+ }
}
// Wide
@@ -904,10 +909,6 @@
}
}
-.block-editor-block-list__block.is-focus-mode:not(.is-multi-selected) > .block-editor-block-list__block-edit > .block-editor-block-contextual-toolbar {
- margin-left: -$block-side-ui-width;
-}
-
// Enable toolbar footprint collapsing
.block-editor-block-contextual-toolbar {
// Position the contextual toolbar above the block.
@@ -982,7 +983,6 @@
top: (($block-padding * -2) - $block-left-border-width);
.components-toolbar {
- padding: 0;
border: none;
line-height: 1;
font-family: $default-font;
diff --git a/packages/block-editor/src/components/block-mover/index.js b/packages/block-editor/src/components/block-mover/index.js
index 10fc40ba0e09d2..dd09dc1c86b7c5 100644
--- a/packages/block-editor/src/components/block-mover/index.js
+++ b/packages/block-editor/src/components/block-mover/index.js
@@ -44,10 +44,10 @@ export class BlockMover extends Component {
}
render() {
- const { onMoveUp, onMoveDown, isFirst, isLast, isDraggable, onDragStart, onDragEnd, clientIds, blockElementId, blockType, firstIndex, isLocked, instanceId, isHidden } = this.props;
+ const { onMoveUp, onMoveDown, isFirst, isLast, isDraggable, onDragStart, onDragEnd, clientIds, blockElementId, blockType, firstIndex, isLocked, instanceId, isHidden, rootClientId } = this.props;
const { isFocused } = this.state;
const blocksCount = castArray( clientIds ).length;
- if ( isLocked || ( isFirst && isLast ) ) {
+ if ( isLocked || ( isFirst && isLast && ! rootClientId ) ) {
return null;
}
diff --git a/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js b/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js
index f75f324b52e5db..e7d0014cdecbcd 100644
--- a/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js
+++ b/packages/block-editor/src/components/block-vertical-alignment-toolbar/index.js
@@ -57,6 +57,9 @@ export function BlockVerticalAlignmentToolbar( { isCollapsed, value, onChange, c
);
}
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md
+ */
export default compose(
withBlockEditContext( ( { clientId } ) => {
return {
diff --git a/packages/block-editor/src/components/button-block-appender/index.js b/packages/block-editor/src/components/button-block-appender/index.js
index 8e56596d1827fe..1d0ee924bf153b 100644
--- a/packages/block-editor/src/components/button-block-appender/index.js
+++ b/packages/block-editor/src/components/button-block-appender/index.js
@@ -14,7 +14,7 @@ import { __ } from '@wordpress/i18n';
*/
import Inserter from '../inserter';
-export default function ButtonBlockAppender( { rootClientId, className } ) {
+function ButtonBlockAppender( { rootClientId, className } ) {
return (
);
}
+
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md
+ */
+export default ButtonBlockAppender;
diff --git a/packages/block-editor/src/components/button-block-appender/style.scss b/packages/block-editor/src/components/button-block-appender/style.scss
index 5c045aee8afb97..f153a2353f9b47 100644
--- a/packages/block-editor/src/components/button-block-appender/style.scss
+++ b/packages/block-editor/src/components/button-block-appender/style.scss
@@ -7,7 +7,7 @@
outline: $border-width dashed $dark-gray-150;
width: 100%;
color: $dark-gray-500;
- background: $dark-opacity-light-100;
+ background: $light-opacity-background-fill;
&:hover,
&:focus {
@@ -22,7 +22,7 @@
// Use opacity to work in various editor styles
.is-dark-theme & {
- background: $light-opacity-light-100;
+ background: $dark-opacity-background-fill;
color: $light-gray-100;
&:hover,
diff --git a/packages/block-editor/src/components/color-palette/control.js b/packages/block-editor/src/components/color-palette/control.js
index 097cae030e9a3f..6a2da23b527c67 100644
--- a/packages/block-editor/src/components/color-palette/control.js
+++ b/packages/block-editor/src/components/color-palette/control.js
@@ -3,7 +3,6 @@
*/
import { BaseControl, ColorIndicator } from '@wordpress/components';
import { ifCondition, compose } from '@wordpress/compose';
-import { Fragment } from '@wordpress/element';
import { sprintf, __ } from '@wordpress/i18n';
/**
@@ -27,22 +26,19 @@ export function ColorPaletteControl( {
const colorName = colorObject && colorObject.name;
const ariaLabel = sprintf( colorIndicatorAriaLabel, label.toLowerCase(), colorName || value );
- const labelElement = (
-
- { label }
- { value && (
-
- ) }
-
- );
-
return (
+ >
+
+ { label }
+ { value && (
+
+ ) }
+
- Test Color
-
-
- }
>
+
+ Test Color
+
+
);
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md
+ */
export default InnerBlocks;
diff --git a/packages/block-editor/src/components/inspector-controls/index.js b/packages/block-editor/src/components/inspector-controls/index.js
index e808e987adbdcf..b97df2f8d245ee 100644
--- a/packages/block-editor/src/components/inspector-controls/index.js
+++ b/packages/block-editor/src/components/inspector-controls/index.js
@@ -14,4 +14,7 @@ const InspectorControls = ifBlockEditSelected( Fill );
InspectorControls.Slot = Slot;
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inspector-controls/README.md
+ */
export default InspectorControls;
diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js
index 096ce44ef9717a..8f042ed1d893a8 100644
--- a/packages/block-editor/src/components/media-placeholder/index.js
+++ b/packages/block-editor/src/components/media-placeholder/index.js
@@ -416,6 +416,9 @@ const applyWithSelect = withSelect( ( select ) => {
};
} );
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-placeholder/README.md
+ */
export default compose(
applyWithSelect,
withFilters( 'editor.MediaPlaceholder' ),
diff --git a/packages/block-editor/src/components/media-placeholder/index.native.js b/packages/block-editor/src/components/media-placeholder/index.native.js
index 1bd983c37699a7..8a50b464a79146 100644
--- a/packages/block-editor/src/components/media-placeholder/index.native.js
+++ b/packages/block-editor/src/components/media-placeholder/index.native.js
@@ -16,7 +16,13 @@ import styles from './styles.scss';
function MediaPlaceholder( props ) {
return (
-
+
diff --git a/packages/block-editor/src/components/media-upload/check.js b/packages/block-editor/src/components/media-upload/check.js
index 3d94e3b3dd9059..6f2903be5b1e10 100644
--- a/packages/block-editor/src/components/media-upload/check.js
+++ b/packages/block-editor/src/components/media-upload/check.js
@@ -7,6 +7,9 @@ export function MediaUploadCheck( { hasUploadPermissions, fallback = null, child
return hasUploadPermissions ? children : fallback;
}
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md
+ */
export default withSelect( ( select ) => {
const { getSettings } = select( 'core/block-editor' );
diff --git a/packages/block-editor/src/components/media-upload/index.js b/packages/block-editor/src/components/media-upload/index.js
index 38743329f818ff..1cb3e511097276 100644
--- a/packages/block-editor/src/components/media-upload/index.js
+++ b/packages/block-editor/src/components/media-upload/index.js
@@ -12,5 +12,7 @@ import { withFilters } from '@wordpress/components';
*/
const MediaUpload = () => null;
-// Todo: rename the filter
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md
+ */
export default withFilters( 'editor.MediaUpload' )( MediaUpload );
diff --git a/packages/block-editor/src/components/observe-typing/index.js b/packages/block-editor/src/components/observe-typing/index.js
index 6998eb771bf9ee..c3ad69b3d834f2 100644
--- a/packages/block-editor/src/components/observe-typing/index.js
+++ b/packages/block-editor/src/components/observe-typing/index.js
@@ -199,6 +199,9 @@ class ObserveTyping extends Component {
}
}
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/observe-typing/README.md
+ */
export default compose( [
withSelect( ( select ) => {
const { isTyping } = select( 'core/block-editor' );
diff --git a/packages/block-editor/src/components/plain-text/index.js b/packages/block-editor/src/components/plain-text/index.js
index 2043c46b57b7d3..b05e48ed60b61c 100644
--- a/packages/block-editor/src/components/plain-text/index.js
+++ b/packages/block-editor/src/components/plain-text/index.js
@@ -10,6 +10,9 @@ import { forwardRef } from '@wordpress/element';
import TextareaAutosize from 'react-autosize-textarea';
import classnames from 'classnames';
+/**
+ * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/plain-text/README.md
+ */
const PlainText = forwardRef( ( { onChange, className, ...props }, ref ) => {
return (
0 ) {
this.recalculateBoundaryStyle();
@@ -517,9 +520,12 @@ export class RichText extends Component {
changeHandler( record.formats, record.text );
} );
- this.savedContent = this.valueToFormat( record );
- this.props.onChange( this.savedContent );
- this.setState( { start, end, activeFormats } );
+ this.value = this.valueToFormat( record );
+ this.props.onChange( this.value );
+ this.setState( { activeFormats } );
+ this.props.onSelectionChange( start, end );
+ this.selectionStart = start;
+ this.selectionEnd = end;
if ( ! withoutHistory ) {
this.onCreateUndoLevel();
@@ -528,12 +534,12 @@ export class RichText extends Component {
onCreateUndoLevel() {
// If the content is the same, no level needs to be created.
- if ( this.lastHistoryValue === this.savedContent ) {
+ if ( this.lastHistoryValue === this.value ) {
return;
}
this.props.onCreateUndoLevel();
- this.lastHistoryValue = this.savedContent;
+ this.lastHistoryValue = this.value;
}
/**
@@ -804,13 +810,17 @@ export class RichText extends Component {
}
const newPos = value.start + ( isReverse ? -1 : 1 );
+ const newActiveFormats = isReverse ? formatsBefore.length : formatsAfter.length;
- this.setState( { start: newPos, end: newPos } );
+ this.setState( { selectedFormat: newActiveFormats } );
+ this.props.onSelectionChange( newPos, newPos );
+ this.selectionStart = newPos;
+ this.selectionEnd = newPos;
this.applyRecord( {
...value,
start: newPos,
end: newPos,
- activeFormats: isReverse ? formatsBefore : formatsAfter,
+ activeFormats: newActiveFormats,
} );
}
@@ -889,53 +899,44 @@ export class RichText extends Component {
componentDidUpdate( prevProps ) {
const { tagName, value, isSelected } = this.props;
+ const record = this.getRecord();
- if (
+ // Check if the content changed.
+ let shouldReapply = (
tagName === prevProps.tagName &&
value !== prevProps.value &&
- value !== this.savedContent
- ) {
- // Handle deprecated `children` and `node` sources.
- // The old way of passing a value with the `node` matcher required
- // the value to be mapped first, creating a new array each time, so
- // a shallow check wouldn't work. We need to check deep equality.
- // This is only executed for a deprecated API and will eventually be
- // removed.
- if ( Array.isArray( value ) && isEqual( value, this.savedContent ) ) {
- return;
- }
-
- const record = this.formatToValue( value );
-
- if ( isSelected ) {
- const prevRecord = this.formatToValue( prevProps.value );
- const length = getTextContent( prevRecord ).length;
- record.start = length;
- record.end = length;
- }
+ value !== this.value
+ );
- this.applyRecord( record );
- this.savedContent = value;
- }
+ // Check if the selection changed.
+ shouldReapply = shouldReapply || (
+ isSelected && ! prevProps.isSelected && (
+ this.selectionStart !== record.start ||
+ this.selectionEnd !== record.end
+ )
+ );
const prefix = 'format_prepare_props_';
const predicate = ( v, key ) => key.startsWith( prefix );
const prepareProps = pickBy( this.props, predicate );
const prevPrepareProps = pickBy( prevProps, predicate );
- // If any format prepare props update, reapply value.
- if ( ! isShallowEqual( prepareProps, prevPrepareProps ) ) {
- const record = this.formatToValue( value );
+ // Check if any format props changed.
+ shouldReapply = shouldReapply ||
+ ! isShallowEqual( prepareProps, prevPrepareProps );
- // Maintain the previous selection if the instance is currently
- // selected.
- if ( isSelected ) {
- record.start = this.state.start;
- record.end = this.state.end;
+ if ( shouldReapply ) {
+ if ( ! isSelected ) {
+ delete record.start;
+ delete record.end;
}
this.applyRecord( record );
}
+
+ this.value = value;
+ this.selectionStart = record.start;
+ this.selectionEnd = record.end;
}
/**
@@ -1053,7 +1054,7 @@ export class RichText extends Component {
const record = this.getRecord();
return (
-
);
}
-export default withColors( 'backgroundColor' )( GroupEdit );
+export default compose( [
+ withColors( 'backgroundColor' ),
+ withSelect( ( select, { clientId } ) => {
+ const {
+ getBlock,
+ } = select( 'core/block-editor' );
+
+ const block = getBlock( clientId );
+
+ return {
+ hasInnerBlocks: !! ( block && block.innerBlocks.length ),
+ };
+ } ),
+] )( GroupEdit );
diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js
index eb44dd8126dcc9..59cc25d8bd4c3e 100644
--- a/packages/block-library/src/heading/edit.native.js
+++ b/packages/block-library/src/heading/edit.native.js
@@ -2,21 +2,22 @@
* Internal dependencies
*/
import HeadingToolbar from './heading-toolbar';
+import styles from './editor.scss';
/**
* External dependencies
*/
import { View } from 'react-native';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
*/
-import { __ } from '@wordpress/i18n';
+import { __, sprintf } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { RichText, BlockControls } from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
-
-import styles from './editor.scss';
+import { create } from '@wordpress/rich-text';
const name = 'core/heading';
@@ -73,6 +74,14 @@ class HeadingEdit extends Component {
}
}
+ plainTextContent( html ) {
+ const result = create( { html } );
+ if ( result ) {
+ return result.text;
+ }
+ return '';
+ }
+
render() {
const {
attributes,
@@ -90,7 +99,24 @@ class HeadingEdit extends Component {
const tagName = 'h' + level;
return (
-
+ setAttributes( { level: newLevel } ) } />
@@ -104,7 +130,6 @@ class HeadingEdit extends Component {
} }
onFocus={ this.props.onFocus } // always assign onFocus as a props
onBlur={ this.props.onBlur } // always assign onBlur as a props
- onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange }
onChange={ ( value ) => setAttributes( { content: value } ) }
onMerge={ mergeBlocks }
onSplit={ this.splitBlock }
diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js
index af26201f1d35de..8f2aa785d3f341 100644
--- a/packages/block-library/src/image/edit.native.js
+++ b/packages/block-library/src/image/edit.native.js
@@ -13,6 +13,7 @@ import {
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
@@ -31,7 +32,7 @@ import {
BottomSheet,
Picker,
} from '@wordpress/block-editor';
-import { __ } from '@wordpress/i18n';
+import { __, sprintf } from '@wordpress/i18n';
import { isURL } from '@wordpress/url';
import { doAction, hasAction } from '@wordpress/hooks';
@@ -254,7 +255,7 @@ class ImageEdit extends React.Component {
const toolbarEditButton = (
@@ -328,7 +329,19 @@ class ImageEdit extends React.Component {
const progress = this.state.progress * 100;
return (
-
+
{ showSpinner && }
@@ -336,7 +349,7 @@ class ImageEdit extends React.Component {
@@ -370,6 +383,8 @@ class ImageEdit extends React.Component {
resizeMethod="scale"
source={ { uri: url } }
key={ url }
+ accessible={ true }
+ accessibilityLabel={ alt }
>
{ this.state.isUploadFailed &&
@@ -383,7 +398,21 @@ class ImageEdit extends React.Component {
} }
{ ( ! RichText.isEmpty( caption ) > 0 || isSelected ) && (
-
+
+
);
diff --git a/packages/block-library/src/nextpage/editor.native.scss b/packages/block-library/src/nextpage/editor.native.scss
index 869851fdd37c63..ae6f1f3788df3b 100644
--- a/packages/block-library/src/nextpage/editor.native.scss
+++ b/packages/block-library/src/nextpage/editor.native.scss
@@ -7,6 +7,7 @@
.block-library-nextpage__text {
color: $gray;
+ font-family: $default-regular-font;
text-decoration-style: solid;
text-transform: uppercase;
}
diff --git a/packages/block-library/src/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js
index 0ed9c5c91b5820..91dc83c69984f9 100644
--- a/packages/block-library/src/paragraph/edit.js
+++ b/packages/block-library/src/paragraph/edit.js
@@ -244,8 +244,8 @@ class ParagraphBlock extends Component {
} }
unstableOnSplit={ this.splitBlock }
onMerge={ mergeBlocks }
- onReplace={ this.onReplace }
- onRemove={ () => onReplace( [] ) }
+ onReplace={ this.props.onReplace && this.onReplace }
+ onRemove={ onReplace && ( () => onReplace( [] ) ) }
aria-label={ content ? __( 'Paragraph block' ) : __( 'Empty block; start writing or type forward slash to choose a block' ) }
placeholder={ placeholder || __( 'Start writing or type / to choose a block' ) }
/>
diff --git a/packages/block-library/src/paragraph/edit.native.js b/packages/block-library/src/paragraph/edit.native.js
index f7d26d596a656e..12abc71c8d22bd 100644
--- a/packages/block-library/src/paragraph/edit.native.js
+++ b/packages/block-library/src/paragraph/edit.native.js
@@ -2,14 +2,16 @@
* External dependencies
*/
import { View } from 'react-native';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
*/
-import { __ } from '@wordpress/i18n';
+import { __, sprintf } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { createBlock } from '@wordpress/blocks';
import { RichText } from '@wordpress/block-editor';
+import { create } from '@wordpress/rich-text';
/**
* Internal dependencies
@@ -81,6 +83,14 @@ class ParagraphEdit extends Component {
) ) );
}
+ plainTextContent( html ) {
+ const result = create( { html } );
+ if ( result ) {
+ return result.text;
+ }
+ return '';
+ }
+
render() {
const {
attributes,
@@ -95,14 +105,26 @@ class ParagraphEdit extends Component {
} = attributes;
return (
-
+ {
setAttributes( {
diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json
index 6a29976f5bae12..706ca2f9375be9 100644
--- a/packages/block-serialization-default-parser/package.json
+++ b/packages/block-serialization-default-parser/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/blocks/package.json b/packages/blocks/package.json
index ebcb2c2c911cbd..2c393ab45f107b 100644
--- a/packages/blocks/package.json
+++ b/packages/blocks/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
"@wordpress/block-serialization-default-parser": "file:../block-serialization-default-parser",
@@ -38,7 +38,7 @@
"lodash": "^4.17.11",
"rememo": "^3.0.0",
"showdown": "^1.8.6",
- "simple-html-tokenizer": "^0.4.1",
+ "simple-html-tokenizer": "^0.5.7",
"tinycolor2": "^1.4.1",
"uuid": "^3.3.2"
},
diff --git a/packages/blocks/src/api/raw-handling/readme.md b/packages/blocks/src/api/raw-handling/readme.md
index 6a705fa58551d0..f3efed00b301c4 100644
--- a/packages/blocks/src/api/raw-handling/readme.md
+++ b/packages/blocks/src/api/raw-handling/readme.md
@@ -17,7 +17,7 @@ This folder contains all paste specific logic (filters, converters, normalisers.
1. Apple Pages does not pass heading and image information.
-2. MS Word only provides a local file path, which cannot be accessed in JavaScript for security reasons.
+2. MS Word only provides a local file path, which cannot be accessed in JavaScript for security reasons. Image placeholders will be provided instead. Single images, however, _can_ be copied and pasted without any problem.
3. Still to do for MS Word Online.
4. Evernote does not have headings.
5. For caption and gallery shortcodes, see #2874.
@@ -25,4 +25,4 @@ This folder contains all paste specific logic (filters, converters, normalisers.
## Other notable capabilities
* Filters out analytics trackers in the form of images.
-* Direct image data pasting coming soon.
+* Pasting a single images (if the browser provides image data).
diff --git a/packages/blocks/src/api/validation.js b/packages/blocks/src/api/validation.js
index 335f5c3b8bd39a..50692a7414eff6 100644
--- a/packages/blocks/src/api/validation.js
+++ b/packages/blocks/src/api/validation.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
-import Tokenizer from 'simple-html-tokenizer/dist/es6/tokenizer';
+import { Tokenizer } from 'simple-html-tokenizer';
import {
identity,
xor,
diff --git a/packages/components/README.md b/packages/components/README.md
index 750901915718f2..b9dd9874a5cab1 100644
--- a/packages/components/README.md
+++ b/packages/components/README.md
@@ -27,4 +27,6 @@ export default function MyButton() {
}
```
+Many components also include styles which will need to be output in order to appear correctly. Within WordPress, you can [add the `wp-components` stylesheet as a dependency of your plugin's stylesheet](https://developer.wordpress.org/reference/functions/wp_enqueue_style/#parameters). In other projects, you can link to the `build-style/style.css` file directly.
+
diff --git a/packages/components/package.json b/packages/components/package.json
index e395e70a1a39bb..b47af61511f171 100644
--- a/packages/components/package.json
+++ b/packages/components/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/compose": "file:../compose",
diff --git a/packages/components/src/README.md b/packages/components/src/README.md
index d7ae75e8e7e40d..d1a71f0f59a167 100644
--- a/packages/components/src/README.md
+++ b/packages/components/src/README.md
@@ -17,3 +17,5 @@ const MyButton = () => {
return ;
}
```
+
+Many components also include styles which will need to be output in order to appear correctly. Within WordPress, you can [add the `wp-components` stylesheet as a dependency of your plugin's stylesheet](https://developer.wordpress.org/reference/functions/wp_enqueue_style/#parameters). In other projects, you can link to the `build-style/style.css` file directly.
diff --git a/packages/components/src/color-palette/style.scss b/packages/components/src/color-palette/style.scss
index 3b64489780dab8..030b3e220c375c 100644
--- a/packages/components/src/color-palette/style.scss
+++ b/packages/components/src/color-palette/style.scss
@@ -71,7 +71,6 @@ $color-palette-circle-spacing: 14px;
outline: none;
&::after {
content: "";
- position: absolute;
border: #{ $border-width * 2 } solid $dark-gray-400;
width: 32px;
height: 32px;
diff --git a/packages/components/src/drop-zone/README.md b/packages/components/src/drop-zone/README.md
index 55206559ca2673..567862b4ed792b 100644
--- a/packages/components/src/drop-zone/README.md
+++ b/packages/components/src/drop-zone/README.md
@@ -28,6 +28,20 @@ const MyDropZone = withState( {
The component accepts the following props:
+### className
+
+A CSS `class` to be _appended_ after the default `components-drop-zone` class.
+
+- Type: `String`
+- Default: `undefined`
+
+### label
+
+A string to be shown within the drop zone area.
+
+- Type: `String`
+- Default: `Drop files to upload`
+
### onFilesDrop
The function is called when dropping a file into the `DropZone`. It receives two arguments: an array of dropped files and a position object which the following shape: `{ x: 'left|right', y: 'top|bottom' }`. The position object indicates whether the drop event happened closer to the top or bottom edges and left or right ones.
diff --git a/packages/components/src/drop-zone/provider.js b/packages/components/src/drop-zone/provider.js
index 43fc3d76c562c6..a0df1364b8ac7b 100644
--- a/packages/components/src/drop-zone/provider.js
+++ b/packages/components/src/drop-zone/provider.js
@@ -69,9 +69,7 @@ class DropZoneProvider extends Component {
this.state = {
hoveredDropZone: -1,
isDraggingOverDocument: false,
- isDraggingOverElement: false,
position: null,
- type: null,
};
}
@@ -105,9 +103,7 @@ class DropZoneProvider extends Component {
this.setState( {
hoveredDropZone: -1,
isDraggingOverDocument: false,
- isDraggingOverElement: false,
position: null,
- type: null,
} );
this.dropZones.forEach( ( dropZone ) => dropZone.setState( {
diff --git a/packages/components/src/focal-point-picker/index.js b/packages/components/src/focal-point-picker/index.js
index 865fbd43b651c5..85f8f374556550 100644
--- a/packages/components/src/focal-point-picker/index.js
+++ b/packages/components/src/focal-point-picker/index.js
@@ -178,7 +178,7 @@ export class FocalPointPicker extends Component {
);
const id = `inspector-focal-point-picker-control-${ instanceId }`;
const horizontalPositionId = `inspector-focal-point-picker-control-horizontal-position-${ instanceId }`;
- const verticalPositionId = `inspector-focal-point-picker-control-horizontal-position-${ instanceId }`;
+ const verticalPositionId = `inspector-focal-point-picker-control-vertical-position-${ instanceId }`;
return (
;
@@ -37,7 +38,8 @@ const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );
It is also possible to override props by implementing a higher-order component which works as follows:
```jsx
-import { Fragment, withFilters } from '@wordpress/components';
+import { Fragment } from '@wordpress/element';
+import { withFilters } from '@wordpress/components';
import { addFilter } from '@wordpress/hooks';
const MyComponent = ( { hint, title } ) => (
diff --git a/packages/components/src/keyboard-shortcuts/index.js b/packages/components/src/keyboard-shortcuts/index.js
index d4b12867e08b6f..5bb2cee5499c63 100644
--- a/packages/components/src/keyboard-shortcuts/index.js
+++ b/packages/components/src/keyboard-shortcuts/index.js
@@ -10,6 +10,11 @@ import { forEach } from 'lodash';
*/
import { Component, Children } from '@wordpress/element';
+/**
+ * Internal dependencies
+ */
+import { isAppleOS } from './platform';
+
class KeyboardShortcuts extends Component {
constructor() {
super( ...arguments );
@@ -30,8 +35,10 @@ class KeyboardShortcuts extends Component {
const hasShift = modifiers.has( 'shift' );
if (
- ( modifiers.size === 1 && hasAlt ) ||
- ( modifiers.size === 2 && hasAlt && hasShift )
+ isAppleOS() && (
+ ( modifiers.size === 1 && hasAlt ) ||
+ ( modifiers.size === 2 && hasAlt && hasShift )
+ )
) {
throw new Error( `Cannot bind ${ key }. Alt and Shift+Alt modifiers are reserved for character input.` );
}
diff --git a/packages/components/src/keyboard-shortcuts/platform.js b/packages/components/src/keyboard-shortcuts/platform.js
new file mode 100644
index 00000000000000..386f0d7fb173f9
--- /dev/null
+++ b/packages/components/src/keyboard-shortcuts/platform.js
@@ -0,0 +1,18 @@
+/**
+ * External dependencies
+ */
+import { includes } from 'lodash';
+
+/**
+ * Return true if platform is MacOS.
+ *
+ * @param {Object} _window window object by default; used for DI testing.
+ *
+ * @return {boolean} True if MacOS; false otherwise.
+ */
+export function isAppleOS( _window = window ) {
+ const { platform } = _window.navigator;
+
+ return platform.indexOf( 'Mac' ) !== -1 ||
+ includes( [ 'iPad', 'iPhone' ], platform );
+}
diff --git a/packages/compose/README.md b/packages/compose/README.md
index 0540c0e2753e58..b7db41522461c6 100644
--- a/packages/compose/README.md
+++ b/packages/compose/README.md
@@ -121,7 +121,20 @@ _Returns_
# **withGlobalEvents**
-Undocumented declaration.
+Higher-order component creator which, given an object of DOM event types and
+values corresponding to a callback function name on the component, will
+create or update a window event handler to invoke the callback when an event
+occurs. On behalf of the consuming developer, the higher-order component
+manages unbinding when the component unmounts, and binding at most a single
+event handler for the entire application.
+
+_Parameters_
+
+- _eventTypesToHandlers_ `Object`: Object with keys of DOM event type, the value a name of the function on the original component's instance which handles the event.
+
+_Returns_
+
+- `Function`: Higher-order component.
# **withInstanceId**
diff --git a/packages/compose/package.json b/packages/compose/package.json
index 250ccc02e43d53..42bb9c0451f496 100644
--- a/packages/compose/package.json
+++ b/packages/compose/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/element": "file:../element",
"@wordpress/is-shallow-equal": "file:../is-shallow-equal",
"lodash": "^4.17.11"
diff --git a/packages/compose/src/with-global-events/index.js b/packages/compose/src/with-global-events/index.js
index f00f222a2d2beb..bf32f27743232d 100644
--- a/packages/compose/src/with-global-events/index.js
+++ b/packages/compose/src/with-global-events/index.js
@@ -21,6 +21,23 @@ import Listener from './listener';
*/
const listener = new Listener();
+/**
+ * Higher-order component creator which, given an object of DOM event types and
+ * values corresponding to a callback function name on the component, will
+ * create or update a window event handler to invoke the callback when an event
+ * occurs. On behalf of the consuming developer, the higher-order component
+ * manages unbinding when the component unmounts, and binding at most a single
+ * event handler for the entire application.
+ *
+ * @param {Object} eventTypesToHandlers Object with keys of DOM
+ * event type, the value a
+ * name of the function on
+ * the original component's
+ * instance which handles
+ * the event.
+ *
+ * @return {Function} Higher-order component.
+ */
function withGlobalEvents( eventTypesToHandlers ) {
return createHigherOrderComponent( ( WrappedComponent ) => {
class Wrapper extends Component {
diff --git a/packages/core-data/README.md b/packages/core-data/README.md
index 8470bbda78a94a..a2fb271017fcd7 100644
--- a/packages/core-data/README.md
+++ b/packages/core-data/README.md
@@ -40,12 +40,386 @@ const MyAuthorsList = withSelect( ( select ) => ( {
The following set of dispatching action creators are available on the object returned by `wp.data.dispatch( 'core' )`:
-_Refer to `actions.js` for the full set of dispatching action creators. In the future, this documentation will be automatically generated to detail all available dispatching action creators._
+
+
+# **addEntities**
+
+Returns an action object used in adding new entities.
+
+_Parameters_
+
+- _entities_ `Array`: Entities received.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveAutosaves**
+
+Returns an action object used in signalling that the autosaves for a
+post have been received.
+
+_Parameters_
+
+- _postId_ `number`: The id of the post that is parent to the autosave.
+- _autosaves_ `(Array|Object)`: An array of autosaves or singular autosave object.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveCurrentUser**
+
+Returns an action used in signalling that the current user has been received.
+
+_Parameters_
+
+- _currentUser_ `Object`: Current user object.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveEmbedPreview**
+
+Returns an action object used in signalling that the preview data for
+a given URl has been received.
+
+_Parameters_
+
+- _url_ `string`: URL to preview the embed for.
+- _preview_ `Mixed`: Preview data.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveEntityRecords**
+
+Returns an action object used in signalling that entity records have been received.
+
+_Parameters_
+
+- _kind_ `string`: Kind of the received entity.
+- _name_ `string`: Name of the received entity.
+- _records_ `(Array|Object)`: Records received.
+- _query_ `?Object`: Query Object.
+- _invalidateCache_ `?boolean`: Should invalidate query caches
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveThemeSupports**
+
+Returns an action object used in signalling that the index has been received.
+
+_Parameters_
+
+- _themeSupports_ `Object`: Theme support for the current theme.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveUploadPermissions**
+
+Returns an action object used in signalling that Upload permissions have been received.
+
+_Parameters_
+
+- _hasUploadPermissions_ `boolean`: Does the user have permission to upload files?
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveUserPermission**
+
+Returns an action object used in signalling that the current user has
+permission to perform an action on a REST resource.
+
+_Parameters_
+
+- _key_ `string`: A key that represents the action and REST resource.
+- _isAllowed_ `boolean`: Whether or not the user can perform the action.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **receiveUserQuery**
+
+Returns an action object used in signalling that authors have been received.
+
+_Parameters_
+
+- _queryID_ `string`: Query ID.
+- _users_ `(Array|Object)`: Users received.
+
+_Returns_
+
+- `Object`: Action object.
+
+# **saveEntityRecord**
+
+Action triggered to save an entity record.
+
+_Parameters_
+
+- _kind_ `string`: Kind of the received entity.
+- _name_ `string`: Name of the received entity.
+- _record_ `Object`: Record to be saved.
+
+_Returns_
+
+- `Object`: Updated record.
+
+
## Selectors
The following selectors are available on the object returned by `wp.data.select( 'core' )`:
-_Refer to `selectors.js` for the full set of selectors. In the future, this documentation will be automatically generated to detail all available selectors._
+
+
+# **canUser**
+
+Returns whether the current user can perform the given action on the given
+REST resource.
+
+Calling this may trigger an OPTIONS request to the REST API via the
+`canUser()` resolver.
+
+
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _action_ `string`: Action to check. One of: 'create', 'read', 'update', 'delete'.
+- _resource_ `string`: REST resource to check, e.g. 'media' or 'posts'.
+- _id_ `[string]`: Optional ID of the rest resource to check.
+
+_Returns_
+
+- `(boolean|undefined)`: Whether or not the user can perform the action, or `undefined` if the OPTIONS request is still being made.
+
+# **getAuthors**
+
+Returns all available authors.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+
+_Returns_
+
+- `Array`: Authors list.
+
+# **getAutosave**
+
+Returns the autosave for the post and author.
+
+_Parameters_
+
+- _state_ `Object`: State tree.
+- _postType_ `string`: The type of the parent post.
+- _postId_ `number`: The id of the parent post.
+- _authorId_ `number`: The id of the author.
+
+_Returns_
+
+- `?Object`: The autosave for the post and author.
+
+# **getAutosaves**
+
+Returns the latest autosaves for the post.
+
+May return multiple autosaves since the backend stores one autosave per
+author for each post.
+
+_Parameters_
+
+- _state_ `Object`: State tree.
+- _postType_ `string`: The type of the parent post.
+- _postId_ `number`: The id of the parent post.
+
+_Returns_
+
+- `?Array`: An array of autosaves for the post, or undefined if there is none.
+
+# **getCurrentUser**
+
+Returns the current user.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+
+_Returns_
+
+- `Object`: Current user object.
+
+# **getEmbedPreview**
+
+Returns the embed preview for the given URL.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _url_ `string`: Embedded URL.
+
+_Returns_
+
+- `*`: Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.
+
+# **getEntitiesByKind**
+
+Returns whether the entities for the give kind are loaded.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _kind_ `string`: Entity kind.
+
+_Returns_
+
+- `boolean`: Whether the entities are loaded
+
+# **getEntity**
+
+Returns the entity object given its kind and name.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _kind_ `string`: Entity kind.
+- _name_ `string`: Entity name.
+
+_Returns_
+
+- `Object`: Entity
+
+# **getEntityRecord**
+
+Returns the Entity's record object by key.
+
+_Parameters_
+
+- _state_ `Object`: State tree
+- _kind_ `string`: Entity kind.
+- _name_ `string`: Entity name.
+- _key_ `number`: Record's key
+
+_Returns_
+
+- `?Object`: Record.
+
+# **getEntityRecords**
+
+Returns the Entity's records.
+
+_Parameters_
+
+- _state_ `Object`: State tree
+- _kind_ `string`: Entity kind.
+- _name_ `string`: Entity name.
+- _query_ `?Object`: Optional terms query.
+
+_Returns_
+
+- `Array`: Records.
+
+# **getThemeSupports**
+
+Return theme supports data in the index.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+
+_Returns_
+
+- `*`: Index data.
+
+# **getUserQueryResults**
+
+Returns all the users returned by a query ID.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _queryID_ `string`: Query ID.
+
+_Returns_
+
+- `Array`: Users list.
+
+# **hasFetchedAutosaves**
+
+Returns true if the REST request for autosaves has completed.
+
+_Parameters_
+
+- _state_ `Object`: State tree.
+- _postType_ `string`: The type of the parent post.
+- _postId_ `number`: The id of the parent post.
+
+_Returns_
+
+- `boolean`: True if the REST request was completed. False otherwise.
+
+# **hasUploadPermissions**
+
+> **Deprecated** since 5.0. Callers should use the more generic `canUser()` selector instead of `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`.
+
+Returns whether the current user can upload media.
+
+Calling this may trigger an OPTIONS request to the REST API via the
+`canUser()` resolver.
+
+
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+
+_Returns_
+
+- `boolean`: Whether or not the user can upload media. Defaults to `true` if the OPTIONS request is being made.
+
+# **isPreviewEmbedFallback**
+
+Determines if the returned preview is an oEmbed link fallback.
+
+WordPress can be configured to return a simple link to a URL if it is not embeddable.
+We need to be able to determine if a URL is embeddable or not, based on what we
+get back from the oEmbed preview API.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _url_ `string`: Embedded URL.
+
+_Returns_
+
+- `booleans`: Is the preview for the URL an oEmbed link fallback.
+
+# **isRequestingEmbedPreview**
+
+Returns true if a request is in progress for embed preview data, or false
+otherwise.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+- _url_ `string`: URL the preview would be for.
+
+_Returns_
+
+- `boolean`: Whether a request is in progress for an embed preview.
+
+
+
diff --git a/packages/core-data/package.json b/packages/core-data/package.json
index 21ef0269756e9f..6120bfd65da107 100644
--- a/packages/core-data/package.json
+++ b/packages/core-data/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/data": "file:../data",
"@wordpress/deprecated": "file:../deprecated",
diff --git a/packages/custom-templated-path-webpack-plugin/README.md b/packages/custom-templated-path-webpack-plugin/README.md
index 3566a5d42a2a9e..83648f91a31a7c 100644
--- a/packages/custom-templated-path-webpack-plugin/README.md
+++ b/packages/custom-templated-path-webpack-plugin/README.md
@@ -51,3 +51,5 @@ module.exports = {
```
For more examples, refer to Webpack's own [`TemplatedPathPlugin.js`](https://github.com/webpack/webpack/blob/v4.1.1/lib/TemplatedPathPlugin.js), which implements the base set of template tags.
+
+
diff --git a/packages/custom-templated-path-webpack-plugin/package.json b/packages/custom-templated-path-webpack-plugin/package.json
index b1f0832b34ab8c..adcb3375229112 100644
--- a/packages/custom-templated-path-webpack-plugin/package.json
+++ b/packages/custom-templated-path-webpack-plugin/package.json
@@ -28,7 +28,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"escape-string-regexp": "^1.0.5"
},
"peerDependencies": {
diff --git a/packages/data/README.md b/packages/data/README.md
index 312bcc54ce2612..65b525d404099d 100644
--- a/packages/data/README.md
+++ b/packages/data/README.md
@@ -464,7 +464,7 @@ const SaleButton = withDispatch( ( dispatch, ownProps ) => {
// Start Sale!
```
-In the majority of cases, it will be sufficient to use only two first params passed to `mapDispatchToProps` as illustrated in the previous example. However, there might be some very advanced use cases where using the `registry` object might be used as a tool to optimize the performance of your component. Using `select` function from the registry might be useful when you need to fetch some dynamic data from the store at the time when the event is fired, but at the same time, you never use it to render your component. In such scenario, you can avoid using the `withSelect` higher order component to compute such prop, which might lead to unnecessary re-renders of you component caused by its frequent value change. Keep in mind, that `mapDispatchToProps` must return an object with functions only.
+In the majority of cases, it will be sufficient to use only two first params passed to `mapDispatchToProps` as illustrated in the previous example. However, there might be some very advanced use cases where using the `registry` object might be used as a tool to optimize the performance of your component. Using `select` function from the registry might be useful when you need to fetch some dynamic data from the store at the time when the event is fired, but at the same time, you never use it to render your component. In such scenario, you can avoid using the `withSelect` higher order component to compute such prop, which might lead to unnecessary re-renders of your component caused by its frequent value change. Keep in mind, that `mapDispatchToProps` must return an object with functions only.
```jsx
function Button( { onClick, children } ) {
@@ -495,7 +495,7 @@ _Note:_ It is important that the `mapDispatchToProps` function always returns an
_Parameters_
-- _mapDispatchToProps_ `Object`: Object of prop names where value is a dispatch-bound action creator, or a function to be called with with the component's props and returning an action creator.
+- _mapDispatchToProps_ `Object`: Object of prop names where value is a dispatch-bound action creator, or a function to be called with the component's props and returning an action creator.
_Returns_
diff --git a/packages/data/package.json b/packages/data/package.json
index 2f05a8cbb499dc..056dc2ccac4e48 100644
--- a/packages/data/package.json
+++ b/packages/data/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:../compose",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
diff --git a/packages/data/src/components/with-dispatch/index.js b/packages/data/src/components/with-dispatch/index.js
index 1a13b6f1f7ed1e..1da0aa95f3de7a 100644
--- a/packages/data/src/components/with-dispatch/index.js
+++ b/packages/data/src/components/with-dispatch/index.js
@@ -19,7 +19,7 @@ import { RegistryConsumer } from '../registry-provider';
*
* @param {Object} mapDispatchToProps Object of prop names where value is a
* dispatch-bound action creator, or a
- * function to be called with with the
+ * function to be called with the
* component's props and returning an
* action creator.
*
@@ -48,7 +48,7 @@ import { RegistryConsumer } from '../registry-provider';
* ```
*
* @example
- * In the majority of cases, it will be sufficient to use only two first params passed to `mapDispatchToProps` as illustrated in the previous example. However, there might be some very advanced use cases where using the `registry` object might be used as a tool to optimize the performance of your component. Using `select` function from the registry might be useful when you need to fetch some dynamic data from the store at the time when the event is fired, but at the same time, you never use it to render your component. In such scenario, you can avoid using the `withSelect` higher order component to compute such prop, which might lead to unnecessary re-renders of you component caused by its frequent value change. Keep in mind, that `mapDispatchToProps` must return an object with functions only.
+ * In the majority of cases, it will be sufficient to use only two first params passed to `mapDispatchToProps` as illustrated in the previous example. However, there might be some very advanced use cases where using the `registry` object might be used as a tool to optimize the performance of your component. Using `select` function from the registry might be useful when you need to fetch some dynamic data from the store at the time when the event is fired, but at the same time, you never use it to render your component. In such scenario, you can avoid using the `withSelect` higher order component to compute such prop, which might lead to unnecessary re-renders of your component caused by its frequent value change. Keep in mind, that `mapDispatchToProps` must return an object with functions only.
*
* ```jsx
* function Button( { onClick, children } ) {
diff --git a/packages/date/README.md b/packages/date/README.md
index 5c30a6f4ee532c..c4bad6ef1636e1 100644
--- a/packages/date/README.md
+++ b/packages/date/README.md
@@ -31,7 +31,7 @@ _Returns_
# **dateI18n**
-Formats a date (like `dateI18n()` in PHP).
+Formats a date (like `date_i18n()` in PHP).
_Parameters_
diff --git a/packages/date/package.json b/packages/date/package.json
index e5504d069e50e1..19c13e590a5af0 100644
--- a/packages/date/package.json
+++ b/packages/date/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"moment": "^2.22.1",
"moment-timezone": "^0.5.16"
},
diff --git a/packages/date/src/index.js b/packages/date/src/index.js
index 24eb69434fd2e8..26501b394200b6 100644
--- a/packages/date/src/index.js
+++ b/packages/date/src/index.js
@@ -342,7 +342,7 @@ export function gmdate( dateFormat, dateValue = new Date() ) {
}
/**
- * Formats a date (like `dateI18n()` in PHP).
+ * Formats a date (like `date_i18n()` in PHP).
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
diff --git a/packages/dependency-extraction-webpack-plugin/README.md b/packages/dependency-extraction-webpack-plugin/README.md
index 78cf2abcb7486e..34354a2cc9ceec 100644
--- a/packages/dependency-extraction-webpack-plugin/README.md
+++ b/packages/dependency-extraction-webpack-plugin/README.md
@@ -194,3 +194,5 @@ $script_dependencies = file_exists( $script_deps_path )
$script_url = plugins_url( $script_path, __FILE__ );
wp_enqueue_script( 'script', $script_url, $script_dependencies );
```
+
+
diff --git a/packages/dependency-extraction-webpack-plugin/index.js b/packages/dependency-extraction-webpack-plugin/index.js
index 5e067856671cd4..f99ec61fa27baf 100644
--- a/packages/dependency-extraction-webpack-plugin/index.js
+++ b/packages/dependency-extraction-webpack-plugin/index.js
@@ -54,9 +54,9 @@ class DependencyExtractionWebpackPlugin {
}
mapRequestToDependency( request ) {
- // Handle via options.requestToDependency first
- if ( typeof this.options.requestToDependency === 'function' ) {
- const scriptDependency = this.options.requestToDependency( request );
+ // Handle via options.requestToHandle first
+ if ( typeof this.options.requestToHandle === 'function' ) {
+ const scriptDependency = this.options.requestToHandle( request );
if ( scriptDependency ) {
return scriptDependency;
}
diff --git a/packages/dependency-extraction-webpack-plugin/test/fixtures/overrides/webpack.config.js b/packages/dependency-extraction-webpack-plugin/test/fixtures/overrides/webpack.config.js
index e72c63ad010a25..f61163ae384602 100644
--- a/packages/dependency-extraction-webpack-plugin/test/fixtures/overrides/webpack.config.js
+++ b/packages/dependency-extraction-webpack-plugin/test/fixtures/overrides/webpack.config.js
@@ -12,7 +12,7 @@ module.exports = {
return [ 'rxjs', 'operators' ];
}
},
- requestToDependency( request ) {
+ requestToHandle( request ) {
if ( request === 'rxjs' || request === 'rxjs/operators' ) {
return 'wp-script-handle-for-rxjs';
}
diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json
index a68bb945bf8289..6c07785549a05c 100644
--- a/packages/deprecated/package.json
+++ b/packages/deprecated/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/hooks": "file:../hooks"
},
"publishConfig": {
diff --git a/packages/docgen/coverage.md b/packages/docgen/coverage.md
deleted file mode 100644
index 5fd3bd65442652..00000000000000
--- a/packages/docgen/coverage.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# Coverage
-
-## Packages outside of scope
-
-- babel-plugin-makepot. CommonJS module. Babel plugin.
-- babel-preset-default. CommonJS module. Babel preset.
-- browserslist-config. CommonJS module. Config.
-- custom-templated-path-webpack-plugin. CommonJS module. Webpack plugin.
-- docgen. CommonJS module.
-- e2e-tests. Do not export anything.
-- eslint-plugin. CommonJS module. ESLint plugin.
-- is-shallow-equal. CommonJS module.
-- jest-preset-default. CommonJS module. Jest preset.
-- library-export-default-webpack-plugin. CommonJS. Webpack plugin.
-- npm-package-json-lint-config. CommonJS. Config.
-- postcss-themes. CommonJS module.
-- scripts. CommonJS module.
-
-## TODO
-
-These either happen in private API, aren't relevant, or are pending of decission.
-
-- [ ] go undocummented: `unstable__*`
-- [ ] `constants` keycodes
-- [ ] `{?{ time: number, count: number }}`packages/editor/src/store/selectors.js
-- [ ] `{type=}` packages/block-library/src/image/edit.js
-- [ ] `@api` packages/editor/src/editor-styles/ast/stringify/compiler.js
-- [ ] `@callback` packages/components/src/autocomplete/index.js
-- [ ] `@cite` packages/block-serialization-default-parser/src/index.js
-- [ ] `@class` packages/edit-post/src/hooks/components/media-upload/index.js
-- [ ] `@const` packages/editor/src/editor-styles/transforms/wrap.js
-- [ ] `@constant` packages/editor/src/hooks/align.js
-- [ ] `@constructor` packages/edit-post/src/hooks/components/media-upload/index.js
-- [ ] `@inheritdoc` packages/edit-post/src/components/meta-boxes/meta-boxes-area/index.js
-- [ ] `@private` packages/editor/src/components/rich-text/index.js
-- [ ] `@property` babel-plugin-import-jsx-pragma
-- [ ] `@since` packages/block-serialization-default-parser/src/index.js
-- [ ] `@throws` packages/blocks/src/api/node.js
-- [ ] `@typedef` packages/blocks/src/api/registration.js
-
-## DONE
-
-- [x] a11y
-- [x] annotations
-- [x] api-fetch
-- [x] babel-plugin-import-jsx-pragma
-- [x] blob
-- [x] block-library
-- [x] block-serialization-default-parser
-- [x] block-serialization-spec-parser
-- [x] blocks
-- [x] components
-- [x] compose
-- [x] core-data
-- [x] data
-- [x] date
-- [x] deprecated
-- [x] dom
-- [x] dom-ready
-- [x] e2e-test-utils
-- [x] edit-post
-- [x] editor
-- [x] element
-- [x] escape-html
-- [x] format-library
-- [x] hooks
-- [x] html-entities
-- [x] i18n
-- [x] jest-console
-- [x] jest-puppeteer-axe
-- [x] keycodes
-- [x] list-reusable-blocks
-- [x] notices
-- [x] nux
-- [x] plugins
-- [x] priority-queue
-- [x] redux-routine
-- [x] rich-text
-- [x] shortcode
-- [x] token-list
-- [x] url
-- [x] viewport
-- [x] wordcount
diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json
index eb4d3329a3dc49..846b37503f3382 100644
--- a/packages/dom-ready/package.json
+++ b/packages/dom-ready/package.json
@@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/dom/package.json b/packages/dom/package.json
index 5684db1271817d..c38ab400278c1f 100644
--- a/packages/dom/package.json
+++ b/packages/dom/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
},
"publishConfig": {
diff --git a/packages/e2e-test-utils/CHANGELOG.md b/packages/e2e-test-utils/CHANGELOG.md
index 55994c70ba91a4..ff9db333694b7b 100644
--- a/packages/e2e-test-utils/CHANGELOG.md
+++ b/packages/e2e-test-utils/CHANGELOG.md
@@ -1,3 +1,9 @@
+## Unreleased
+
+### Requirements
+
+- The minimum version of Gutenberg `5.6.0` or the minimum version of WordPress `5.2.0`.
+
## 1.1.0 (2019-03-20)
### New Features
@@ -6,7 +12,16 @@
- New Function: `openAllBlockInserterCategories` - Opens all block inserter categories.
- New Function: `getAllBlockInserterItemTitles` - Opens the global block inserter.
+### Requirements
+
+- The minimum version of Gutenberg `5.3.0` or the minimum version of WordPress `5.2.0`.
## 1.0.0 (2019-03-06)
+### New Features
+
- Initial release.
+
+### Requirements
+
+- The minimum version of Gutenberg `5.2.0` or the minimum version of WordPress `5.2.0`.
diff --git a/packages/e2e-test-utils/README.md b/packages/e2e-test-utils/README.md
index 8cfd7554eb7826..7cb439d46fc4eb 100644
--- a/packages/e2e-test-utils/README.md
+++ b/packages/e2e-test-utils/README.md
@@ -2,6 +2,8 @@
End-To-End (E2E) test utils for WordPress.
+_It works properly with the minimum version of Gutenberg `5.6.0` or the minimum version of WordPress `5.2.0`._
+
## Installation
Install the module
diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json
index 888cc843c6f4cd..ef14ed67c613ca 100644
--- a/packages/e2e-test-utils/package.json
+++ b/packages/e2e-test-utils/package.json
@@ -28,7 +28,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/keycodes": "file:../keycodes",
"@wordpress/url": "file:../url",
"lodash": "^4.17.11",
diff --git a/packages/e2e-test-utils/src/are-pre-publish-checks-enabled.js b/packages/e2e-test-utils/src/are-pre-publish-checks-enabled.js
index ec57e1d7561c2f..3aab4928850edd 100644
--- a/packages/e2e-test-utils/src/are-pre-publish-checks-enabled.js
+++ b/packages/e2e-test-utils/src/are-pre-publish-checks-enabled.js
@@ -1,9 +1,12 @@
+/**
+ * Internal dependencies
+ */
+import { wpDataSelect } from './wp-data-select';
+
/**
* Verifies if publish checks are enabled.
* @return {boolean} Boolean which represents the state of prepublish checks.
*/
-export async function arePrePublishChecksEnabled() {
- return page.evaluate( () =>
- window.wp.data.select( 'core/editor' ).isPublishSidebarEnabled()
- );
+export function arePrePublishChecksEnabled() {
+ return wpDataSelect( 'core/editor', 'isPublishSidebarEnabled' );
}
diff --git a/packages/e2e-test-utils/src/get-all-blocks.js b/packages/e2e-test-utils/src/get-all-blocks.js
index 679baab96a5593..6f87f827615cba 100644
--- a/packages/e2e-test-utils/src/get-all-blocks.js
+++ b/packages/e2e-test-utils/src/get-all-blocks.js
@@ -1,11 +1,13 @@
+/**
+ * Internal dependencies
+ */
+import { wpDataSelect } from './wp-data-select';
+
/**
* Returns an array with all blocks; Equivalent to calling wp.data.select( 'core/editor' ).getBlocks();
*
* @return {Promise} Promise resolving with an array containing all blocks in the document.
*/
-export async function getAllBlocks() {
- return await page.evaluate( () => {
- const { select } = window.wp.data;
- return select( 'core/editor' ).getBlocks();
- } );
+export function getAllBlocks() {
+ return wpDataSelect( 'core/editor', 'getBlocks' );
}
diff --git a/packages/e2e-test-utils/src/get-edited-post-content.js b/packages/e2e-test-utils/src/get-edited-post-content.js
index 7a595133f22a09..be6e884e12d1f7 100644
--- a/packages/e2e-test-utils/src/get-edited-post-content.js
+++ b/packages/e2e-test-utils/src/get-edited-post-content.js
@@ -1,10 +1,13 @@
+/**
+ * Internal dependencies
+ */
+import { wpDataSelect } from './wp-data-select';
+
/**
* Returns a promise which resolves with the edited post content (HTML string).
*
* @return {Promise} Promise resolving with post content markup.
*/
export async function getEditedPostContent() {
- return await page.evaluate( () => {
- return window.wp.data.select( 'core/editor' ).getEditedPostContent();
- } );
+ return wpDataSelect( 'core/editor', 'getEditedPostContent' );
}
diff --git a/packages/e2e-test-utils/src/wp-data-select.js b/packages/e2e-test-utils/src/wp-data-select.js
new file mode 100644
index 00000000000000..fac2bebcb3c1cb
--- /dev/null
+++ b/packages/e2e-test-utils/src/wp-data-select.js
@@ -0,0 +1,18 @@
+/**
+ * Queries the WordPress data module.
+ * @param {string} store Store to query e.g: core/editor, core/blocks...
+ * @param {string} selector Selector to exectute e.g: getBlocks.
+ * @param {...Object} parameters Parameters to pass to the selector.
+ *
+ * @return {?Object} Result of querying.
+ */
+export function wpDataSelect( store, selector, ...parameters ) {
+ return page.evaluate(
+ ( _store, _selector, ..._parameters ) => {
+ return window.wp.data.select( _store )[ _selector ]( ..._parameters );
+ },
+ store,
+ selector,
+ parameters
+ );
+}
diff --git a/packages/e2e-tests/jest.config.js b/packages/e2e-tests/jest.config.js
index 79d6518948624a..ea4d99ce56ac13 100644
--- a/packages/e2e-tests/jest.config.js
+++ b/packages/e2e-tests/jest.config.js
@@ -7,8 +7,4 @@ module.exports = {
'/config/setup-test-framework.js',
'expect-puppeteer',
],
- transformIgnorePatterns: [
- 'node_modules',
- 'scripts/config/puppeteer.config.js',
- ],
};
diff --git a/packages/e2e-tests/specs/block-deletion.test.js b/packages/e2e-tests/specs/block-deletion.test.js
index a5dc9bb9c44753..fb975fb61e88ce 100644
--- a/packages/e2e-tests/specs/block-deletion.test.js
+++ b/packages/e2e-tests/specs/block-deletion.test.js
@@ -30,7 +30,7 @@ describe( 'block deletion -', () => {
beforeEach( addThreeParagraphsToNewPost );
describe( 'deleting the third block using the Remove Block menu item', () => {
- it.skip( 'results in two remaining blocks and positions the caret at the end of the second block', async () => {
+ it( 'results in two remaining blocks and positions the caret at the end of the second block', async () => {
// The blocks can't be empty to trigger the toolbar
await page.keyboard.type( 'Paragraph to remove' );
diff --git a/packages/e2e-tests/specs/block-hierarchy-navigation.test.js b/packages/e2e-tests/specs/block-hierarchy-navigation.test.js
index c53adb01730bd3..9153526a262a8f 100644
--- a/packages/e2e-tests/specs/block-hierarchy-navigation.test.js
+++ b/packages/e2e-tests/specs/block-hierarchy-navigation.test.js
@@ -68,7 +68,7 @@ describe( 'Navigating the block hierarchy', () => {
await pressKeyTimes( 'Tab', 4 );
// Tweak the columns count by increasing it by one.
- page.keyboard.press( 'ArrowRight' );
+ await page.keyboard.press( 'ArrowRight' );
// Navigate to the last column in the columns block.
await openBlockNavigator();
diff --git a/packages/e2e-tests/specs/blocks/__snapshots__/group.test.js.snap b/packages/e2e-tests/specs/blocks/__snapshots__/group.test.js.snap
index 4de439b09327f3..df7b3f6419f155 100644
--- a/packages/e2e-tests/specs/blocks/__snapshots__/group.test.js.snap
+++ b/packages/e2e-tests/specs/blocks/__snapshots__/group.test.js.snap
@@ -2,16 +2,20 @@
exports[`Group can be created using the block inserter 1`] = `
"
-
-
Group block
-
+
"
`;
exports[`Group can be created using the slash inserter 1`] = `
"
+
+"
+`;
+
+exports[`Group can have other blocks appended to it using the button appender 1`] = `
+"
-
Group block
+
Group Block with a Paragraph
"
`;
diff --git a/packages/e2e-tests/specs/blocks/__snapshots__/list.test.js.snap b/packages/e2e-tests/specs/blocks/__snapshots__/list.test.js.snap
index 92fb70a48a60cc..a7212afc153e6f 100644
--- a/packages/e2e-tests/specs/blocks/__snapshots__/list.test.js.snap
+++ b/packages/e2e-tests/specs/blocks/__snapshots__/list.test.js.snap
@@ -254,7 +254,7 @@ exports[`List should split into two with paragraph and merge lists 2`] = `
exports[`List should split into two with paragraph and merge lists 3`] = `
"
-
one
+
one
diff --git a/packages/e2e-tests/specs/blocks/group.test.js b/packages/e2e-tests/specs/blocks/group.test.js
index cb04ffdc64cd7e..7ce9021d26bd4b 100644
--- a/packages/e2e-tests/specs/blocks/group.test.js
+++ b/packages/e2e-tests/specs/blocks/group.test.js
@@ -16,7 +16,6 @@ describe( 'Group', () => {
it( 'can be created using the block inserter', async () => {
await searchForBlock( 'Group' );
await page.click( '.editor-block-list-item-group' );
- await page.keyboard.type( 'Group block' );
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
@@ -25,7 +24,16 @@ describe( 'Group', () => {
await clickBlockAppender();
await page.keyboard.type( '/group' );
await page.keyboard.press( 'Enter' );
- await page.keyboard.type( 'Group block' );
+
+ expect( await getEditedPostContent() ).toMatchSnapshot();
+ } );
+
+ it( 'can have other blocks appended to it using the button appender', async () => {
+ await searchForBlock( 'Group' );
+ await page.click( '.editor-block-list-item-group' );
+ await page.click( '.block-editor-button-block-appender' );
+ await page.click( '.editor-block-list-item-paragraph' );
+ await page.keyboard.type( 'Group Block with a Paragraph' );
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
diff --git a/packages/e2e-tests/specs/keyboard-navigable-blocks.test.js b/packages/e2e-tests/specs/keyboard-navigable-blocks.test.js
index 0945d3525f8961..5253528a615cd0 100644
--- a/packages/e2e-tests/specs/keyboard-navigable-blocks.test.js
+++ b/packages/e2e-tests/specs/keyboard-navigable-blocks.test.js
@@ -97,34 +97,6 @@ const tabThroughBlockToolbar = async () => {
);
await expect( isFocusedRightAlignmentControl ).toBe( true );
- // Tab to focus on the 'Bold' formatting button
- await page.keyboard.press( 'Tab' );
- const isFocusedBoldFormattingButton = await page.evaluate( () =>
- document.activeElement.classList.contains( 'components-toolbar__control' )
- );
- await expect( isFocusedBoldFormattingButton ).toBe( true );
-
- // Tab to focus on the 'Italic' formatting button
- await page.keyboard.press( 'Tab' );
- const isFocusedItalicFormattingButton = await page.evaluate( () =>
- document.activeElement.classList.contains( 'components-toolbar__control' )
- );
- await expect( isFocusedItalicFormattingButton ).toBe( true );
-
- // Tab to focus on the 'Hyperlink' formatting button
- await page.keyboard.press( 'Tab' );
- const isFocusedHyperlinkFormattingButton = await page.evaluate( () =>
- document.activeElement.classList.contains( 'components-toolbar__control' )
- );
- await expect( isFocusedHyperlinkFormattingButton ).toBe( true );
-
- // Tab to focus on the 'Strikethrough' formatting button
- await page.keyboard.press( 'Tab' );
- const isFocusedMoreFormattingDropdown = await page.evaluate( () =>
- document.activeElement.classList.contains( 'components-dropdown-menu__toggle' )
- );
- await expect( isFocusedMoreFormattingDropdown ).toBe( true );
-
// Tab to focus on the 'More formatting' dropdown toggle
await page.keyboard.press( 'Tab' );
const isFocusedBlockSettingsDropdown = await page.evaluate( () =>
diff --git a/packages/e2e-tests/specs/links.test.js b/packages/e2e-tests/specs/links.test.js
index e2d131a77043a6..84563375547b2e 100644
--- a/packages/e2e-tests/specs/links.test.js
+++ b/packages/e2e-tests/specs/links.test.js
@@ -308,7 +308,9 @@ describe( 'Links', () => {
} );
// Test for regressions of https://github.com/WordPress/gutenberg/issues/10496.
- it( 'allows autocomplete suggestions to be navigated with the keyboard', async () => {
+ // This test isn't reliable on Travis and fails from time to time.
+ // See: https://github.com/WordPress/gutenberg/pull/15211.
+ it.skip( 'allows autocomplete suggestions to be navigated with the keyboard', async () => {
const titleText = 'Test post keyboard';
const postURL = await createPostWithTitle( titleText );
diff --git a/packages/e2e-tests/specs/plugins/__snapshots__/cpt-locking.test.js.snap b/packages/e2e-tests/specs/plugins/__snapshots__/cpt-locking.test.js.snap
index de467ce40d3e80..24166c89f310b3 100644
--- a/packages/e2e-tests/specs/plugins/__snapshots__/cpt-locking.test.js.snap
+++ b/packages/e2e-tests/specs/plugins/__snapshots__/cpt-locking.test.js.snap
@@ -1,5 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`cpt locking template_lock all should not error when deleting the cotents of a paragraph 1`] = `
+"
+
+
+
+
+
+
+
+
+
+"
+`;
+
exports[`cpt locking template_lock false should allow blocks to be inserted 1`] = `
"
diff --git a/packages/e2e-tests/specs/plugins/cpt-locking.test.js b/packages/e2e-tests/specs/plugins/cpt-locking.test.js
index 2a858b8a5c8499..4239716c6c1a48 100644
--- a/packages/e2e-tests/specs/plugins/cpt-locking.test.js
+++ b/packages/e2e-tests/specs/plugins/cpt-locking.test.js
@@ -8,6 +8,7 @@ import {
deactivatePlugin,
getEditedPostContent,
insertBlock,
+ pressKeyTimes,
} from '@wordpress/e2e-test-utils';
describe( 'cpt locking', () => {
@@ -58,6 +59,14 @@ describe( 'cpt locking', () => {
await page.$( 'button[aria-label="Move up"]' )
).toBeNull();
} );
+
+ it( 'should not error when deleting the cotents of a paragraph', async () => {
+ await page.click( '.block-editor-block-list__block[data-type="core/paragraph"] p' );
+ const textToType = 'Paragraph';
+ await page.keyboard.type( 'Paragraph' );
+ await pressKeyTimes( 'Backspace', textToType.length + 1 );
+ expect( await getEditedPostContent() ).toMatchSnapshot();
+ } );
} );
describe( 'template_lock insert', () => {
diff --git a/packages/e2e-tests/specs/plugins/wp-editor-meta-box.test.js b/packages/e2e-tests/specs/plugins/wp-editor-meta-box.test.js
index c99da39b7cfe00..74dd45374e946d 100644
--- a/packages/e2e-tests/specs/plugins/wp-editor-meta-box.test.js
+++ b/packages/e2e-tests/specs/plugins/wp-editor-meta-box.test.js
@@ -8,7 +8,9 @@ import {
publishPost,
} from '@wordpress/e2e-test-utils';
-describe( 'WP Editor Meta Boxes', () => {
+// This test isn't reliable on Travis and fails from time to time.
+// See: https://github.com/WordPress/gutenberg/pull/15211.
+describe.skip( 'WP Editor Meta Boxes', () => {
beforeAll( async () => {
await activatePlugin( 'gutenberg-test-plugin-wp-editor-meta-box' );
await createNewPost();
diff --git a/packages/e2e-tests/specs/preview.test.js b/packages/e2e-tests/specs/preview.test.js
index 660c63b324d9cb..5a1d7f4cc2754a 100644
--- a/packages/e2e-tests/specs/preview.test.js
+++ b/packages/e2e-tests/specs/preview.test.js
@@ -100,7 +100,7 @@ describe( 'Preview', () => {
// When autosave completes for a new post, the URL of the editor should
// update to include the ID. Use this to assert on preview URL.
- const [ , postId ] = await( await editorPage.waitForFunction( () => {
+ const [ , postId ] = await ( await editorPage.waitForFunction( () => {
return window.location.search.match( /[\?&]post=(\d+)/ );
} ) ).jsonValue();
diff --git a/packages/e2e-tests/specs/taxonomies.test.js b/packages/e2e-tests/specs/taxonomies.test.js
index 2cd8e7665eda47..1c88fa690be961 100644
--- a/packages/e2e-tests/specs/taxonomies.test.js
+++ b/packages/e2e-tests/specs/taxonomies.test.js
@@ -110,7 +110,10 @@ describe( 'Taxonomies', () => {
expect( selectedCategories[ 0 ] ).toEqual( 'z rand category 1' );
} );
- it( 'should be able to open the tags panel and create a new tag if the user has the right capabilities', async () => {
+ // This test isn't reliable locally because repeated execution of the test triggers 400 network
+ // because of the tag's duplication. Also, it randomly doesn't add a new tag after pressing enter.
+ // See: https://github.com/WordPress/gutenberg/pull/15211.
+ it.skip( 'should be able to open the tags panel and create a new tag if the user has the right capabilities', async () => {
await createNewPost();
await openDocumentSettingsSidebar();
diff --git a/packages/e2e-tests/specs/undo.test.js b/packages/e2e-tests/specs/undo.test.js
index 71caccf09b3c3f..60e9ff64bfdebd 100644
--- a/packages/e2e-tests/specs/undo.test.js
+++ b/packages/e2e-tests/specs/undo.test.js
@@ -6,6 +6,9 @@ import {
getEditedPostContent,
createNewPost,
pressKeyWithModifier,
+ selectBlockByClientId,
+ getAllBlocks,
+ saveDraft,
} from '@wordpress/e2e-test-utils';
describe( 'undo', () => {
@@ -63,4 +66,36 @@ describe( 'undo', () => {
// After undoing every action, there should be no more undo history.
expect( await page.$( '.editor-history__undo[aria-disabled="true"]' ) ).not.toBeNull();
} );
+
+ it( 'should undo for explicit persistence editing post', async () => {
+ // Regression test: An issue had occurred where the creation of an
+ // explicit undo level would interfere with blocks values being synced
+ // correctly to the block editor.
+ //
+ // See: https://github.com/WordPress/gutenberg/issues/14950
+
+ // Issue is demonstrated from an edited post: create, save, and reload.
+ await clickBlockAppender();
+ await page.keyboard.type( 'original' );
+ await saveDraft();
+ await page.reload();
+
+ // Issue is demonstrated by forcing state merges (multiple inputs) on
+ // an existing text after a fresh reload.
+ await selectBlockByClientId( ( await getAllBlocks() )[ 0 ].clientId );
+ await page.keyboard.type( 'modified' );
+
+ // The issue is demonstrated after the one second delay to trigger the
+ // creation of an explicit undo persistence level.
+ await new Promise( ( resolve ) => setTimeout( resolve, 1000 ) );
+
+ await pressKeyWithModifier( 'primary', 'z' );
+
+ // Assert against the _visible_ content. Since editor state with the
+ // regression present was accurate, it would produce the correct
+ // content. The issue had manifested in the form of what was shown to
+ // the user since the blocks state failed to sync to block editor.
+ const visibleContent = await page.evaluate( () => document.activeElement.textContent );
+ expect( visibleContent ).toBe( 'original' );
+ } );
} );
diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json
index ee4214ca1644be..d8e13fcc07f6d7 100644
--- a/packages/edit-post/package.json
+++ b/packages/edit-post/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json
index 7c8f959d2603cb..8dc27a6ef49922 100644
--- a/packages/edit-widgets/package.json
+++ b/packages/edit-widgets/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.0.0",
+ "@babel/runtime": "^7.4.4",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
"@wordpress/element": "file:../element",
diff --git a/packages/editor/package.json b/packages/editor/package.json
index e60b6e4477cf66..cd617a40043f3f 100644
--- a/packages/editor/package.json
+++ b/packages/editor/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/blob": "file:../blob",
"@wordpress/block-editor": "file:../block-editor",
diff --git a/packages/editor/src/components/deprecated.js b/packages/editor/src/components/deprecated.js
index 80004056ec3114..8468f254c2dccf 100644
--- a/packages/editor/src/components/deprecated.js
+++ b/packages/editor/src/components/deprecated.js
@@ -40,7 +40,7 @@ import {
RichTextShortcut,
RichTextToolbarButton,
RichTextInserterItem,
- UnstableRichTextInputEvent,
+ __unstableRichTextInputEvent,
MediaPlaceholder,
MediaUpload,
MediaUploadCheck,
@@ -98,7 +98,7 @@ export {
RichTextShortcut,
RichTextToolbarButton,
RichTextInserterItem,
- UnstableRichTextInputEvent,
+ __unstableRichTextInputEvent,
MediaPlaceholder,
MediaUpload,
MediaUploadCheck,
diff --git a/packages/editor/src/components/deprecated.native.js b/packages/editor/src/components/deprecated.native.js
index 39596edc9dab3b..ba6ebf23e31a1d 100644
--- a/packages/editor/src/components/deprecated.native.js
+++ b/packages/editor/src/components/deprecated.native.js
@@ -17,7 +17,7 @@ import {
RichTextShortcut,
RichTextToolbarButton,
RichTextInserterItem,
- UnstableRichTextInputEvent,
+ __unstableRichTextInputEvent,
MediaPlaceholder,
URLInput,
withColors,
@@ -39,7 +39,7 @@ export {
RichTextShortcut,
RichTextToolbarButton,
RichTextInserterItem,
- UnstableRichTextInputEvent,
+ __unstableRichTextInputEvent,
MediaPlaceholder,
URLInput,
withColors,
diff --git a/packages/editor/src/components/error-boundary/style.scss b/packages/editor/src/components/error-boundary/style.scss
index 6c11ec57a0c5d5..d1b792d0ff3d32 100644
--- a/packages/editor/src/components/error-boundary/style.scss
+++ b/packages/editor/src/components/error-boundary/style.scss
@@ -1,5 +1,4 @@
.editor-error-boundary {
- max-width: $content-width;
margin: auto;
max-width: 780px;
padding: 20px;
diff --git a/packages/editor/src/components/post-locked-modal/index.js b/packages/editor/src/components/post-locked-modal/index.js
index b9c8de97f3d93e..8c6417ae403c82 100644
--- a/packages/editor/src/components/post-locked-modal/index.js
+++ b/packages/editor/src/components/post-locked-modal/index.js
@@ -121,9 +121,13 @@ class PostLockedModal extends Component {
data.append( 'post_ID', postId );
data.append( 'active_post_lock', activePostLock );
- const xhr = new window.XMLHttpRequest();
- xhr.open( 'POST', postLockUtils.ajaxUrl, false );
- xhr.send( data );
+ if ( window.navigator.sendBeacon ) {
+ window.navigator.sendBeacon( postLockUtils.ajaxUrl, data );
+ } else {
+ const xhr = new window.XMLHttpRequest();
+ xhr.open( 'POST', postLockUtils.ajaxUrl, false );
+ xhr.send( data );
+ }
}
render() {
diff --git a/packages/editor/src/components/post-saved-state/style.scss b/packages/editor/src/components/post-saved-state/style.scss
index 68ca157e2077d4..7e6a3ce6e0682e 100644
--- a/packages/editor/src/components/post-saved-state/style.scss
+++ b/packages/editor/src/components/post-saved-state/style.scss
@@ -1,8 +1,11 @@
.editor-post-saved-state {
display: flex;
align-items: center;
+ width: $icon-button-size - 8px;
+ padding: #{ $grid-size-small * 3 } $grid-size-small;
color: $light-gray-900; // Doesn't need to meet AA because button is disabled and it's supporting text.
overflow: hidden;
+ white-space: nowrap;
&.is-saving {
animation: edit-post__loading-fade-animation 0.5s infinite;
@@ -11,15 +14,6 @@
.dashicon {
display: inline-block;
flex: 0 0 auto;
- }
-}
-
-.editor-post-saved-state {
- width: $icon-button-size - 8px;
- white-space: nowrap;
- padding: #{ $grid-size-small * 3 } $grid-size-small;
-
- .dashicon {
margin-right: $grid-size;
}
diff --git a/packages/editor/src/components/post-taxonomies/style.scss b/packages/editor/src/components/post-taxonomies/style.scss
index f348b8900fb54e..3e4f5fa263f4f3 100644
--- a/packages/editor/src/components/post-taxonomies/style.scss
+++ b/packages/editor/src/components/post-taxonomies/style.scss
@@ -1,6 +1,9 @@
.editor-post-taxonomies__hierarchical-terms-list {
max-height: 14em;
overflow: auto;
+
+ // Extra left padding prevents checkbox focus borders from being cut off.
+ padding-left: 2px;
}
.editor-post-taxonomies__hierarchical-terms-choice {
diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js
index b85d7f2340b9cb..661c66a90a403a 100644
--- a/packages/editor/src/components/post-title/index.native.js
+++ b/packages/editor/src/components/post-title/index.native.js
@@ -2,6 +2,7 @@
* External dependencies
*/
import { View } from 'react-native';
+import { isEmpty } from 'lodash';
/**
* WordPress dependencies
@@ -12,6 +13,7 @@ import { decodeEntities } from '@wordpress/html-entities';
import { withDispatch } from '@wordpress/data';
import { withFocusOutside } from '@wordpress/components';
import { withInstanceId, compose } from '@wordpress/compose';
+import { __, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
@@ -70,7 +72,20 @@ class PostTitle extends Component {
const borderColor = this.state.isSelected ? focusedBorderColor : 'transparent';
return (
-
+
+
+
+```
+
+
+```jsx
+
+```
+
+Examples of **correct** code for this rule:
+
+
+```jsx
+
+```
+
+```jsx
+
+
+
+```
+
+```jsx
+
+
+
+```
diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json
index 68784f5c29894b..e98733a8eea1ae 100644
--- a/packages/eslint-plugin/package.json
+++ b/packages/eslint-plugin/package.json
@@ -18,7 +18,7 @@
"url": "https://github.com/WordPress/gutenberg/issues"
},
"dependencies": {
- "babel-eslint": "^8.0.3",
+ "babel-eslint": "^10.0.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.6.0",
diff --git a/packages/eslint-plugin/rules/__tests__/no-base-control-with-label-without-id.js b/packages/eslint-plugin/rules/__tests__/no-base-control-with-label-without-id.js
new file mode 100644
index 00000000000000..a03a3a2296f7b1
--- /dev/null
+++ b/packages/eslint-plugin/rules/__tests__/no-base-control-with-label-without-id.js
@@ -0,0 +1,74 @@
+/**
+ * External dependencies
+ */
+import { RuleTester } from 'eslint';
+
+/**
+ * Internal dependencies
+ */
+import rule from '../no-base-control-with-label-without-id';
+
+const ruleTester = new RuleTester( {
+ parserOptions: {
+ ecmaVersion: 6,
+ ecmaFeatures: {
+ jsx: true,
+ },
+ },
+} );
+
+ruleTester.run( 'no-base-control-with-label-without-id', rule, {
+ valid: [
+ {
+ code: `
+ `,
+ },
+ {
+ code: ``,
+ },
+ {
+ code: `
+
+
+ `,
+ },
+ {
+ code: `
+
+
+ `,
+ },
+ {
+ code: `
+
+
+ `,
+ },
+ ],
+ invalid: [
+ {
+ code: `
+
+
+ `,
+ errors: [ { message: 'When using BaseControl component if a label property is passed an id property should also be passed.' } ],
+ },
+ {
+ code: `
+ `,
+ errors: [ { message: 'When using BaseControl component if a label property is passed an id property should also be passed.' } ],
+ },
+ ],
+} );
diff --git a/packages/eslint-plugin/rules/no-base-control-with-label-without-id.js b/packages/eslint-plugin/rules/no-base-control-with-label-without-id.js
new file mode 100644
index 00000000000000..4fd516a52cc68a
--- /dev/null
+++ b/packages/eslint-plugin/rules/no-base-control-with-label-without-id.js
@@ -0,0 +1,26 @@
+module.exports = {
+ meta: {
+ type: 'problem',
+ schema: [],
+ },
+ create( context ) {
+ return {
+ 'JSXOpeningElement[name.name=\'BaseControl\']': ( node ) => {
+ const containsAttribute = ( attrName ) => {
+ return node.attributes.some( ( attribute ) => {
+ return attribute.name.name === attrName;
+ } );
+ };
+ if (
+ containsAttribute( 'label' ) &&
+ ! containsAttribute( 'id' )
+ ) {
+ context.report( {
+ node,
+ message: 'When using BaseControl component if a label property is passed an id property should also be passed.',
+ } );
+ }
+ },
+ };
+ },
+};
diff --git a/packages/format-library/package.json b/packages/format-library/package.json
index a3e9cacb065cb0..902632f548951e 100644
--- a/packages/format-library/package.json
+++ b/packages/format-library/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
"@wordpress/editor": "file:../editor",
diff --git a/packages/format-library/src/bold/index.js b/packages/format-library/src/bold/index.js
index 3026b749025ebf..70eb752cee8470 100644
--- a/packages/format-library/src/bold/index.js
+++ b/packages/format-library/src/bold/index.js
@@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { toggleFormat } from '@wordpress/rich-text';
-import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor';
+import { RichTextToolbarButton, RichTextShortcut, __unstableRichTextInputEvent } from '@wordpress/block-editor';
const name = 'core/bold';
@@ -32,7 +32,7 @@ export const bold = {
shortcutType="primary"
shortcutCharacter="b"
/>
-
diff --git a/packages/format-library/src/italic/index.js b/packages/format-library/src/italic/index.js
index 36974eb1c0fc00..194a0691c22774 100644
--- a/packages/format-library/src/italic/index.js
+++ b/packages/format-library/src/italic/index.js
@@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { toggleFormat } from '@wordpress/rich-text';
-import { RichTextToolbarButton, RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor';
+import { RichTextToolbarButton, RichTextShortcut, __unstableRichTextInputEvent } from '@wordpress/block-editor';
const name = 'core/italic';
@@ -32,7 +32,7 @@ export const italic = {
shortcutType="primary"
shortcutCharacter="i"
/>
-
diff --git a/packages/format-library/src/underline/index.js b/packages/format-library/src/underline/index.js
index c049a0e8a3fba2..9be88724548c32 100644
--- a/packages/format-library/src/underline/index.js
+++ b/packages/format-library/src/underline/index.js
@@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { toggleFormat } from '@wordpress/rich-text';
-import { RichTextShortcut, UnstableRichTextInputEvent } from '@wordpress/block-editor';
+import { RichTextShortcut, __unstableRichTextInputEvent } from '@wordpress/block-editor';
const name = 'core/underline';
@@ -34,7 +34,7 @@ export const underline = {
character="u"
onUse={ onToggle }
/>
-
diff --git a/packages/hooks/package.json b/packages/hooks/package.json
index c4a208566434d2..c963823e18b342 100644
--- a/packages/hooks/package.json
+++ b/packages/hooks/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/html-entities/package.json b/packages/html-entities/package.json
index 880ac62aecba4e..f5f4225d8ed7f8 100644
--- a/packages/html-entities/package.json
+++ b/packages/html-entities/package.json
@@ -22,7 +22,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/i18n/package.json b/packages/i18n/package.json
index 7c849727e75713..0b735aab1cdc33 100644
--- a/packages/i18n/package.json
+++ b/packages/i18n/package.json
@@ -24,7 +24,7 @@
"pot-to-php": "./tools/pot-to-php.js"
},
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.11",
"memize": "^1.0.5",
diff --git a/packages/is-shallow-equal/package.json b/packages/is-shallow-equal/package.json
index 55239ed32ba706..e58d9c72f9ca83 100644
--- a/packages/is-shallow-equal/package.json
+++ b/packages/is-shallow-equal/package.json
@@ -25,7 +25,7 @@
],
"main": "index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json
index 15359f722bab4a..d939ed060ea040 100644
--- a/packages/jest-console/package.json
+++ b/packages/jest-console/package.json
@@ -29,7 +29,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"jest-matcher-utils": "^24.7.0",
"lodash": "^4.17.11"
},
diff --git a/packages/keycodes/package.json b/packages/keycodes/package.json
index 9a1d7d568e4113..5d20592b2a4acb 100644
--- a/packages/keycodes/package.json
+++ b/packages/keycodes/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/i18n": "file:../i18n",
"lodash": "^4.17.11"
},
diff --git a/packages/library-export-default-webpack-plugin/package.json b/packages/library-export-default-webpack-plugin/package.json
index 04f921c654af84..91353134cbedce 100644
--- a/packages/library-export-default-webpack-plugin/package.json
+++ b/packages/library-export-default-webpack-plugin/package.json
@@ -27,7 +27,7 @@
],
"main": "build/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11",
"webpack-sources": "^1.1.0"
},
diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json
index e36d63d6c790ae..7e9fac07aefc22 100644
--- a/packages/list-reusable-blocks/package.json
+++ b/packages/list-reusable-blocks/package.json
@@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/components": "file:../components",
"@wordpress/compose": "file:../compose",
diff --git a/packages/notices/package.json b/packages/notices/package.json
index 9a3749dd312190..6bee5fac8c021d 100644
--- a/packages/notices/package.json
+++ b/packages/notices/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/a11y": "file:../a11y",
"@wordpress/data": "file:../data",
"lodash": "^4.17.11"
diff --git a/packages/nux/package.json b/packages/nux/package.json
index 8990bc3801ca18..c3b79b7d53fe08 100644
--- a/packages/nux/package.json
+++ b/packages/nux/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/components": "file:../components",
"@wordpress/compose": "file:../compose",
"@wordpress/data": "file:../data",
diff --git a/packages/plugins/package.json b/packages/plugins/package.json
index d5f739453078a3..17bd04bcf6bfbf 100644
--- a/packages/plugins/package.json
+++ b/packages/plugins/package.json
@@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:../compose",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json
index 957d54ebc5baa4..e047551f10a352 100644
--- a/packages/priority-queue/package.json
+++ b/packages/priority-queue/package.json
@@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1"
+ "@babel/runtime": "^7.4.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/redux-routine/package.json b/packages/redux-routine/package.json
index ac9578a951f3a6..89abe7b9765cad 100644
--- a/packages/redux-routine/package.json
+++ b/packages/redux-routine/package.json
@@ -23,7 +23,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"is-promise": "^2.1.0",
"rungen": "^0.3.2"
},
diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json
index 88b09fdc429ec3..b5920283fb5939 100644
--- a/packages/rich-text/package.json
+++ b/packages/rich-text/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:../compose",
"@wordpress/data": "file:../data",
"@wordpress/escape-html": "file:../escape-html",
diff --git a/packages/rich-text/src/apply-format.js b/packages/rich-text/src/apply-format.js
index 14402735b1e60c..c2b96af10d6002 100644
--- a/packages/rich-text/src/apply-format.js
+++ b/packages/rich-text/src/apply-format.js
@@ -10,6 +10,12 @@ import { find } from 'lodash';
import { normaliseFormats } from './normalise-formats';
+function replace( array, index, value ) {
+ array = array.slice();
+ array[ index ] = value;
+ return array;
+}
+
/**
* Apply a format object to a Rich Text value from the given `startIndex` to the
* given `endIndex`. Indices are retrieved from the selection if none are
@@ -38,15 +44,19 @@ export function applyFormat(
// If the caret is at a format of the same type, expand start and end to
// the edges of the format. This is useful to apply new attributes.
if ( startFormat ) {
- while ( find( newFormats[ startIndex ], startFormat ) ) {
- applyFormats( newFormats, startIndex, format );
+ const index = newFormats[ startIndex ].indexOf( startFormat );
+
+ while ( newFormats[ startIndex ] && newFormats[ startIndex ][ index ] === startFormat ) {
+ newFormats[ startIndex ] =
+ replace( newFormats[ startIndex ], index, format );
startIndex--;
}
endIndex++;
- while ( find( newFormats[ endIndex ], startFormat ) ) {
- applyFormats( newFormats, endIndex, format );
+ while ( newFormats[ endIndex ] && newFormats[ endIndex ][ index ] === startFormat ) {
+ newFormats[ endIndex ] =
+ replace( newFormats[ endIndex ], index, format );
endIndex++;
}
// Otherwise, insert a placeholder with the format so new input appears
@@ -58,20 +68,29 @@ export function applyFormat(
};
}
} else {
+ // Determine the highest position the new format can be inserted at.
+ let position = +Infinity;
+
+ for ( let index = startIndex; index < endIndex; index++ ) {
+ if ( newFormats[ index ] ) {
+ newFormats[ index ] = newFormats[ index ]
+ .filter( ( { type } ) => type !== format.type );
+
+ const length = newFormats[ index ].length;
+
+ if ( length < position ) {
+ position = length;
+ }
+ } else {
+ newFormats[ index ] = [];
+ position = 0;
+ }
+ }
+
for ( let index = startIndex; index < endIndex; index++ ) {
- applyFormats( newFormats, index, format );
+ newFormats[ index ].splice( position, 0, format );
}
}
return normaliseFormats( { ...value, formats: newFormats } );
}
-
-function applyFormats( formats, index, format ) {
- if ( formats[ index ] ) {
- const newFormatsAtIndex = formats[ index ].filter( ( { type } ) => type !== format.type );
- newFormatsAtIndex.push( format );
- formats[ index ] = newFormatsAtIndex;
- } else {
- formats[ index ] = [ format ];
- }
-}
diff --git a/packages/rich-text/src/store/selectors.js b/packages/rich-text/src/store/selectors.js
index 518bb7d90800a5..c5f970c6a956eb 100644
--- a/packages/rich-text/src/store/selectors.js
+++ b/packages/rich-text/src/store/selectors.js
@@ -40,8 +40,8 @@ export function getFormatType( state, name ) {
* @return {?Object} Format type.
*/
export function getFormatTypeForBareElement( state, bareElementTagName ) {
- return find( getFormatTypes( state ), ( { tagName } ) => {
- return bareElementTagName === tagName;
+ return find( getFormatTypes( state ), ( { className, tagName } ) => {
+ return className === null && bareElementTagName === tagName;
} );
}
diff --git a/packages/rich-text/src/store/test/selectors.js b/packages/rich-text/src/store/test/selectors.js
index ca49185a6e6b1a..745f077c5f3f7c 100644
--- a/packages/rich-text/src/store/test/selectors.js
+++ b/packages/rich-text/src/store/test/selectors.js
@@ -6,33 +6,71 @@ import deepFreeze from 'deep-freeze';
/**
* Internal dependencies
*/
-import { getFormatTypes, getFormatType } from '../selectors';
+import {
+ getFormatTypes,
+ getFormatType,
+ getFormatTypeForBareElement,
+ getFormatTypeForClassName,
+} from '../selectors';
describe( 'selectors', () => {
+ const formatType = {
+ name: 'core/test-format',
+ className: null,
+ tagName: 'format',
+ };
+ const formatTypeClassName = {
+ name: 'core/test-format-class-name',
+ className: 'class-name',
+ tagName: 'strong',
+ };
+ const formatTypeBareTag = {
+ name: 'core/test-format-bare-tag',
+ className: null,
+ tagName: 'strong',
+ };
const defaultState = deepFreeze( {
formatTypes: {
- 'core/test-format': { name: 'core/test-format' },
- 'core/test-format-2': { name: 'core/test-format-2' },
+ 'core/test-format': formatType,
+ 'core/test-format-class-name': formatTypeClassName,
+ // Order matters: we need to ensure that
+ // `core/test-format-class-name` is not considered bare.
+ 'core/test-format-bare-tag': formatTypeBareTag,
},
} );
describe( 'getFormatTypes', () => {
it( 'should get format types', () => {
const expected = [
- { name: 'core/test-format' },
- { name: 'core/test-format-2' },
+ formatType,
+ formatTypeClassName,
+ formatTypeBareTag,
];
-
expect( getFormatTypes( defaultState ) ).toEqual( expected );
} );
} );
describe( 'getFormatType', () => {
it( 'should get a format type', () => {
- const expected = { name: 'core/test-format' };
const result = getFormatType( defaultState, 'core/test-format' );
- expect( result ).toEqual( expected );
+ expect( result ).toEqual( formatType );
+ } );
+ } );
+
+ describe( 'getFormatTypeForBareElement', () => {
+ it( 'should get a format type', () => {
+ const result = getFormatTypeForBareElement( defaultState, 'strong' );
+
+ expect( result ).toEqual( formatTypeBareTag );
+ } );
+ } );
+
+ describe( 'getFormatTypeForClassName', () => {
+ it( 'should get a format type', () => {
+ const result = getFormatTypeForClassName( defaultState, 'class-name' );
+
+ expect( result ).toEqual( formatTypeClassName );
} );
} );
} );
diff --git a/packages/rich-text/src/test/apply-format.js b/packages/rich-text/src/test/apply-format.js
index b75dc7ee5de008..67d2c3ff082971 100644
--- a/packages/rich-text/src/test/apply-format.js
+++ b/packages/rich-text/src/test/apply-format.js
@@ -17,12 +17,124 @@ describe( 'applyFormat', () => {
const a2 = { type: 'a', attributes: { href: '#test' } };
it( 'should apply format', () => {
+ const record = {
+ formats: [ , , , , ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ [ em ], [ em ], [ em ], [ em ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), em, 0, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 4 );
+ } );
+
+ it( 'should apply format on top of existing format', () => {
+ const record = {
+ formats: [ [ strong ], [ strong ], [ strong ], [ strong ] ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ [ strong, em ], [ strong, em ], [ strong, em ], [ strong, em ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), em, 0, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 4 );
+ } );
+
+ it( 'should apply format and remove same format type', () => {
+ const record = {
+ formats: [ [ strong ], [ em, strong ], [ em, strong ], [ strong ] ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ [ strong, em ], [ strong, em ], [ strong, em ], [ strong, em ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), em, 0, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 4 );
+ } );
+
+ it( 'should apply format around existing format', () => {
+ const record = {
+ formats: [ , [ em ], [ em ], , ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ [ strong ], [ strong, em ], [ strong, em ], [ strong ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), strong, 0, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 4 );
+ } );
+
+ it( 'should apply format around existing format with edge right', () => {
+ const record = {
+ formats: [ , [ em ], [ em ], , ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ [ strong ], [ strong, em ], [ strong, em ], , ],
+ };
+ const result = applyFormat( deepFreeze( record ), strong, 0, 3 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 3 );
+ } );
+
+ it( 'should apply format around existing format with edge left', () => {
+ const record = {
+ formats: [ , [ em ], [ em ], , ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ , [ strong, em ], [ strong, em ], [ strong ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), strong, 1, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 3 );
+ } );
+
+ it( 'should apply format around existing format with break', () => {
+ const record = {
+ formats: [ , [ em ], , [ em ] ],
+ text: 'test',
+ };
+ const expected = {
+ ...record,
+ formats: [ , [ strong, em ], [ strong ], [ strong, em ] ],
+ };
+ const result = applyFormat( deepFreeze( record ), strong, 1, 4 );
+
+ expect( result ).toEqual( expected );
+ expect( result ).not.toBe( record );
+ expect( getSparseArrayLength( result.formats ) ).toBe( 3 );
+ } );
+
+ it( 'should apply format crossing existing format', () => {
const record = {
formats: [ , , , , [ em ], [ em ], [ em ], , , , , , , ],
text: 'one two three',
};
const expected = {
- formats: [ , , , [ strong ], [ em, strong ], [ em, strong ], [ em ], , , , , , , ],
+ formats: [ , , , [ strong ], [ strong, em ], [ strong, em ], [ em ], , , , , , , ],
text: 'one two three',
};
const result = applyFormat( deepFreeze( record ), strong, 3, 6 );
@@ -40,7 +152,7 @@ describe( 'applyFormat', () => {
end: 6,
};
const expected = {
- formats: [ , , , [ strong ], [ em, strong ], [ em, strong ], [ em ], , , , , , , ],
+ formats: [ , , , [ strong ], [ strong, em ], [ strong, em ], [ em ], , , , , , , ],
text: 'one two three',
start: 3,
end: 6,
diff --git a/packages/rich-text/src/test/to-dom.js b/packages/rich-text/src/test/to-dom.js
index 8db8a52e1b4435..2036ba24b80f7a 100644
--- a/packages/rich-text/src/test/to-dom.js
+++ b/packages/rich-text/src/test/to-dom.js
@@ -59,6 +59,42 @@ describe( 'applyValue', () => {
movedCount: 0,
description: 'should not modify',
},
+ {
+ current: 'b',
+ future: 'b',
+ movedCount: 0,
+ description: 'should remove attribute',
+ },
+ {
+ current: 'b',
+ future: 'b',
+ movedCount: 0,
+ description: 'should remove attributes',
+ },
+ {
+ current: 'a',
+ future: 'c',
+ movedCount: 0,
+ description: 'should add attribute',
+ },
+ {
+ current: 'a',
+ future: 'c',
+ movedCount: 0,
+ description: 'should add attributes',
+ },
+ {
+ current: 'a',
+ future: 'a',
+ movedCount: 0,
+ description: 'should update attribute',
+ },
+ {
+ current: 'a',
+ future: 'a',
+ movedCount: 0,
+ description: 'should update attributes',
+ },
];
cases.forEach( ( { current, future, description, movedCount } ) => {
diff --git a/packages/rich-text/src/test/toggle-format.js b/packages/rich-text/src/test/toggle-format.js
index 4a890a43bfae58..28762a37b1603c 100644
--- a/packages/rich-text/src/test/toggle-format.js
+++ b/packages/rich-text/src/test/toggle-format.js
@@ -42,7 +42,7 @@ describe( 'toggleFormat', () => {
end: 6,
};
const expected = {
- formats: [ , , , [ strong ], [ em, strong ], [ em, strong ], [ em ], , , , , , , ],
+ formats: [ , , , [ strong ], [ strong, em ], [ strong, em ], [ em ], , , , , , , ],
text: 'one two three',
start: 3,
end: 6,
diff --git a/packages/rich-text/src/to-dom.js b/packages/rich-text/src/to-dom.js
index 33cc08b27e47df..d99cdd055feda0 100644
--- a/packages/rich-text/src/to-dom.js
+++ b/packages/rich-text/src/to-dom.js
@@ -207,7 +207,11 @@ export function applyValue( future, current ) {
const futureAttributes = futureChild.attributes;
if ( currentAttributes ) {
- for ( let ii = 0; ii < currentAttributes.length; ii++ ) {
+ let ii = currentAttributes.length;
+
+ // Reverse loop because `removeAttribute` on `currentChild`
+ // changes `currentAttributes`.
+ while ( ii-- ) {
const { name } = currentAttributes[ ii ];
if ( ! futureChild.getAttribute( name ) ) {
@@ -270,15 +274,15 @@ export function applySelection( { startPath, endPath }, current ) {
range.setStart( startContainer, startOffset );
range.setEnd( endContainer, endOffset );
+ // Set back focus if focus is lost.
+ if ( ownerDocument.activeElement !== current ) {
+ current.focus();
+ }
+
if ( selection.rangeCount > 0 ) {
// If the to be added range and the live range are the same, there's no
// need to remove the live range and add the equivalent range.
if ( isRangeEqual( range, selection.getRangeAt( 0 ) ) ) {
- // Set back focus if focus is lost.
- if ( ownerDocument.activeElement !== current ) {
- current.focus();
- }
-
return;
}
diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md
index a030be54312745..7469b3455680bc 100644
--- a/packages/scripts/CHANGELOG.md
+++ b/packages/scripts/CHANGELOG.md
@@ -4,6 +4,13 @@
- Leverage `@wordpress/dependency-extraction-webpack-plugin` plugin to extract WordPress
dependencies.
+- The bundled `eslint` dependency has been updated from requiring `^5.12.1` to requiring `^5.16.0`.
+
+### Enhancements
+
+- The default Webpack configuration uses [`thread-loader`](https://github.com/webpack-contrib/thread-loader) to parallelize Babel processing.
+- The default Webpack configuration now opts-in to [the `cacheDirectory` option](https://webpack.js.org/loaders/babel-loader/#options) for its Babel loader.
+- The `source-map-loader` is excluded from production builds. This serves only as an optimization and should otherwise have no impact on build results.
## 3.1.0 (2019-03-20)
diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js
index 44f173d958e0f9..5a3b30163a4325 100644
--- a/packages/scripts/config/webpack.config.js
+++ b/packages/scripts/config/webpack.config.js
@@ -67,7 +67,7 @@ const config = {
// WP_LIVE_RELOAD_PORT global variable changes port on which live reload works
// when running watch mode.
! isProduction && new LiveReloadPlugin( { port: process.env.WP_LIVE_RELOAD_PORT || 35729 } ),
- new DependencyExtractionWebpackPlugin(),
+ new DependencyExtractionWebpackPlugin( { injectPolyfill: true } ),
].filter( Boolean ),
stats: {
children: false,
diff --git a/packages/scripts/package.json b/packages/scripts/package.json
index e61e6958b8ce40..a2fb1460f2db9a 100644
--- a/packages/scripts/package.json
+++ b/packages/scripts/package.json
@@ -41,7 +41,7 @@
"chalk": "^2.4.1",
"check-node-version": "^3.1.1",
"cross-spawn": "^5.1.0",
- "eslint": "^5.12.1",
+ "eslint": "^5.16.0",
"jest": "^24.7.1",
"jest-puppeteer": "^4.0.0",
"npm-package-json-lint": "^3.6.0",
diff --git a/packages/shortcode/package.json b/packages/shortcode/package.json
index d62e26dc69e63d..48bc6842158a4e 100644
--- a/packages/shortcode/package.json
+++ b/packages/shortcode/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11",
"memize": "^1.0.5"
},
diff --git a/packages/token-list/package.json b/packages/token-list/package.json
index 3213d1504290b0..6feee5603461e8 100644
--- a/packages/token-list/package.json
+++ b/packages/token-list/package.json
@@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
},
"publishConfig": {
diff --git a/packages/url/package.json b/packages/url/package.json
index 2dd1979151d339..cc3dc9b5490ad6 100644
--- a/packages/url/package.json
+++ b/packages/url/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"qs": "^6.5.2"
},
"publishConfig": {
diff --git a/packages/viewport/package.json b/packages/viewport/package.json
index bf081801665c6e..94b0e834054ddb 100644
--- a/packages/viewport/package.json
+++ b/packages/viewport/package.json
@@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"@wordpress/compose": "file:../compose",
"@wordpress/data": "file:../data",
"@wordpress/element": "file:../element",
diff --git a/packages/wordcount/package.json b/packages/wordcount/package.json
index 3d5b226793574d..0b609c5bdf2f5d 100644
--- a/packages/wordcount/package.json
+++ b/packages/wordcount/package.json
@@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
- "@babel/runtime": "^7.3.1",
+ "@babel/runtime": "^7.4.4",
"lodash": "^4.17.11"
},
"publishConfig": {
diff --git a/phpunit/class-extend-preload-paths-test.php b/phpunit/class-extend-preload-paths-test.php
new file mode 100644
index 00000000000000..5d683b87204a91
--- /dev/null
+++ b/phpunit/class-extend-preload-paths-test.php
@@ -0,0 +1,26 @@
+assertEquals( array( array( '/wp/v2/blocks', 'OPTIONS' ) ), $preload_paths );
+ }
+
+ /**
+ * Tests '/wp/v2/blocks' not added if present.
+ */
+ function test_replaces_registered_properties() {
+ $preload_paths = gutenberg_extend_block_editor_preload_paths( array( array( '/wp/v2/blocks', 'OPTIONS' ) ) );
+
+ $this->assertEquals( array( array( '/wp/v2/blocks', 'OPTIONS' ) ), $preload_paths );
+ }
+}
diff --git a/test/unit/jest.config.js b/test/unit/jest.config.js
index 6c5db3c8db011d..597dd2735c33f1 100644
--- a/test/unit/jest.config.js
+++ b/test/unit/jest.config.js
@@ -14,17 +14,14 @@ module.exports = {
},
preset: '@wordpress/jest-preset-default',
setupFiles: [
- 'core-js/fn/symbol/async-iterator',
'/test/unit/config/gutenberg-phase.js',
],
testURL: 'http://localhost',
testPathIgnorePatterns: [
+ '/\.git/',
'/node_modules/',
'/packages/e2e-tests',
'/.*/build/',
'/.*/build-module/',
],
- transformIgnorePatterns: [
- 'node_modules/(?!(simple-html-tokenizer)/)',
- ],
};