Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/18.5" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gutenbergplugin committed May 31, 2024
1 parent 42f38f2 commit a2eeacb
Show file tree
Hide file tree
Showing 1,097 changed files with 17,969 additions and 10,935 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ module.exports = {
],
globals: {
wp: 'off',
globalThis: 'readonly',
},
settings: {
jsdoc: {
Expand All @@ -103,8 +104,12 @@ module.exports = {
rules: {
'jest/expect-expect': 'off',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': [
'error',
{ props: 'never', children: 'never' },
],
'@wordpress/dependency-group': 'error',
'@wordpress/is-gutenberg-plugin': 'error',
'@wordpress/wp-global-usage': 'error',
'@wordpress/react-no-unsafe-timeout': 'error',
'@wordpress/i18n-text-domain': [
'error',
Expand Down
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ c56e8a1910ed74f405b74bbb12fe81dea974e5c3

# Autofix eslint curly rule.
0221522f253e094b277a1485b7a2d186cb172632

# ESLint: Enable react/jsx-curly-brace-presence
5d4baa9ab5f57d207cc3a048003216a8574574d9
10 changes: 5 additions & 5 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
token: ${{ secrets.GUTENBERG_TOKEN }}
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ needs.bump-version.outputs.release_branch || github.ref }}
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 2
ref: ${{ needs.bump-version.outputs.release_branch }}
Expand Down Expand Up @@ -311,14 +311,14 @@ jobs:
if: ${{ endsWith( needs.bump-version.outputs.new_version, '-rc.1' ) }}
steps:
- name: Checkout (for CLI)
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: main
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Checkout (for publishing)
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: publish
# Later, we switch this branch in the script that publishes packages.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 1
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/check-backport-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Verify Core Backport Changlog

on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
paths:
- 'lib/**'
- '!lib/load.php'
- '!lib/experiments-page.php'
- '!lib/experimental/**'
- 'phpunit/**'
- '!phpunit/experimental/**'
- '!phpunit/blocks/**'
- 'packages/**/*.php'
- '!packages/block-library/**'
- '!packages/e2e-tests/**'
jobs:
check:
name: Check CHANGELOG diff
runs-on: ubuntu-latest
steps:
- name: 'Get PR commit count'
run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: ${{ env.PR_COMMIT_COUNT }}
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
- name: 'Fetch relevant history from origin'
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Check CHANGELOG status
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core Sync Required') && !contains(github.event.pull_request.labels.*.name, 'Backport from WordPress Core') }}
env:
PR_NUMBER: ${{ github.event.number }}
run: |
changelog_folder="backport-changelog"
# Find any changelog file that contains the Gutenberg PR link
gutenberg_pr_url="https://github\.com/WordPress/gutenberg/pull/${PR_NUMBER}"
changelog_file=$(grep -rl "[-*] ${gutenberg_pr_url}" "${changelog_folder}" | head -n 1)
# Confirm that there is an entry containing the Gutenberg PR link
if [[ -z "${changelog_file}" ]]; then
echo "Please create a core backport PR and add a file with the path <wp-release-number>/<core-pr-number>.md in the $changelog_folder folder with the core backport PR URL and a list item with this PR URL."
echo "If changes are related to an existing, open core PR, you may add this PR URL to the core PR's file."
echo "See $changelog_folder/readme.md for more information."
exit 1
fi
core_pr_number=$(basename "${changelog_file}" .md)
core_pr_url="https://github\.com/WordPress/wordpress-develop/pull/${core_pr_number}"
# Confirm that the entry has the correct core backport PR URL.
if ! grep -q -e "${core_pr_url}" "${changelog_file}"; then
echo "Please update the content of ${changelog_file} to include the core backport PR URL, or update the file name to match the core backport PR number."
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/check-components-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: 'Get PR commit count'
run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
totalParts: [8]

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: 'Validation'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
- uses: gradle/wrapper-validation-action@v3
3 changes: 2 additions & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ concurrency:

jobs:
performance:
timeout-minutes: 60
name: Run performance tests
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
env:
WP_ARTIFACTS_PATH: ${{ github.workspace }}/artifacts

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-changes-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
steps:
- name: Check out code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Get changed PHP files
id: changed-files-php
uses: tj-actions/changed-files@a29e8b565651ce417abb5db7164b4a2ad8b6155c # v44.4.0
uses: tj-actions/changed-files@03334d095e2739fa9ac4034ec16f66d5d01e9eba # v44.5.1
with:
files: |
lib/**
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
steps:
- name: Checkout (for CLI)
if: ${{ github.event.inputs.release_type != 'wp' }}
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: cli
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Checkout (for publishing)
if: ${{ github.event.inputs.release_type != 'wp' }}
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: publish
# Later, we switch this branch in the script that publishes packages.
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Checkout (for publishing WP major version)
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: publish
ref: wp/${{ github.event.inputs.wp_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 # v2.31.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand All @@ -71,7 +71,7 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Run tests
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 # v2.31.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
native-test-name: [gutenberg-editor-rendering]

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # v1.177.1
with:
# `.ruby-version` file location
working-directory: packages/react-native-editor/ios
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

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 @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
name: Build JavaScript assets for PHP unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ matrix.branch }}
token: ${{ secrets.GUTENBERG_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions backport-changelog/6.6/6279.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/6279

* https://github.com/WordPress/gutenberg/pull/60063
5 changes: 5 additions & 0 deletions backport-changelog/6.6/6522.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://github.com/WordPress/wordpress-develop/pull/6522

* https://github.com/WordPress/gutenberg/pull/60106
* https://github.com/WordPress/gutenberg/pull/60228
* https://github.com/WordPress/gutenberg/pull/61638
6 changes: 6 additions & 0 deletions backport-changelog/6.6/6559.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
https://github.com/WordPress/wordpress-develop/pull/6559

* https://github.com/WordPress/gutenberg/pull/60349
* https://github.com/WordPress/gutenberg/pull/60464
* https://github.com/WordPress/gutenberg/pull/60491
* https://github.com/WordPress/gutenberg/pull/61757
Loading

0 comments on commit a2eeacb

Please sign in to comment.