From e2e8243b065d44a701b2b671d450ad4ce0cf6646 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Fri, 18 Aug 2023 17:16:43 +0530 Subject: [PATCH 1/9] Revert "Remove WP_DEBUG from local-env till WP 6.3 is released" This reverts commit 419f8e596e3bcaf0cc88ad2d397fe3cbb71e1a62. --- bin/local-env/install-wordpress.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/bin/local-env/install-wordpress.sh b/bin/local-env/install-wordpress.sh index 8f40880e14b..cee6684a2b1 100755 --- a/bin/local-env/install-wordpress.sh +++ b/bin/local-env/install-wordpress.sh @@ -119,14 +119,17 @@ wp rewrite structure '%postname%' --hard --quiet # Configure site constants. echo -e $(status_message "Configuring site constants...") - -# @TODO: Remove this once WP 6.3 is released. -wp config delete WP_DEBUG - -# Log WP_DEBUG value. WP_DEBUG_CURRENT=$(wp config get --type=constant --format=json WP_DEBUG | tr -d '\r') -echo -e $(status_message "WP_DEBUG: $WP_DEBUG_CURRENT...") -# Log SCRIPT_DEBUG value. +if [ "$WP_DEBUG" != $WP_DEBUG_CURRENT ]; then + wp config set WP_DEBUG $WP_DEBUG --raw --type=constant --quiet + WP_DEBUG_RESULT=$(wp config get --type=constant --format=json WP_DEBUG | tr -d '\r') + echo -e $(status_message "WP_DEBUG: $WP_DEBUG_RESULT...") +fi + SCRIPT_DEBUG_CURRENT=$(wp config get --type=constant --format=json SCRIPT_DEBUG | tr -d '\r') -echo -e $(status_message "SCRIPT_DEBUG: $SCRIPT_DEBUG_CURRENT...") +if [ "$SCRIPT_DEBUG" != $SCRIPT_DEBUG_CURRENT ]; then + wp config set SCRIPT_DEBUG $SCRIPT_DEBUG --raw --type=constant --quiet + SCRIPT_DEBUG_RESULT=$(wp config get --type=constant --format=json SCRIPT_DEBUG | tr -d '\r') + echo -e $(status_message "SCRIPT_DEBUG: $SCRIPT_DEBUG_RESULT...") +fi From d01dfb1dee385534f6736f4912dc18cbdfe816dc Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Fri, 18 Aug 2023 17:17:23 +0530 Subject: [PATCH 2/9] Revert "Update local-env to use Gutenberg plugin from trunk build till 16.3 is released" This reverts commit bb6cf3369ed7673be7a183e757a19d88d5485cd6. --- bin/local-env/docker-compose.yml | 4 ---- bin/local-env/install-wordpress.sh | 5 +---- bin/local-env/start.sh | 5 ----- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/bin/local-env/docker-compose.yml b/bin/local-env/docker-compose.yml index f7757cc26af..1e9751eb774 100644 --- a/bin/local-env/docker-compose.yml +++ b/bin/local-env/docker-compose.yml @@ -11,8 +11,6 @@ services: - wordpress_data:/var/www/html - ../../:/var/www/html/wp-content/plugins/amp - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini - # @TODO: Remove it once Gutenberg 16.3 is released. - - /tmp/gutenberg/:/var/www/html/wp-content/plugins/gutenberg depends_on: - mysql @@ -22,8 +20,6 @@ services: volumes: - wordpress_data:/var/www/html - ../../:/var/www/html/wp-content/plugins/amp - # @TODO: Remove it once Gutenberg 16.3 is released. - - /tmp/gutenberg/:/var/www/html/wp-content/plugins/gutenberg env_file: - .env.wp depends_on: diff --git a/bin/local-env/install-wordpress.sh b/bin/local-env/install-wordpress.sh index cee6684a2b1..e54df286c84 100755 --- a/bin/local-env/install-wordpress.sh +++ b/bin/local-env/install-wordpress.sh @@ -108,10 +108,7 @@ wp plugin activate amp --quiet # Install & activate Gutenberg plugin. echo -e $(status_message "Installing and activating Gutenberg plugin...") - -# @TODO: Remove it once Gutnberg 16.3 is released. -# wp plugin install gutenberg --activate --force --quiet -wp plugin activate gutenberg --quiet +wp plugin install gutenberg --activate --force --quiet # Set pretty permalinks. echo -e $(status_message "Setting permalink structure...") diff --git a/bin/local-env/start.sh b/bin/local-env/start.sh index 980d0a91e66..ee67677b05d 100755 --- a/bin/local-env/start.sh +++ b/bin/local-env/start.sh @@ -15,11 +15,6 @@ cd "$(dirname "$0")/../.." # Check whether Composer installed . "$(dirname "$0")/install-composer.sh" -# @TODO: Remove it once Gutnberg 16.3 is released. -rm -rf /tmp/gutenberg /tmp/gutenberg.zip -wget https://amp-wp.org/wp-content/uploads/2023/07/gutenberg.zip -O /tmp/gutenberg.zip -unzip /tmp/gutenberg.zip -d /tmp/gutenberg - # Check whether Docker is installed and running . "$(dirname "$0")/launch-containers.sh" From 9d8facc500ea8e17401a835dc3ef5681b698d772 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Fri, 18 Aug 2023 17:41:50 +0530 Subject: [PATCH 3/9] Bump `"@wordpress/e2e-test-utils` from `10.8.0` to `10.11.0` --- package-lock.json | 75 +++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a42f034bd3..08b87caa0dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9627,18 +9627,81 @@ } }, "@wordpress/e2e-test-utils": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.8.0.tgz", - "integrity": "sha512-pd3GLwBw33P5HdEkDOIWcB0W1bRHJQRR887mCwwZ/50wSvpNorvFQ6O4IiQMCv8HNBrygIGSjjl1LqNSe/IPQA==", + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.11.0.tgz", + "integrity": "sha512-W7vidjPJd4Wif7IrYrFqemhm/049Ymgnfcfg2JnFcwJhtmcnpE/iFq9N26Z0MOClt+y5BBQZrX52kkaaoYMKkQ==", "dev": true, "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.34.0", - "@wordpress/keycodes": "^3.37.0", - "@wordpress/url": "^3.38.0", + "@wordpress/api-fetch": "^6.37.0", + "@wordpress/keycodes": "^3.40.0", + "@wordpress/url": "^3.41.0", "change-case": "^4.1.2", "form-data": "^4.0.0", "node-fetch": "^2.6.0" + }, + "dependencies": { + "@wordpress/api-fetch": { + "version": "6.37.0", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.37.0.tgz", + "integrity": "sha512-Cn0ddssCx5kGMEmdqom+kIqdeNl7xDJP4ooUgQhmmR/Hqi0CzazouCO0iNImmwFroFiquig5PrjDS6EWUe2z/w==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@wordpress/i18n": "^4.40.0", + "@wordpress/url": "^3.41.0" + } + }, + "@wordpress/hooks": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.40.0.tgz", + "integrity": "sha512-vbhGayL/KpGSpc0OTdPV4FeR/r9r42qQ9ElBd6RX6PVPUfgJ/on2PukMY5HBVM+3As4XQklRjMoc6EgFRh09rg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0" + } + }, + "@wordpress/i18n": { + "version": "4.40.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.40.0.tgz", + "integrity": "sha512-vm0qqYRl0ULmQoD0nHO0nfRQYoVgJf0Hf56fX3rJ9BKsiQkMtpurhUb0QViqjXShlR6rTryq4Ru3fXJqlpdL4w==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@wordpress/hooks": "^3.40.0", + "gettext-parser": "^1.3.1", + "memize": "^2.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + } + }, + "@wordpress/keycodes": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.40.0.tgz", + "integrity": "sha512-yoU/iN5QGFdyk72M5x1LZHl9iMpkx1hJxGIxUFA9LkO8bqUMuv4qhvRqwbXs6n+b+R6/aGUWH1nOMA57E2OiZg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@wordpress/i18n": "^4.40.0", + "change-case": "^4.1.2" + } + }, + "@wordpress/url": { + "version": "3.41.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.41.0.tgz", + "integrity": "sha512-1DX/Nd8YdVwj/So3DEBT0YRSv2JusspAc9McRY9IttRn9pOC3m0RUNV11JPsYgwilO30WofhFsxOKvGKtEEQIg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "remove-accents": "^0.5.0" + } + }, + "remove-accents": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.5.0.tgz", + "integrity": "sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==", + "dev": true + } } }, "@wordpress/edit-post": { diff --git a/package.json b/package.json index a27555f94b1..0c4057e4939 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@wordpress/browserslist-config": "5.20.0", "@wordpress/data": "9.7.0", "@wordpress/dependency-extraction-webpack-plugin": "4.20.0", - "@wordpress/e2e-test-utils": "10.8.0", + "@wordpress/e2e-test-utils": "10.11.0", "@wordpress/edit-post": "7.14.0", "@wordpress/env": "8.3.0", "@wordpress/eslint-plugin": "14.10.0", From dcff3ca06892972d29190fd233cf6dda2ab0461f Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Fri, 18 Aug 2023 17:55:55 +0530 Subject: [PATCH 4/9] Update `.phpstorm.meta.php` --- .phpstorm.meta.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 253a6382fd9..dfb86685052 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -13,20 +13,23 @@ 'admin.onboarding_menu' => \AmpProject\AmpWP\Admin\OnboardingWizardSubmenu::class, 'admin.onboarding_wizard' => \AmpProject\AmpWP\Admin\OnboardingWizardSubmenuPage::class, 'admin.options_menu' => \AmpProject\AmpWP\Admin\OptionsMenu::class, - 'admin.support_screen' => \AmpProject\AmpWP\Admin\SupportScreen::class, - 'admin.support' => \AmpProject\AmpWP\Admin\SupportLink::class, 'admin.paired_browsing' => \AmpProject\AmpWP\Admin\PairedBrowsing::class, 'admin.plugin_row_meta' => \AmpProject\AmpWP\Admin\PluginRowMeta::class, + 'admin.support_screen' => \AmpProject\AmpWP\Admin\SupportScreen::class, + 'admin.support' => \AmpProject\AmpWP\Admin\SupportLink::class, 'admin.polyfills' => \AmpProject\AmpWP\Admin\Polyfills::class, 'admin.user_rest_endpoint_extension' => \AmpProject\AmpWP\Admin\UserRESTEndpointExtension::class, 'admin.validation_counts' => \AmpProject\AmpWP\Admin\ValidationCounts::class, + 'admin.amp_plugins' => \AmpProject\AmpWP\Admin\AmpPlugins::class, + 'admin.amp_themes' => \AmpProject\AmpWP\Admin\AmpThemes::class, 'amp_slug_customization_watcher' => \AmpProject\AmpWP\AmpSlugCustomizationWatcher::class, 'background_task_deactivator' => \AmpProject\AmpWP\BackgroundTask\BackgroundTaskDeactivator::class, 'block_uniqid_transformer' => \AmpProject\AmpWP\BlockUniqidTransformer::class, - 'cli.command_namespace' => \AmpProject\AmpWP\CliCli\CommandNamespaceRegistration::class, - 'cli.optimizer_command' => \AmpProject\AmpWP\CliCli\OptimizerCommand::class, - 'cli.transformer_command' => \AmpProject\AmpWP\CliCli\TransformerCommand::class, - 'cli.validation_command' => \AmpProject\AmpWP\CliCli\ValidationCommand::class, + 'cli.command_namespace' => \AmpProject\AmpWP\Cli\CommandNamespaceRegistration::class, + 'cli.optimizer_command' => \AmpProject\AmpWP\Cli\OptimizerCommand::class, + 'cli.transformer_command' => \AmpProject\AmpWP\Cli\TransformerCommand::class, + 'cli.validation_command' => \AmpProject\AmpWP\Cli\ValidationCommand::class, + 'cli.option_command' => \AmpProject\AmpWP\Cli\OptionCommand::class, 'css_transient_cache.ajax_handler' => \AmpProject\AmpWP\Admin\ReenableCssTransientCachingAjaxAction::class, 'css_transient_cache.monitor' => \AmpProject\AmpWP\BackgroundTask\MonitorCssTransientCaching::class, 'dependency_support' => \AmpProject\AmpWP\DependencySupport::class, @@ -62,7 +65,7 @@ 'url_validation_cron' => \AmpProject\AmpWP\Validation\URLValidationCron::class, 'url_validation_rest_controller' => \AmpProject\AmpWP\Validation\URLValidationRESTController::class, 'validated_url_stylesheet_gc' => \AmpProject\AmpWP\BackgroundTask\ValidatedUrlStylesheetDataGarbageCollection::class, - 'validation_data_gc' => \AmpProject\AmpWP\BackgroundTask\ValidationDataGarbageCollection::class, + 'validated_data_gc' => \AmpProject\AmpWP\BackgroundTask\ValidationDataGarbageCollection::class, 'validation.scannable_url_provider' => \AmpProject\AmpWP\Validation\ScannableURLProvider::class, 'validation.url_validation_provider' => \AmpProject\AmpWP\Validation\URLValidationProvider::class, ] ) From 80b676a3552bbcc90f4e12cdaa16ee9f2e49fb3c Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Thu, 31 Aug 2023 08:18:31 +0530 Subject: [PATCH 5/9] Add patch-package --- package-lock.json | 223 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 224 insertions(+) diff --git a/package-lock.json b/package-lock.json index 08b87caa0dc..14f76a975b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10654,6 +10654,12 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -11011,6 +11017,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -15272,6 +15284,15 @@ "locate-path": "^3.0.0" } }, + "find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "requires": { + "micromatch": "^4.0.2" + } + }, "findup-sync": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", @@ -15487,6 +15508,26 @@ "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", "dev": true }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, "fs-monkey": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.4.tgz", @@ -20019,6 +20060,15 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stable-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", + "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", + "dev": true, + "requires": { + "jsonify": "^0.0.1" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -20043,6 +20093,30 @@ "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true + }, "jsx-ast-utils": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", @@ -20071,6 +20145,15 @@ "is-buffer": "^1.1.5" } }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11" + } + }, "kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -22081,6 +22164,146 @@ "tslib": "^2.0.3" } }, + "patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "dev": true, + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "yaml": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "dev": true + } + } + }, "path-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", diff --git a/package.json b/package.json index 0c4057e4939..589d78fac0e 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "npm-run-all": "4.1.5", + "patch-package": "8.0.0", "postcss": "8.4.25", "postcss-import": "15.1.0", "postcss-nested": "6.0.1", From 46f4e01294d7040870b6084e0f0ff2787b50e3b0 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Thu, 31 Aug 2023 08:19:05 +0530 Subject: [PATCH 6/9] Add wp e2e test utils patch for activateTheme function --- patches/@wordpress+e2e-test-utils+10.11.0.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/@wordpress+e2e-test-utils+10.11.0.patch diff --git a/patches/@wordpress+e2e-test-utils+10.11.0.patch b/patches/@wordpress+e2e-test-utils+10.11.0.patch new file mode 100644 index 00000000000..1ad40e079c8 --- /dev/null +++ b/patches/@wordpress+e2e-test-utils+10.11.0.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/@wordpress/e2e-test-utils/build/activate-theme.js b/node_modules/@wordpress/e2e-test-utils/build/activate-theme.js +index e171fe9..c1b2632 100644 +--- a/node_modules/@wordpress/e2e-test-utils/build/activate-theme.js ++++ b/node_modules/@wordpress/e2e-test-utils/build/activate-theme.js +@@ -25,6 +25,10 @@ async function activateTheme(slug) { + return; + } + await page.click(`div[data-slug="${slug}"] .button.activate`); ++ ++ // Switch to themes.php page as some themes can redirect to a different page after activation. ++ await (0, _visitAdminPage.visitAdminPage)('themes.php'); ++ + await page.waitForSelector(`div[data-slug="${slug}"].active`); + await (0, _switchUserToTest.switchUserToTest)(); + } From 66b505e7c9827d4b1fad633f7f9a393f76806bf7 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Thu, 31 Aug 2023 08:22:18 +0530 Subject: [PATCH 7/9] Add script to run patch-package --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 589d78fac0e..17ec97b8016 100644 --- a/package.json +++ b/package.json @@ -141,6 +141,7 @@ "test:e2e:help": "npm run test:e2e -- --help", "test:e2e:watch": "npm run test:e2e -- --watch", "test:e2e:interactive": "npm run test:e2e -- --puppeteer-interactive", + "pretest:e2e:ci": "npx patch-package", "test:e2e:ci": "cross-env WP_BASE_URL=http://localhost:8890 wp-scripts test-e2e --config=tests/e2e/jest-ci.config.js --runInBand", "test:js": "wp-scripts test-unit-js --config=tests/js/jest.config.js", "test:js:help": "wp-scripts test-unit-js --help", @@ -162,4 +163,4 @@ } }, "title": "AMP for WordPress" -} +} \ No newline at end of file From 6b3bf95a1bdfa847d4909ffff23aa49367bc4bcc Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Thu, 31 Aug 2023 21:18:41 +0530 Subject: [PATCH 8/9] Update PHPUnit polyfills updation when using PHP 8.0 and PHPUnit 9.3 --- .github/workflows/build-test-measure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-measure.yml b/.github/workflows/build-test-measure.yml index 39c090081c9..641ffaf82a0 100644 --- a/.github/workflows/build-test-measure.yml +++ b/.github/workflows/build-test-measure.yml @@ -550,6 +550,7 @@ jobs: composer require --ignore-platform-reqs --no-interaction --no-scripts phpunit/php-token-stream:^3.1.3 --with-dependencies elif [[ $PHP_VERSION == "7.3" || $PHP_VERSION == "7.4" || $PHP_VERSION == "8.0" ]]; then echo "Installing PHPUnit 9.3" + composer update --ignore-platform-reqs --no-interaction --no-scripts yoast/phpunit-polyfills --with-dependencies composer require --dev --ignore-platform-reqs phpunit/phpunit:"9.3.*" --with-dependencies elif [[ $WP_VERSION == "latest" || $WP_VERSION == "trunk" || $PHP_VERSION == "8.1" || $PHP_VERSION == "8.2" ]]; then echo "Installing latest version of PHPUnit" From 9a6f0a0b0280c762407055a3f52c2942576ea09c Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Thu, 31 Aug 2023 21:55:38 +0530 Subject: [PATCH 9/9] Increase timeout for loginUser e2e tests --- tests/e2e/specs/admin/anchor-linking.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/admin/anchor-linking.js b/tests/e2e/specs/admin/anchor-linking.js index e2f3744e010..d324dc24428 100644 --- a/tests/e2e/specs/admin/anchor-linking.js +++ b/tests/e2e/specs/admin/anchor-linking.js @@ -16,7 +16,7 @@ import { saveSettings } from '../../utils/amp-settings-utils'; describe('AMP settings page anchor linking', () => { beforeEach(async () => { await loginUser(); - }); + }, 400000); it('jumps to supported templates section', async () => { await visitAdminPageWithHash( @@ -50,7 +50,7 @@ describe('AMP developer tools settings', () => { 'page=amp-options', 'other-settings' ); - }); + }, 400000); afterEach(async () => { await cleanUpSettings();