Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/8.2" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed May 28, 2020
1 parent c7c7643 commit 21519ee
Show file tree
Hide file tree
Showing 710 changed files with 20,254 additions and 7,099 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ module.exports = {
],
rules: {
'import/no-extraneous-dependencies': 'error',
'import/no-unresolved': 'error',
},
},
{
Expand Down
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documentation
/docs @chrisvanpatten @ajitbohra
/docs/designers-developers/developers @youknowriad @chrisvanpatten @mkaz @ajitbohra
/docs/designers-developers/developers @chrisvanpatten @mkaz @ajitbohra
/docs/designers-developers/designers @chrisvanpatten @mkaz @ajitbohra

# Data
Expand Down Expand Up @@ -39,15 +39,15 @@
/packages/edit-navigation

# Full Site Editing
/packages/edit-site
/packages/edit-site @youknowriad

# Tooling
/bin @ntwb @nerrad @ajitbohra
/bin/api-docs @ntwb @nerrad @ajitbohra @nosolosw
/docs/tool @youknowriad @chrisvanpatten @ajitbohra @nosolosw
/packages/babel-plugin-import-jsx-pragma @gziolo @ntwb @nerrad @ajitbohra
/packages/babel-plugin-makepot @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @youknowriad @gziolo @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @gziolo @ntwb @nerrad @ajitbohra
/packages/browserslist-config @gziolo @ntwb @nerrad @ajitbohra
/packages/create-block @gziolo
/packages/custom-templated-path-webpack-plugin @ntwb @nerrad @ajitbohra
Expand All @@ -61,7 +61,7 @@
/packages/library-export-default-webpack-plugin @gziolo @ntwb @nerrad @ajitbohra
/packages/npm-package-json-lint-config @gziolo @ntwb @nerrad @ajitbohra
/packages/postcss-themes @youknowriad @ntwb @nerrad @ajitbohra
/packages/scripts @youknowriad @gziolo @ntwb @nerrad @ajitbohra
/packages/scripts @gziolo @ntwb @nerrad @ajitbohra
/packages/dependency-extraction-webpack-plugin @gziolo
/packages/prettier-config @ntwb @gziolo @aduth

Expand All @@ -71,7 +71,7 @@
/packages/element @youknowriad @ajitbohra @jaymanpandya @jorgefilipecosta
/packages/notices @ajitbohra @jaymanpandya @jorgefilipecosta
/packages/nux @ajitbohra @jaymanpandya @jorgefilipecosta @noisysocks
/packages/viewport @youknowriad @ajitbohra @jaymanpandya @jorgefilipecosta
/packages/viewport @ajitbohra @jaymanpandya @jorgefilipecosta
/packages/base-styles
/packages/icons
/packages/primitives
Expand All @@ -80,7 +80,7 @@
/packages/a11y @youknowriad @aduth
/packages/blob @aduth
/packages/date
/packages/deprecated @aduth
/packages/deprecated @youknowriad @aduth
/packages/dom @ellatrix
/packages/dom-ready @aduth
/packages/escape-html
Expand Down Expand Up @@ -112,7 +112,7 @@
/packages/env @epiqueras @noahtallen @noisysocks

# PHP
/lib @timothybjacobs
/lib @timothybjacobs @spacedmonkey

# Native (Unowned)
*.native.js @ghost
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Storybook GitHub Pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Install Dependencies
run: npm ci

- name: Build Storybook
run: npm run storybook:build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playground/dist
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
12
44 changes: 8 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,44 +53,13 @@ install:
- npm run build
- |
if [[ "$INSTALL_WORDPRESS" = "true" ]]; then
# Download and unpack WordPress.
curl -sL https://github.com/WordPress/WordPress/archive/master.zip -o /tmp/wordpress-latest.zip
unzip -q /tmp/wordpress-latest.zip -d /tmp
mkdir -p wordpress/src
mv /tmp/WordPress-master/* wordpress/src
# Create the upload directory with permissions that Travis can handle.
mkdir -p wordpress/src/wp-content/uploads
chmod 767 wordpress/src/wp-content/uploads
# Grab the tools we need for WordPress' local-env.
curl -sL https://github.com/WordPress/wordpress-develop/archive/master.zip -o /tmp/wordpress-develop.zip
unzip -q /tmp/wordpress-develop.zip -d /tmp
mv \
/tmp/wordpress-develop-master/tools \
/tmp/wordpress-develop-master/tests \
/tmp/wordpress-develop-master/.env \
/tmp/wordpress-develop-master/docker-compose.yml \
/tmp/wordpress-develop-master/wp-cli.yml \
/tmp/wordpress-develop-master/*config-sample.php \
/tmp/wordpress-develop-master/package.json wordpress
# Install WordPress. The additional dependencies are required by the copied `wordpress-develop` tools.
cd wordpress
npm install dotenv wait-on
npm run env:start
sleep 10
npm run env:install
cd ..
# Connect Gutenberg to WordPress.
npm run env connect
npm run env cli plugin activate gutenberg
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php" } }' > .wp-env.override.json
npm run wp-env start
fi
- |
if [[ "$E2E_ROLE" = "author" ]]; then
npm run env cli -- user create author [email protected] --role=author --user_pass=authpass
npm run env cli -- post update 1 --post_author=2
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
fi
jobs:
Expand Down Expand Up @@ -159,12 +128,15 @@ jobs:
- npm run test-unit:native -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"

- name: PHP unit tests
env: WP_ENV_TESTS_PORT=8887 WP_ENV_PORT=8886 # TODO: Remove tests port when scripts/env is replaced with wp-env.
script:
- chmod -R 767 ./build
- npm run test-php && npm run test-unit-php-multisite

- name: PHP unit tests (PHP 5.6)
env: LOCAL_PHP=5.6-fpm
env: LOCAL_PHP=5.6-fpm WP_ENV_TESTS_PORT=8887 WP_ENV_PORT=8886 # TODO: Remove tests port when scripts/env is replaced with wp-env.
script:
- chmod -R 767 ./build
- npm run test-php && npm run test-unit-php-multisite

- name: E2E tests (Admin) (1/4)
Expand Down
6 changes: 5 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"core": "WordPress/WordPress",
"plugins": [ "." ]
"plugins": [ "." ],
"mappings": {
"wp-content/mu-plugins": "./packages/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins"
}
}
2 changes: 1 addition & 1 deletion bin/api-docs/are-api-docs-unstaged.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

/**
* Node dependencies.
* External dependencies
*/
const { extname } = require( 'path' );
const chalk = require( 'chalk' );
Expand Down
4 changes: 2 additions & 2 deletions bin/api-docs/update-api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ glob.stream( [
for ( const [ token, path ] of tokens ) {
try {
await execa(
join(
`"${ join(
__dirname,
'..',
'..',
'node_modules',
'.bin',
'docgen'
),
) }"`,
[
relative( ROOT_DIR, resolve( dirname( file ), path ) ),
`--output ${ output }`,
Expand Down
5 changes: 4 additions & 1 deletion bin/check-latest-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ If you are certain of your changes and desire to commit anyways, you should eith
*/
async function getLocalNPMVersion() {
return new Promise( async ( resolve ) => {
const childProcess = spawn( 'npm', [ '-v' ] );
// 'npm' doesn't work correctly on Windows.
// https://github.com/WordPress/gutenberg/issues/22484
const command = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const childProcess = spawn( command, [ '-v' ] );

let output = '';
for await ( const chunk of childProcess.stdout ) {
Expand Down
Loading

0 comments on commit 21519ee

Please sign in to comment.