Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/8.9" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Sep 3, 2020
1 parent 3a4125a commit 8e27960
Show file tree
Hide file tree
Showing 971 changed files with 33,214 additions and 15,485 deletions.
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/packages/babel-plugin-makepot @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @gziolo @ntwb @nerrad @ajitbohra
/packages/browserslist-config @gziolo @ntwb @nerrad @ajitbohra
/packages/create-block @gziolo
/packages/create-block @gziolo @mkaz
/packages/custom-templated-path-webpack-plugin @ntwb @nerrad @ajitbohra
/packages/docgen @nosolosw
/packages/e2e-test-utils @gziolo @ntwb @nerrad @ajitbohra
Expand Down Expand Up @@ -101,9 +101,9 @@
/packages/plugins @gziolo @adamsilverstein

# Rich Text
/packages/format-library @ellatrix @daniloercoli @sergioestevao @etoledom
/packages/rich-text @ellatrix @daniloercoli @sergioestevao @etoledom
/packages/block-editor/src/components/rich-text @ellatrix @daniloercoli @sergioestevao @etoledom
/packages/format-library @ellatrix @etoledom @cameronvoell @guarani
/packages/rich-text @ellatrix @etoledom @cameronvoell @guarani
/packages/block-editor/src/components/rich-text @ellatrix @etoledom @cameronvoell @guarani

# Project Management
/.github @youknowriad @mapk @karmatosed
Expand Down
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/Mobile_apps_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report for Mobile Apps
about: Create a report to help us improve the Gutenberg mobile apps version
labels: Mobile App Android/iOS
---

**Describe the bug**
A clear and concise description of what the bug is.

**To reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Tap on '....'
3. Scroll down to '....'
4. See '... exact error ...'

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Editor version (please complete the following information):**
- WordPress version: [e.g: 5.3.2]
- Does the website have the Gutenberg plugin installed, or is it using the block editor that comes by default? [e.g: "gutenberg plugin", "default"]
- If the Gutenberg plugin is installed, which version is it? [e.g., 7.6]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6, Pixel 3]
- OS: [e.g. iOS 8.1, Android 10.0]
- WordPress App Version [e.g. 15.3] or Demo App Version [branch name or git commit hash]

**Additional context**
- To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.
15 changes: 15 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cancel
on: pull_request
jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Get all workflow ids and set to env variable
run: echo ::set-env name=WORKFLOW_IDS_TO_CANCEL::$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')

- uses: styfle/[email protected]
with:
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }}
access_token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: End-to-End Tests

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches: [master]
paths-ignore:
- '**.md'

jobs:
admin-1:
Expand Down Expand Up @@ -39,7 +43,6 @@ jobs:
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
Expand Down Expand Up @@ -81,7 +84,6 @@ jobs:
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
Expand Down Expand Up @@ -123,7 +125,6 @@ jobs:
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
Expand Down Expand Up @@ -165,7 +166,6 @@ jobs:
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Performances Tests

on:
pull_request:
paths-ignore:
- '**.md'

jobs:
performance:
name: Compare performance with master

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Npm install
run: |
npm ci
- name: Run the performance tests
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA master --tests-branch $GITHUB_SHA
8 changes: 5 additions & 3 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: React Native E2E Tests (Android)
on: pull_request

on:
pull_request:
paths-ignore:
- '**.md'

jobs:
test:
Expand All @@ -11,8 +15,6 @@ jobs:
]

steps:
- run: brew install watchman

- name: checkout
uses: actions/checkout@v2

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: React Native E2E Tests (iOS)
on: pull_request
on:
pull_request:
paths-ignore:
- '**.md'

jobs:
test:
Expand All @@ -11,8 +14,6 @@ jobs:
]

steps:
- run: brew install watchman

- uses: actions/checkout@v2

- name: Restore npm cache
Expand All @@ -31,7 +32,7 @@ jobs:
with:
path: packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app
key: ${{ runner.os }}-ios-build-${{ hashFiles('ios-checksums.txt') }}

- name: Restore pods cache
uses: actions/cache@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: Unit Tests

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches: [master]
paths-ignore:
- '**.md'

jobs:
unit-js:
Expand Down Expand Up @@ -76,7 +80,6 @@ jobs:
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
Expand Down
10 changes: 7 additions & 3 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"core": "WordPress/WordPress",
"plugins": [ "." ],
"mappings": {
"wp-content/mu-plugins": "./packages/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins"
"env": {
"tests": {
"mappings": {
"wp-content/mu-plugins": "./packages/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins"
}
}
}
}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Gutenberg

[![Build Status](https://img.shields.io/travis/com/WordPress/gutenberg/master.svg)](https://travis-ci.com/WordPress/gutenberg)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)

Expand All @@ -18,17 +19,17 @@ Get hands on: check out the [block editor live demo](https://wordpress.org/guten

### Using Gutenberg

- **Download:** To use the latest release of the Gutenberg plugin on your WordPress site: install from the plugins page in wp-admin, or [download from the WordPress.org plugins repository](https://wordpress.org/plugins/gutenberg/).
- **Download:** To use the latest release of the Gutenberg plugin on your WordPress site: install from the plugins page in wp-admin, or [download from the WordPress.org plugins repository](https://wordpress.org/plugins/gutenberg/).

- **User Documentation:** See the [WordPress Editor documentation](https://wordpress.org/support/article/wordpress-editor/) for detailed docs on using the editor as an author creating posts and pages.
- **User Documentation:** See the [WordPress Editor documentation](https://wordpress.org/support/article/wordpress-editor/) for detailed docs on using the editor as an author creating posts and pages.

- **User Support:** If you have run into an issue, you should check the [Support Forums first](https://wordpress.org/support/forums/). The forums are a great place to get help. If you have a bug to report, please [submit it to the Gutenberg repository](https://github.com/wordpress/gutenberg/issues). Please search prior to creating a new bug to confirm its not a duplicate.
- **User Support:** If you have run into an issue, you should check the [Support Forums first](https://wordpress.org/support/forums/). The forums are a great place to get help. If you have a bug to report, please [submit it to the Gutenberg repository](https://github.com/wordpress/gutenberg/issues). Please search prior to creating a new bug to confirm its not a duplicate.

### Developing for Gutenberg

Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.

The <a href="/docs/contributors/getting-started.md">Getting Started guide</a> will help you run Gutenberg locally to tinker with. See the [Developer Documentation](https://developer.wordpress.org/block-editor/developers/) for extensive tutorials, documentation, and API references on how to extend the editor.
Review the [Create a Block tutorial](/docs/designers-developers/developers/tutorials/create-block/readme.md) for the fastest way to get started extending the block editor. See the [Developer Documentation](https://developer.wordpress.org/block-editor/developers/) for extensive tutorials, documentation, and API references.

### Contribute to Gutenberg

Expand Down
7 changes: 6 additions & 1 deletion bin/packages/build-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const BUILD_TASK_BY_EXTENSION = {
makeDir( path.dirname( outputFile ) ),
readFile( file, 'utf8' ),
] );

const builtSass = await renderSass( {
file,
includePaths: [ path.join( PACKAGES_DIR, 'base-styles' ) ],
Expand All @@ -109,6 +108,12 @@ const BUILD_TASK_BY_EXTENSION = {
'animations',
'z-index',
]
// Editor styles should be excluded from the default CSS vars output.
.concat(
file.includes( 'editor-styles.scss' )
? []
: [ 'default-custom-properties' ]
)
.map( ( imported ) => `@import "${ imported }";` )
.join( ' ' ) + contents,
} );
Expand Down
2 changes: 1 addition & 1 deletion bin/packages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ getPackages().forEach( ( p ) => {
fs.accessSync( srcDir, fs.F_OK );
watch(
path.resolve( p, 'src' ),
{ recursive: true },
{ recursive: true, delay: 500 },
( event, filename ) => {
if ( ! isSourceFile( filename ) ) {
return;
Expand Down
28 changes: 22 additions & 6 deletions bin/plugin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
*/
const program = require( 'commander' );

const catchException = ( command ) => {
return async ( ...args ) => {
try {
await command( ...args );
} catch ( error ) {
console.error( error );
process.exitCode = 1;
}
};
};

/**
* Internal dependencies
*/
Expand All @@ -22,44 +33,49 @@ program
.description(
'Release an RC version of the plugin (supports only rc.1 for now)'
)
.action( releaseRC );
.action( catchException( releaseRC ) );

program
.command( 'release-plugin-stable' )
.alias( 'stable' )
.description( 'Release a stable version of the plugin' )
.action( releaseStable );
.action( catchException( releaseStable ) );

program
.command( 'prepare-packages-stable' )
.alias( 'npm-stable' )
.description(
'Prepares the packages to be published to npm as stable (latest dist-tag, production version)'
)
.action( prepareLatestDistTag );
.action( catchException( prepareLatestDistTag ) );

program
.command( 'prepare-packages-rc' )
.alias( 'npm-rc' )
.description(
'Prepares the packages to be published to npm as RC (next dist-tag, RC version)'
)
.action( prepareNextDistTag );
.action( catchException( prepareNextDistTag ) );

program
.command( 'release-plugin-changelog' )
.alias( 'changelog' )
.option( '-m, --milestone <milestone>', 'Milestone' )
.option( '-t, --token <token>', 'Github token' )
.description( 'Generates a changelog from merged Pull Requests' )
.action( getReleaseChangelog );
.action( catchException( getReleaseChangelog ) );

program
.command( 'performance-tests [branches...]' )
.alias( 'perf' )
.option( '-c, --ci', 'Run in CI (non interactive)' )
.option(
'--tests-branch <branch>',
"Use this branch's performance test files"
)
.description(
'Runs performance tests on two separate branches and outputs the result'
)
.action( runPerformanceTests );
.action( catchException( runPerformanceTests ) );

program.parse( process.argv );
Loading

0 comments on commit 8e27960

Please sign in to comment.