Skip to content

Commit

Permalink
Merge branch 'master' into rnmobile/audio-block-I-b
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-alexander committed Jan 7, 2021
2 parents af6cb99 + ad080ec commit d9a6041
Show file tree
Hide file tree
Showing 954 changed files with 21,201 additions and 24,065 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ node_modules
packages/block-serialization-spec-parser/parser.js
packages/e2e-tests/plugins
packages/react-native-editor/bundle
playground/dist
vendor
wordpress
!.*.js
16 changes: 4 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module.exports = {
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:eslint-comments/recommended',
],
plugins: [ 'import' ],
globals: {
wp: 'off',
},
Expand All @@ -54,6 +53,7 @@ module.exports = {
allowedTextDomain: 'default',
},
],
'@wordpress/no-unsafe-wp-apis': 'off',
'no-restricted-syntax': [
'error',
// NOTE: We can't include the forward slash in our regex or
Expand Down Expand Up @@ -121,21 +121,13 @@ module.exports = {
'Avoid truthy checks on length property rendering, as zero length is rendered verbatim.',
},
],
// Temporarily converted to warning until all errors are resolved.
// See https://github.com/WordPress/gutenberg/pull/22771 for the eslint-plugin-jsdoc update.
'jsdoc/check-param-names': 'warn',
'jsdoc/require-param': 'warn',
},
overrides: [
{
files: [ 'packages/**/*.js' ],
excludedFiles: [
'**/*.@(android|ios|native).js',
...developmentFiles,
],
files: [ '**/*.@(android|ios|native).js', ...developmentFiles ],
rules: {
'import/no-extraneous-dependencies': 'error',
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
},
},
{
Expand Down
12 changes: 12 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Gutenberg Project Support

Welcome to Gutenberg, a WordPress project. We hope you join us in creating the future platform for publishing; all are welcome here.

* Please see the [Contributing Guidelines](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for additional information on how to contribute.

* As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](https://github.com/WordPress/gutenberg/blob/master/CODE_OF_CONDUCT.md).

* Join us on Slack for real-time communication, it is where maintainers coordinate around the project. To get started using Slack, see: https://make.wordpress.org/chat/

* For general WordPress support with the core editor, see the [WordPress.org support forums](https://wordpress.org/support/) — it is highly active and well maintained.
4 changes: 2 additions & 2 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- name: Build Gutenberg plugin ZIP file
run: ./bin/build-plugin-zip.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playground/dist
publish_dir: ./storybook/build
50 changes: 2 additions & 48 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,54 +47,8 @@ jobs:
- name: Running the tests
run: npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"

unit-js-date:
name: JavaScript / Date functions

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
timezone: ['EST', 'GMT', 'CET']
locale: ['en_US', 'ja_JP']

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 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Npm install and build
# It's not necessary to run the full build, since Jest can interpret
# source files with `babel-jest`. Some packages have their own custom
# build tasks, however. These must be run.
run: |
npm ci
npx lerna run build
- name: Running the tests
env:
TZ: ${{ matrix.timezone }}
LANG: ${{ matrix.locale }}

run: |
npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" \
--testPathPattern="packages/date/"
- name: Running the date tests
run: npm run test-unit:date -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"

unit-php:
name: PHP
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on:
release:
types: [released]

name: Upload Gutenberg plugin to WordPress.org plugin repo

jobs:
upload:
name: Upload Gutenberg Plugin
runs-on: ubuntu-latest
environment: wp.org plugin
if: github.event.release.assets[0]
env:
PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
STABLE_TAG_REGEX: 'Stable tag: [0-9]\+\.[0-9]\+\.[0-9]\+\s*'
SVN_USERNAME: ${{ secrets.svn_username }}
SVN_PASSWORD: ${{ secrets.svn_password }}
VERSION: ${{ github.event.release.name }}
steps:
- name: Check out Gutenberg trunk from WP.org plugin repo
run: svn checkout "$PLUGIN_REPO_URL/trunk"

- name: Get previous stable tag
id: get_previous_stable_tag
run: echo ::set-output name=stable_tag::$(grep "$STABLE_TAG_REGEX" ./trunk/readme.txt)

- name: Delete everything
working-directory: ./trunk
run: find . -maxdepth 1 -not -name ".svn" -not -name "." -not -name ".." -exec rm -rf {} +

- name: Download and unzip Gutenberg plugin asset into trunk folder
env:
PLUGIN_URL: ${{ github.event.release.assets[0].browser_download_url }}
run: |
curl -L -o gutenberg.zip $PLUGIN_URL
unzip gutenberg.zip -d trunk
rm gutenberg.zip
- name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
STABLE_TAG: ${{ steps.get_previous_stable_tag.outputs.stable_tag }}
run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt

- name: Commit the content changes
working-directory: ./trunk
run: |
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
svn commit -m "Committing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Create the SVN tag
working-directory: ./trunk
run: |
svn copy "$PLUGIN_REPO_URL/trunk" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Update the plugin's stable version
working-directory: ./trunk
run: |
sed -i "s/${STABLE_TAG_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
svn commit -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ gutenberg.zip
*.log
phpcs.xml
yarn.lock
/wordpress
/artifacts

playground/dist
.cache
*.tsbuildinfo

Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "stylelint-config-wordpress",
"extends": "@wordpress/stylelint-config",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
Expand Down
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": [
"."
],
"themes": [ "WordPress/theme-experiments/twentytwentyone-blocks" ],
"themes": [ "WordPress/theme-experiments/tt1-blocks" ],
"env": {
"tests": {
"mappings": {
Expand Down
22 changes: 11 additions & 11 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### WordPress - Web publishing software

Copyright 2011-2020 by the contributors
Copyright 2011-2021 by the contributors

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,14 +34,14 @@ and
Copyright 2003-2010 by the contributors

WordPress is released under the GPL

---

### GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies
Expand Down Expand Up @@ -135,17 +135,17 @@ portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:


**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.


**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.


**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
Expand Down Expand Up @@ -182,20 +182,20 @@ the scope of this License.
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:


**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,


**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,


**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
Expand Down Expand Up @@ -370,7 +370,7 @@ when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
to redistribute it under certain conditions; type `show c'
for details.

The hypothetical commands \`show w' and \`show c' should show the
Expand All @@ -385,7 +385,7 @@ if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
(which makes passes at compilers) written
by James Hacker.

signature of Ty Coon, 1 April 1989
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)

![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://user-images.githubusercontent.com/1204802/73433964-2540d900-4346-11ea-94f3-5df2e9d876bc.png)
![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://user-images.githubusercontent.com/1204802/100067796-fc3e8700-2e36-11eb-993b-6b80b4310b87.png)

Welcome to the development hub for the WordPress Gutenberg project!

Expand Down
7 changes: 5 additions & 2 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ mv gutenberg.tmp.php gutenberg.php

build_files=$(
ls build/*/*.{js,css,asset.php} \
build/block-library/blocks/*.php build/block-library/blocks/*/block.json \
build/edit-widgets/blocks/*.php build/edit-widgets/blocks/*/block.json \
build/block-library/blocks/*.php \
build/block-library/blocks/*/block.json \
build/block-library/blocks/*/*.css \
build/edit-widgets/blocks/*.php \
build/edit-widgets/blocks/*/block.json \
)


Expand Down
9 changes: 8 additions & 1 deletion bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,14 @@ if ( files.length ) {
bar.tick( 0 );

stream = glob.stream(
[ `${ PACKAGES_DIR }/*/src/**/*.js`, `${ PACKAGES_DIR }/*/src/*.scss` ],
[
`${ PACKAGES_DIR }/*/src/**/*.js`,
`${ PACKAGES_DIR }/*/src/*.scss`,
`${ PACKAGES_DIR }/block-library/src/**/*.js`,
`${ PACKAGES_DIR }/block-library/src/*/style.scss`,
`${ PACKAGES_DIR }/block-library/src/*/editor.scss`,
`${ PACKAGES_DIR }/block-library/src/*.scss`,
],
{
ignore: [
`**/benchmark/**`,
Expand Down
Loading

0 comments on commit d9a6041

Please sign in to comment.