Skip to content

Commit 24fee43

Browse files
authored
Merge pull request #92 from liip/chore/wp59
chore(): WordPress 5.9
2 parents 7f538ba + f1ebcd7 commit 24fee43

19 files changed

Lines changed: 6251 additions & 4043 deletions

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
module.exports = {
22
root: true,
33
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
4+
parserOptions: {
5+
requireConfigFile: false,
6+
babelOptions: {
7+
presets: [ require.resolve( '@wordpress/babel-preset-default' ) ],
8+
},
9+
},
410
overrides: [
511
{
612
// Use cypress/recommended plugin for cypress tests.

.github/workflows/lint-test-deploy.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Run linter
2525
run: npm run lint
2626

27-
- name: Run PHP linter
28-
run: |
29-
npm run wp-env start
30-
npm run lint:php
27+
#- name: Run PHP linter
28+
# run: |
29+
# npm run wp-env start
30+
# npm run lint:php
3131

3232
tests:
3333
name: Tests
@@ -61,7 +61,40 @@ jobs:
6161
npm run wp-env start
6262
6363
- name: Running JavaScript E2E tests
64-
run: npm run test:e2e -- --config '{"env":{"cypress-wp-test-utils":{"wpVersion":${{ matrix.wp }}}}}'
64+
run: npm run test:e2e
65+
66+
- name: Running PHP unit tests
67+
run: npm run test:unit:php:ci
68+
69+
tests-wp-59:
70+
name: Tests WordPress 5.9
71+
72+
runs-on: ubuntu-latest
73+
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Use Node.js 16
78+
uses: actions/setup-node@v1
79+
with:
80+
node-version: 16
81+
82+
- name: Install dependencies
83+
run: |
84+
npm ci
85+
composer install
86+
87+
- name: "Configure environment with WP 5.9"
88+
run: |
89+
echo -e '{\n\t"core": "https://wordpress.org/wordpress-5.9-beta2.zip"\n}' > ./.wp-env.override.json
90+
91+
- name: Install WordPress
92+
run: |
93+
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
94+
npm run wp-env start
95+
96+
- name: Running JavaScript E2E tests
97+
run: npm run test:e2e
6598

6699
- name: Running PHP unit tests
67100
run: npm run test:unit:php:ci
@@ -72,7 +105,7 @@ jobs:
72105
# only run on master but not tags
73106
if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/') }}
74107

75-
needs: [ lint, tests ]
108+
needs: [ lint, tests, 'tests-wp-59' ]
76109

77110
runs-on: ubuntu-latest
78111

@@ -91,7 +124,7 @@ jobs:
91124
# only run on tags
92125
if: startsWith(github.ref, 'refs/tags/')
93126

94-
needs: [ lint, tests ]
127+
needs: [ lint, tests, 'tests-wp-59' ]
95128

96129
runs-on: ubuntu-latest
97130

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ wp.hooks.addFilter(
787787

788788
### Requirements
789789

790-
* Node.js >= 10.x
790+
* Node.js >= 16.x
791791
* Docker
792792

793793
### Installation

build/index.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '32f510f52adbd2b4b7bf84b518d03c1b');
1+
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'aa58ec5c97ee0f3346b69c834ff57d5e');

build/index.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/settings.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'fc57f3bf209e128146b1973dce4849b7');
1+
<?php return array('dependencies' => array(), 'version' => 'cb9f31fac5fa80527366aec813051fc1');

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"email": "contact@liip.ch"
2525
},
2626
"require-dev": {
27-
"squizlabs/php_codesniffer": "^3.5",
27+
"squizlabs/php_codesniffer": "^3.6",
2828
"wp-coding-standards/wpcs": "^2.3",
2929
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
30-
"wp-phpunit/wp-phpunit": "^5.6"
30+
"wp-phpunit/wp-phpunit": "^5.8",
31+
"yoast/phpunit-polyfills": "^1.0"
3132
},
3233
"scripts": {
3334
"lint": "phpcs --standard=phpcs.xml"

0 commit comments

Comments
 (0)