From 0eb44fe94c1aa626b8de9c8c7df38ea9e0c5a541 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Fri, 21 Jun 2024 23:51:45 +0530 Subject: [PATCH 1/6] add dependency extraction manager --- package-lock.json | 25 +++++++++++++++++++++---- package.json | 1 + webpack.config.js | 2 ++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6eb58ba..fd7def2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", + "@wordpress/dependency-extraction-webpack-plugin": "^6.1.0", "@wordpress/env": "^8.9.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", @@ -4537,15 +4538,16 @@ } }, "node_modules/@wordpress/dependency-extraction-webpack-plugin": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.8.0.tgz", - "integrity": "sha512-DdFjCrBkV0maEh1REY8QFtg6rfgGz+qXw8qJ0HxfH+Uees16oCModxBmbgCTC2w3IkMyHP3kEpvRJHHmYRRmWg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-6.1.0.tgz", + "integrity": "sha512-Dodnc0yn6Q7jZW2S5hUFa/3Ls6/OVUp6mXsPr6HvaTZsy9IzrNJJdTiIbk5nNRXDFt7Yv+f8CB/QIdwV0tweag==", "dev": true, "dependencies": { "json2php": "^0.0.7" }, "engines": { - "node": ">=18" + "node": ">=18.12.0", + "npm": ">=8.19.2" }, "peerDependencies": { "webpack": "^5.0.0" @@ -4780,6 +4782,21 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/scripts/node_modules/@wordpress/dependency-extraction-webpack-plugin": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.9.0.tgz", + "integrity": "sha512-hXbCkbG1XES47t7hFSETRrLfaRSPyQPlCnhlCx7FfhYFD0wh1jVArApXX5dD+A6wTrayXX/a16MpfaNqE662XA==", + "dev": true, + "dependencies": { + "json2php": "^0.0.7" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, "node_modules/@wordpress/scripts/node_modules/@wordpress/eslint-plugin": { "version": "18.0.0", "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.0.0.tgz", diff --git a/package.json b/package.json index b25d753..4448517 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", + "@wordpress/dependency-extraction-webpack-plugin": "^6.1.0", "@wordpress/env": "^8.9.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", diff --git a/webpack.config.js b/webpack.config.js index c49f0fd..8e4dc28 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ const defaultConfig = require('@wordpress/scripts/config/webpack.config'); +const DependencyExtractionWebpackPlugin = require('@wordpress/dependency-extraction-webpack-plugin'); module.exports = { ...defaultConfig, @@ -9,4 +10,5 @@ module.exports = { module: { ...defaultConfig.module, }, + plugins: [new DependencyExtractionWebpackPlugin()], }; From 882794df628c2fb87116ebadd9aaa093229961f9 Mon Sep 17 00:00:00 2001 From: Ankit K Date: Fri, 5 Jul 2024 15:55:49 +0530 Subject: [PATCH 2/6] Updated WP version bump --- .github/workflows/cypress.yml | 2 +- convert-to-blocks.php | 2 +- readme.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 8cf0d8b..b7d1c9b 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -16,7 +16,7 @@ jobs: matrix: core: - {name: 'WP latest', version: 'latest', continue: false} - - {name: 'WP minimum', version: 'WordPress/WordPress#6.3', continue: false} + - {name: 'WP minimum', version: 'WordPress/WordPress#6.4', continue: false} - {name: 'WP trunk', version: 'WordPress/WordPress#master', continue: true} steps: - name: Checkout diff --git a/convert-to-blocks.php b/convert-to-blocks.php index 951d365..6343da3 100644 --- a/convert-to-blocks.php +++ b/convert-to-blocks.php @@ -4,7 +4,7 @@ * Plugin URI: https://github.com/10up/convert-to-blocks * Description: Convert classic editor posts to blocks on the fly. * Version: 1.3.0 - * Requires at least: 6.3 + * Requires at least: 6.4 * Requires PHP: 8.0 * Author: 10up * Author URI: https://10up.com diff --git a/readme.txt b/readme.txt index f57157a..33e2b4d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Convert to Blocks === Contributors: 10up, dsawardekar, tlovett1, jeffpaul Tags: block, block migration, gutenberg migration, gutenberg conversion, convert to blocks -Tested up to: 6.5 +Tested up to: 6.6 Stable tag: 1.3.0 License: GPL-2.0-or-later License URI: https://spdx.org/licenses/GPL-2.0-or-later.html From 5b14631704df56d13260919088f98932068c3c2a Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 9 Jul 2024 19:31:15 +0530 Subject: [PATCH 3/6] update wp-env --- package-lock.json | 60 +++++++++++++++++++++++++++++++++++++---------- package.json | 2 +- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2eb7f13..a860c3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", - "@wordpress/env": "^8.9.0", + "@wordpress/env": "^10.2.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", "cypress-mochawesome-reporter": "^3.6.0", @@ -4575,14 +4575,14 @@ } }, "node_modules/@wordpress/env": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-8.13.0.tgz", - "integrity": "sha512-rtrrBO22DnbLsdBlsGqlMQrjz1dZfbwGnxyKev+gFd1rSfmLs+1F8L89RHOx9vsGPixl5uRwoU/qgYo7Hf1NVQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.2.0.tgz", + "integrity": "sha512-EToZYPGXpl42Asw3bxpX8aKmHfRUdGxKPjQ9CHZVQoTAL27Af4FyjyGnepsnDpnYdIeI8VPb2S3k2NL/1+fpIA==", "dev": true, "dependencies": { "chalk": "^4.0.0", "copy-dir": "^1.3.0", - "docker-compose": "^0.22.2", + "docker-compose": "^0.24.3", "extract-zip": "^1.6.7", "got": "^11.8.5", "inquirer": "^7.1.0", @@ -4595,6 +4595,10 @@ }, "bin": { "wp-env": "bin/wp-env" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, "node_modules/@wordpress/hooks": { @@ -8294,14 +8298,29 @@ } }, "node_modules/docker-compose": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.22.2.tgz", - "integrity": "sha512-iXWb5+LiYmylIMFXvGTYsjI1F+Xyx78Jm/uj1dxwwZLbWkUdH6yOXY5Nr3RjbYX15EgbGJCq78d29CmWQQQMPg==", + "version": "0.24.8", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.24.8.tgz", + "integrity": "sha512-plizRs/Vf15H+GCVxq2EUvyPK7ei9b/cVesHvjnX4xaXjM9spHe2Ytq0BitndFgvTJ3E3NljPNUEl7BAN43iZw==", "dev": true, + "dependencies": { + "yaml": "^2.2.2" + }, "engines": { "node": ">= 6.0.0" } }, + "node_modules/docker-compose/node_modules/yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -19316,20 +19335,37 @@ "dev": true }, "node_modules/simple-git": { - "version": "3.24.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.24.0.tgz", - "integrity": "sha512-QqAKee9Twv+3k8IFOFfPB2hnk6as6Y6ACUpwCtQvRYBAes23Wv3SZlHVobAzqcE8gfsisCvPw3HGW3HYM+VYYw==", + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.25.0.tgz", + "integrity": "sha512-KIY5sBnzc4yEcJXW7Tdv4viEz8KyG+nU0hay+DWZasvdFOYKeUZ6Xc25LUHHjw0tinPT7O1eY6pzX7pRT1K8rw==", "dev": true, "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.3.4" + "debug": "^4.3.5" }, "funding": { "type": "github", "url": "https://github.com/steveukx/git-js?sponsor=1" } }, + "node_modules/simple-git/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/sirv": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", diff --git a/package.json b/package.json index b25d753..4e71f4a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", - "@wordpress/env": "^8.9.0", + "@wordpress/env": "^10.2.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", "cypress-mochawesome-reporter": "^3.6.0", From 646fd7b37fa72ba26440ca466ed22461dc01bad3 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 9 Jul 2024 19:37:24 +0530 Subject: [PATCH 4/6] exclude build from phpcs lint --- phpcs.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/phpcs.xml b/phpcs.xml index 3756360..b06e197 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -8,4 +8,5 @@ + /build/ From 14899ba73c3850458ce00353f669949747f9aacb Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 9 Jul 2024 19:46:06 +0530 Subject: [PATCH 5/6] fix phpcs errors --- includes/ConvertToBlocks/MigrationAgent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ConvertToBlocks/MigrationAgent.php b/includes/ConvertToBlocks/MigrationAgent.php index a859a31..f3d2d57 100644 --- a/includes/ConvertToBlocks/MigrationAgent.php +++ b/includes/ConvertToBlocks/MigrationAgent.php @@ -35,7 +35,7 @@ public function register() { [ 'agent' => [ 'next' => $this->next(), - 'save_delay' => apply_filters( 'convert_to_blocks_save_delay', 0, $post_id ) + 'save_delay' => apply_filters( 'convert_to_blocks_save_delay', 0, $post_id ), ], ] ); From de4e28e3e4c9651d9a6391ca05993ba481ab417d Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 9 Jul 2024 19:55:12 +0530 Subject: [PATCH 6/6] remove unnecessary package --- package-lock.json | 17 ----------------- package.json | 1 - webpack.config.js | 2 -- 3 files changed, 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88a1893..2122bad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", - "@wordpress/dependency-extraction-webpack-plugin": "^6.1.0", "@wordpress/env": "^10.2.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", @@ -4537,22 +4536,6 @@ "node": ">=14" } }, - "node_modules/@wordpress/dependency-extraction-webpack-plugin": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-6.2.0.tgz", - "integrity": "sha512-zHVfv9hPuWxBoGi7ZMmNPaDX0cn3RMQyu0t2pp/WaNIPLDUjHf4H/gLDeA0G8CiiQCDuiOvtPctqIC8UvmF7vw==", - "dev": true, - "dependencies": { - "json2php": "^0.0.7" - }, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, "node_modules/@wordpress/e2e-test-utils-playwright": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.25.0.tgz", diff --git a/package.json b/package.json index a714252..4e71f4a 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "@10up/cypress-wp-utils": "^0.2.0", "@10up/eslint-config": "^4.0.0", "@wordpress/env": "^10.2.0", - "@wordpress/dependency-extraction-webpack-plugin": "^6.1.0", "@wordpress/scripts": "^27.8.0", "cypress": "^13.3.0", "cypress-mochawesome-reporter": "^3.6.0", diff --git a/webpack.config.js b/webpack.config.js index 8e4dc28..c49f0fd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,4 @@ const defaultConfig = require('@wordpress/scripts/config/webpack.config'); -const DependencyExtractionWebpackPlugin = require('@wordpress/dependency-extraction-webpack-plugin'); module.exports = { ...defaultConfig, @@ -10,5 +9,4 @@ module.exports = { module: { ...defaultConfig.module, }, - plugins: [new DependencyExtractionWebpackPlugin()], };