Skip to content

Commit 876a4ef

Browse files
Merge changes published in the Gutenberg plugin "release/18.9" branch
1 parent 122867d commit 876a4ef

File tree

595 files changed

+24739
-11874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+24739
-11874
lines changed

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,35 @@ module.exports = {
277277
],
278278
},
279279
},
280+
{
281+
// Temporary rules until we're ready to officially deprecate the bottom margins.
282+
files: [ 'packages/*/src/**/*.[tj]s?(x)' ],
283+
excludedFiles: [
284+
'packages/components/src/**/@(test|stories)/**',
285+
'**/*.@(native|ios|android).js',
286+
],
287+
rules: {
288+
'no-restricted-syntax': [
289+
'error',
290+
...restrictedSyntax,
291+
...restrictedSyntaxComponents,
292+
...[
293+
'CheckboxControl',
294+
'ComboboxControl',
295+
'FocalPointPicker',
296+
'RangeControl',
297+
'SearchControl',
298+
'TextareaControl',
299+
'TreeSelect',
300+
].map( ( componentName ) => ( {
301+
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__nextHasNoMarginBottom"]))`,
302+
message:
303+
componentName +
304+
' should have the `__nextHasNoMarginBottom` prop to opt-in to the new margin-free styles.',
305+
} ) ),
306+
],
307+
},
308+
},
280309
{
281310
files: [
282311
// Components package.

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ changelog.txt linguist-language=Markdown
2020

2121
# Flag docs directory as documentation for GitHub stats.
2222
docs/** linguist-documentation
23+
24+
# TSConfig files use jsonc.
25+
tsconfig*.json linguist-language=jsonc

.github/ISSUE_TEMPLATE/Bug_report.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,19 @@ body:
4949
validations:
5050
required: false
5151

52-
- type: dropdown
52+
- type: checkboxes
5353
id: existing
5454
attributes:
5555
label: Please confirm that you have searched existing issues in the repo.
5656
description: You can do this by searching https://github.com/WordPress/gutenberg/issues and making sure the bug is not related to another plugin.
57-
multiple: true
5857
options:
59-
- 'Yes'
60-
- 'No'
61-
validations:
62-
required: true
58+
- label: 'Yes'
59+
required: true
6360

64-
- type: dropdown
61+
- type: checkboxes
6562
id: plugins
6663
attributes:
6764
label: Please confirm that you have tested with all plugins deactivated except Gutenberg.
68-
multiple: true
6965
options:
70-
- 'Yes'
71-
- 'No'
72-
validations:
73-
required: true
66+
- label: 'Yes'
67+
required: true

.github/workflows/build-plugin-zip.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
172172

173173
- name: Use desired version of Node.js
174-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
174+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
175175
with:
176176
node-version-file: '.nvmrc'
177177
check-latest: true
@@ -270,12 +270,12 @@ jobs:
270270
run: echo "version=$(echo $VERSION | cut -d / -f 3 | sed 's/-rc./ RC/' )" >> $GITHUB_OUTPUT
271271

272272
- name: Download Plugin Zip Artifact
273-
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
273+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
274274
with:
275275
name: gutenberg-plugin
276276

277277
- name: Download Release Notes Artifact
278-
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
278+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
279279
with:
280280
name: release-notes
281281

@@ -333,7 +333,7 @@ jobs:
333333
git config user.email [email protected]
334334
335335
- name: Setup Node.js
336-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
336+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
337337
with:
338338
node-version-file: 'main/.nvmrc'
339339
registry-url: 'https://registry.npmjs.org'

.github/workflows/bundle-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
4444

4545
- name: Use desired version of Node.js
46-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
46+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
4747
with:
4848
node-version-file: '.nvmrc'
4949
check-latest: true

.github/workflows/create-block.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ concurrency:
1414

1515
jobs:
1616
checks:
17-
name: Checks w/Node.js ${{ matrix.node }} on ${{ matrix.os }}
17+
name: Checks w/Node.js ${{ matrix.node.name }} on ${{ matrix.os }}
1818
runs-on: ${{ matrix.os }}
1919
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
node: ['20', '22']
23+
node:
24+
- name: 20
25+
version: 20
26+
- name: 22
27+
version: 22.4
2428
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
2529

2630
steps:
@@ -31,7 +35,7 @@ jobs:
3135
- name: Setup Node.js and install dependencies
3236
uses: ./.github/setup-node
3337
with:
34-
node-version: ${{ matrix.node }}
38+
node-version: ${{ matrix.node.version }}
3539

3640
- name: Create block
3741
shell: bash

.github/workflows/end2end-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
ref: trunk
108108
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
109109

110-
- uses: actions/[email protected].7
110+
- uses: actions/[email protected].8
111111
# Don't fail the job if there isn't any flaky tests report.
112112
continue-on-error: true
113113
with:

.github/workflows/publish-npm-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ jobs:
6767
6868
- name: Setup Node.js
6969
if: ${{ github.event.inputs.release_type != 'wp' }}
70-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
70+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
7171
with:
7272
node-version-file: 'cli/.nvmrc'
7373
registry-url: 'https://registry.npmjs.org'
7474
check-latest: true
7575

7676
- name: Setup Node.js (for WP major version)
7777
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
78-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
78+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
7979
with:
8080
node-version-file: 'publish/.nvmrc'
8181
registry-url: 'https://registry.npmjs.org'

.github/workflows/pull-request-automation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
1919

2020
- name: Use desired version of Node.js
21-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
21+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2222
with:
2323
node-version-file: '.nvmrc'
2424
check-latest: true

.github/workflows/rnmobile-ios-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
2929

30-
- uses: ruby/setup-ruby@3783f195e29b74ae398d7caca108814bbafde90e # v1.180.1
30+
- uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # v1.188.0
3131
with:
3232
# `.ruby-version` file location
3333
working-directory: packages/react-native-editor/ios

.github/workflows/static-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
2828

2929
- name: Use desired version of Node.js
30-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
30+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
3131
with:
3232
node-version-file: '.nvmrc'
3333
check-latest: true

.github/workflows/sync-backport-changelog.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,33 @@ on:
44
push:
55
branches:
66
- trunk
7+
issues:
8+
types: [labeled]
79

810
jobs:
911
sync-backport-changelog:
1012
name: Sync Core Backport Issue
1113
runs-on: ubuntu-latest
14+
if: >
15+
github.event_name == 'push' ||
16+
(
17+
github.event_name == 'issues' &&
18+
github.event.action == 'labeled' &&
19+
github.event.label.name == '🤖 Sync Backport Changelog'
20+
)
1221
steps:
13-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
- name: Checkout
23+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1424
with:
1525
fetch-depth: 2 # Fetch the last two commits to compare changes
1626
- name: Check for changes in backport-changelog
27+
if: github.event_name == 'push'
1728
run: |
18-
git diff --quiet HEAD^ HEAD -- backport-changelog || echo "changes=true" >> $GITHUB_OUTPUT
29+
if git diff --quiet HEAD^ HEAD -- backport-changelog; then
30+
echo "skip_sync=true" >> "$GITHUB_ENV"
31+
fi
1932
- name: Sync Issue
20-
if: env.changes == 'true'
33+
if: ${{ ! env.skip_sync }}
2134
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2235
with:
2336
script: |
@@ -52,18 +65,20 @@ jobs:
5265
const endDelimiter = '<!-- END TRUNK BACKPORT CHANGELOG -->';
5366
const autoGeneratedContent = `${startDelimiter}\n${processedChangelog}\n${endDelimiter}`;
5467
55-
const regex = new RegExp(`${startDelimiter}[\\s\\S]*${endDelimiter}`);
68+
const existingBody = latestIssue.body ?? '';
69+
5670
let newBody;
5771
58-
if (regex.test(latestIssue.body)) {
72+
const regex = new RegExp(`${startDelimiter}[\\s\\S]*${endDelimiter}`);
73+
if (regex.test(existingBody)) {
5974
// If delimiters exist, replace the content between them
60-
newBody = latestIssue.body.replace(regex, autoGeneratedContent);
75+
newBody = existingBody.replace(regex, autoGeneratedContent);
6176
} else {
6277
// If delimiters don't exist, append the new content at the end
63-
newBody = `${latestIssue.body}\n\n${autoGeneratedContent}`;
78+
newBody = `${existingBody}\n\n${autoGeneratedContent}`;
6479
}
6580
66-
if (newBody.trim() !== latestIssue.body.trim()) {
81+
if (newBody.trim() !== existingBody.trim()) {
6782
await github.rest.issues.update({
6883
owner: context.repo.owner,
6984
repo: context.repo.repo,

.github/workflows/unit-test.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ concurrency:
2121

2222
jobs:
2323
unit-js:
24-
name: JavaScript (Node.js ${{ matrix.node }}) ${{ matrix.shard }}
24+
name: JavaScript (Node.js ${{ matrix.node.name }}) ${{ matrix.shard }}
2525
runs-on: ubuntu-latest
2626
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
node: ['20', '22']
30+
node:
31+
- name: 20
32+
version: 20
33+
- name: 22
34+
version: 22.4
3135
shard: ['1/4', '2/4', '3/4', '4/4']
3236

3337
steps:
@@ -39,7 +43,7 @@ jobs:
3943
- name: Setup Node.js and install dependencies
4044
uses: ./.github/setup-node
4145
with:
42-
node-version: ${{ matrix.node }}
46+
node-version: ${{ matrix.node.version }}
4347

4448
- name: Determine the number of CPU cores
4549
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
@@ -60,13 +64,17 @@ jobs:
6064
--cacheDirectory="$HOME/.jest-cache"
6165
6266
unit-js-date:
63-
name: JavaScript Date Tests (Node.js ${{ matrix.node }})
67+
name: JavaScript Date Tests (Node.js ${{ matrix.node.name }})
6468
runs-on: ubuntu-latest
6569
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
6670
strategy:
6771
fail-fast: false
6872
matrix:
69-
node: ['20', '22']
73+
node:
74+
- name: 20
75+
version: 20
76+
- name: 22
77+
version: 22.4
7078

7179
steps:
7280
- name: Checkout repository
@@ -77,7 +85,7 @@ jobs:
7785
- name: Setup Node.js and install dependencies
7886
uses: ./.github/setup-node
7987
with:
80-
node-version: ${{ matrix.node }}
88+
node-version: ${{ matrix.node.version }}
8189

8290
- name: Determine the number of CPU cores
8391
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
@@ -185,7 +193,7 @@ jobs:
185193
# dependency versions are installed and cached.
186194
##
187195
- name: Set up PHP
188-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
196+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
189197
with:
190198
php-version: '${{ matrix.php }}'
191199
ini-file: development
@@ -209,7 +217,7 @@ jobs:
209217
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
210218

211219
- name: Download built JavaScript assets
212-
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
220+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
213221
with:
214222
name: build-assets
215223
path: ./build
@@ -287,7 +295,7 @@ jobs:
287295
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
288296

289297
- name: Set up PHP
290-
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
298+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
291299
with:
292300
php-version: '7.4'
293301
coverage: none

.github/workflows/upload-release-to-plugin-repo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./trunk/readme.txt
190190
191191
- name: Download Changelog Artifact
192-
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
192+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
193193
with:
194194
name: changelog trunk
195195
path: trunk
@@ -247,7 +247,7 @@ jobs:
247247
sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" "$VERSION/readme.txt"
248248
249249
- name: Download Changelog Artifact
250-
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
250+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
251251
with:
252252
name: changelog trunk
253253
path: ${{ github.event.release.name }}

backport-changelog/6.6/7012.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/7012
2+
3+
* https://github.com/WordPress/gutenberg/pull/63403

backport-changelog/6.6/7036.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/7036
2+
3+
* https://github.com/WordPress/gutenberg/pull/63436

backport-changelog/6.6/7061.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/7061
2+
3+
* https://github.com/WordPress/gutenberg/pull/63726

backport-changelog/6.7/6910.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ https://github.com/WordPress/wordpress-develop/pull/6910
33
* https://github.com/WordPress/gutenberg/pull/59483
44
* https://github.com/WordPress/gutenberg/pull/60652
55
* https://github.com/WordPress/gutenberg/pull/62777
6-
* https://github.com/WordPress/gutenberg/pull/63108
6+
* https://github.com/WordPress/gutenberg/pull/63108
7+
* https://github.com/WordPress/gutenberg/pull/63464

backport-changelog/6.7/6991.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/6991
2+
3+
* https://github.com/WordPress/gutenberg/pull/61382

backport-changelog/6.7/7020.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/7020
2+
3+
* https://github.com/WordPress/gutenberg/pull/63470

0 commit comments

Comments
 (0)