Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/14.5" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gutenbergplugin committed Nov 2, 2022
1 parent a2ff0e6 commit 85c2b4f
Show file tree
Hide file tree
Showing 547 changed files with 11,242 additions and 5,830 deletions.
22 changes: 20 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module.exports = {
importNames: [
'camelCase',
'capitalize',
'castArray',
'chunk',
'clamp',
'cloneDeep',
Expand All @@ -96,6 +97,7 @@ module.exports = {
'differenceWith',
'dropRight',
'each',
'escape',
'escapeRegExp',
'every',
'extend',
Expand All @@ -112,6 +114,7 @@ module.exports = {
'fromPairs',
'has',
'identity',
'includes',
'invoke',
'isArray',
'isBoolean',
Expand Down Expand Up @@ -146,6 +149,7 @@ module.exports = {
'reverse',
'size',
'snakeCase',
'some',
'sortBy',
'startCase',
'startsWith',
Expand All @@ -166,6 +170,8 @@ module.exports = {
'uniqWith',
'upperFirst',
'values',
'without',
'words',
'xor',
'zip',
],
Expand Down Expand Up @@ -322,8 +328,20 @@ module.exports = {
},
{
files: [ '**/test/**/*.js' ],
excludedFiles: [ '**/*.@(android|ios|native).js' ],
extends: [ 'plugin:jest-dom/recommended' ],
excludedFiles: [
'**/*.@(android|ios|native).js',
'packages/react-native-*/**/*.js',
'test/native/**/*.js',
'test/e2e/**/*.[tj]s',
],
extends: [
'plugin:jest-dom/recommended',
'plugin:testing-library/react',
],
rules: {
'testing-library/no-container': 'off',
'testing-library/no-node-access': 'off',
},
},
{
files: [ 'packages/e2e-test*/**/*.js' ],
Expand Down
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
version: 2

updates:
# Check for updates to GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
# Check for updates to GitHub Actions.
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
open-pull-requests-limit: 10
8 changes: 4 additions & 4 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
NO_CHECKS: 'true'

- name: Upload artifact
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: gutenberg-plugin
path: ./gutenberg.zip
Expand All @@ -203,7 +203,7 @@ jobs:
- name: Upload release notes artifact
if: ${{ needs.bump-version.outputs.new_version }}
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: release-notes
path: ./release-notes.txt
Expand Down Expand Up @@ -266,12 +266,12 @@ jobs:
run: echo ::set-output name=version::$(echo $VERSION | cut -d / -f 3 | sed 's/-rc./ RC/' )

- name: Download Plugin Zip Artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: gutenberg-plugin

- name: Download Release Notes Artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: release-notes

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/end2end-test-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ jobs:
- name: Install Playwright dependencies
run: |
npx playwright install chromium --with-deps
npx playwright install chromium firefox webkit --with-deps
- name: Install WordPress and start the server
run: |
npm run wp-env start
- name: Run the tests
run: |
npm run test:e2e:playwright
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e:playwright
- name: Archive debug artifacts (screenshots, traces)
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: failures-artifacts
path: artifacts
path: artifacts/test-results
if-no-files-found: ignore

- name: Archive flaky tests report
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: flaky-tests-report-playwright
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 @@ -49,15 +49,15 @@ jobs:
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests )
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: failures-artifacts
path: artifacts
if-no-files-found: ignore

- name: Archive flaky tests report
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: flaky-tests-report-${{ matrix.part }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Compare performance with trunk
if: github.event_name == 'pull_request'
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA trunk --tests-branch $GITHUB_SHA
run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA

- name: Compare performance with current WordPress Core and previous Gutenberg versions
if: github.event_name == 'release'
Expand All @@ -50,7 +50,7 @@ jobs:
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf --ci "wp/$WP_MAJOR" "$PREVIOUS_RELEASE_BRANCH" "$CURRENT_RELEASE_BRANCH" --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf "wp/$WP_MAJOR" "$PREVIOUS_RELEASE_BRANCH" "$CURRENT_RELEASE_BRANCH" --wp-version "$WP_MAJOR"
- name: Compare performance with base branch
if: github.event_name == 'push'
Expand All @@ -61,9 +61,9 @@ jobs:
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf --ci $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
if: github.event_name == 'push'
id: commit-timestamp
with:
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 @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Use desired version of Java
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # v3.5.1
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # v3.6.0
with:
distribution: 'temurin'
java-version: '11'
Expand All @@ -52,13 +52,13 @@ jobs:
profile: pixel_xl
script: npm run native test:e2e:android:local ${{ matrix.native-test-name }}

- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: android-screen-recordings
path: packages/react-native-editor/android-screen-recordings

- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: appium-logs
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 @@ -77,13 +77,13 @@ jobs:
rm packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle
rm -rf packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/assets
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: ios-screen-recordings
path: packages/react-native-editor/ios-screen-recordings

- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
if: always()
with:
name: appium-logs
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 @@ -29,7 +29,7 @@ jobs:
run: npm run storybook:build

- name: Deploy
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook/build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Commit the Changelog update
run: |
git add changelog.txt
# Remove files that are not meant to be commited
# Remove files that are not meant to be committed
# ie. release_notes.txt created on the previous step.
git clean -fd
# Only attempt to commit changelog if it has been modified.
Expand All @@ -89,7 +89,7 @@ jobs:
fi
- name: Upload Changelog artifact
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: changelog ${{ matrix.label }}
path: ./changelog.txt
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt

- name: Download Changelog Artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: changelog trunk
path: trunk
Expand Down
2 changes: 1 addition & 1 deletion bin/packages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ watch(
PACKAGES_DIR,
{ recursive: true, delay: 500, filter: isWatchableFile },
( event, filename ) => {
// Double check whether we're dealing with a file that needs watching, to accomodate for
// Double check whether we're dealing with a file that needs watching, to accommodate for
// the inability to watch recursively on linux-based operating systems.
if ( ! isSourceFile( filename ) || ! isModulePackage( filename ) ) {
return;
Expand Down
6 changes: 4 additions & 2 deletions bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ async function runTestSuite( testSuite, performanceTestDirectory ) {
* @param {WPPerformanceCommandOptions} options Command options.
*/
async function runPerformanceTests( branches, options ) {
const runningInCI = !! process.env.CI || !! options.ci;

// The default value doesn't work because commander provides an array.
if ( branches.length === 0 ) {
branches = [ 'trunk' ];
Expand All @@ -201,11 +203,11 @@ async function runPerformanceTests( branches, options ) {
log(
formats.title( '\n💃 Performance Tests 🕺\n' ),
'\nWelcome! This tool runs the performance tests on multiple branches and displays a comparison table.\n' +
'In order to run the tests, the tool is going to load a WordPress environment on 8888 and 8889 ports.\n' +
'In order to run the tests, the tool is going to load a WordPress environment on ports 8888 and 8889.\n' +
'Make sure these ports are not used before continuing.\n'
);

if ( ! options.ci ) {
if ( ! runningInCI ) {
await askForConfirmation( 'Ready to go? ' );
}

Expand Down
Loading

0 comments on commit 85c2b4f

Please sign in to comment.