From 1c9ff72a2605e9f6cea104c2b6a223dd99999347 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Jan 2024 05:31:35 +0000 Subject: [PATCH 1/6] chore: version packages --- .changeset/sweet-gorillas-admire.md | 5 ----- wp/headless-wp/CHANGELOG.md | 6 ++++++ wp/headless-wp/package.json | 2 +- wp/headless-wp/plugin.php | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 .changeset/sweet-gorillas-admire.md diff --git a/.changeset/sweet-gorillas-admire.md b/.changeset/sweet-gorillas-admire.md deleted file mode 100644 index 70c5f7069..000000000 --- a/.changeset/sweet-gorillas-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@headstartwp/headstartwp": patch ---- - -Added - New filter available tenup_headless_wp_revalidate_isr_for_post diff --git a/wp/headless-wp/CHANGELOG.md b/wp/headless-wp/CHANGELOG.md index 8893da8e1..8c4e328c2 100644 --- a/wp/headless-wp/CHANGELOG.md +++ b/wp/headless-wp/CHANGELOG.md @@ -1,5 +1,11 @@ # @headstartwp/headstartwp +## 1.0.11 + +### Patch Changes + +- 18d09388: Added - New filter available tenup_headless_wp_revalidate_isr_for_post + ## 1.0.10 ### Patch Changes diff --git a/wp/headless-wp/package.json b/wp/headless-wp/package.json index f30ab277b..f113ddd44 100644 --- a/wp/headless-wp/package.json +++ b/wp/headless-wp/package.json @@ -1,6 +1,6 @@ { "name": "@headstartwp/headstartwp", - "version": "1.0.10", + "version": "1.0.11", "private": true, "description": "10up Headless WordPress Plugin", "homepage": "https://github.com/10up/headstartwp/blob/develop/wp/headless-wp/README.md", diff --git a/wp/headless-wp/plugin.php b/wp/headless-wp/plugin.php index fa67b7544..1cd6773e1 100644 --- a/wp/headless-wp/plugin.php +++ b/wp/headless-wp/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: HeadstartWP * Plugin URI: https://github.com/10up/headstartwp-plugin * Description: Adds functionality to the WordPress admin and REST API for 10up's headless framework. - * Version: 1.0.10 + * Version: 1.0.11 * Author: 10up * Author URI: https://10up.com * Text Domain: headstartwp @@ -17,7 +17,7 @@ use HeadlessWP\Preview\PreviewToken; // Useful global constants. -define( 'HEADLESS_WP_PLUGIN_VERSION', '1.0.10' ); +define( 'HEADLESS_WP_PLUGIN_VERSION', '1.0.11' ); define( 'HEADLESS_WP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'HEADLESS_WP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'HEADLESS_WP_PLUGIN_INC', HEADLESS_WP_PLUGIN_PATH . 'includes/' ); From 297cc47d42dfd397b1e604f487bbcaaa862b5e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcholas=20Andr=C3=A9?= Date: Fri, 19 Jan 2024 14:59:03 -0300 Subject: [PATCH 2/6] chore: lock file --- package-lock.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2e890f37..a91391a6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21482,7 +21482,7 @@ }, "packages/core": { "name": "@headstartwp/core", - "version": "1.1.2", + "version": "1.2.0", "license": "MIT", "dependencies": { "@justinribeiro/lite-youtube": "^1.3.1", @@ -21873,10 +21873,10 @@ }, "packages/next": { "name": "@headstartwp/next", - "version": "1.1.6", + "version": "1.2.0", "license": "MIT", "dependencies": { - "@headstartwp/core": "^1.1.2", + "@headstartwp/core": "^1.2.0", "deepmerge": "^4.3.1", "loader-utils": "^3.2.0", "schema-utils": "^4.0.0" @@ -21901,7 +21901,7 @@ }, "packages/next-redis-cache-provider": { "name": "@10up/next-redis-cache-provider", - "version": "0.1.5", + "version": "0.2.0", "license": "MIT", "dependencies": { "ioredis": "^5.3.1" @@ -22039,8 +22039,8 @@ "version": "0.2.0", "license": "GPL-2.0-or-later", "dependencies": { - "@headstartwp/core": "^1.1.2", - "@headstartwp/next": "^1.1.6", + "@headstartwp/core": "^1.2.0", + "@headstartwp/next": "^1.2.0", "@linaria/babel-preset": "^4.4.5", "@linaria/core": "^4.2.10", "@linaria/react": "^4.3.8", @@ -22068,8 +22068,8 @@ "version": "0.2.0", "license": "GPL-2.0-or-later", "dependencies": { - "@headstartwp/core": "^1.1.2", - "@headstartwp/next": "^1.1.6", + "@headstartwp/core": "^1.2.0", + "@headstartwp/next": "^1.2.0", "@linaria/babel-preset": "^4.4.5", "@linaria/core": "^4.2.10", "@linaria/react": "^4.3.8", @@ -22097,9 +22097,9 @@ "version": "0.2.0", "license": "GPL-2.0-or-later", "dependencies": { - "@10up/next-redis-cache-provider": "^0.1.5", - "@headstartwp/core": "^1.1.2", - "@headstartwp/next": "^1.1.6", + "@10up/next-redis-cache-provider": "^0.2.0", + "@headstartwp/core": "^1.2.0", + "@headstartwp/next": "^1.2.0", "@linaria/babel-preset": "^4.4.5", "@linaria/core": "^4.2.10", "@linaria/react": "^4.3.8", @@ -22127,8 +22127,8 @@ "version": "0.2.1-next.2", "license": "GPL-2.0-or-later", "dependencies": { - "@headstartwp/core": "^1.1.2", - "@headstartwp/next": "^1.1.6", + "@headstartwp/core": "^1.2.0", + "@headstartwp/next": "^1.2.0", "@linaria/babel-preset": "^4.4.5", "@linaria/core": "^4.2.10", "@linaria/react": "^4.3.8", @@ -22153,7 +22153,7 @@ }, "wp/headless-wp": { "name": "@headstartwp/headstartwp", - "version": "1.0.10", + "version": "1.0.11", "license": "GPL-2.0-or-later", "devDependencies": { "@wordpress/env": "^5.14.0" From f18be490ab39d2ba7680de9a3ceeecb235d86287 Mon Sep 17 00:00:00 2001 From: John Watkins Date: Fri, 19 Jan 2024 12:04:07 -0600 Subject: [PATCH 3/6] Fix deprecation warning for htmlspecialchars (#670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nícholas André --- .changeset/cyan-badgers-smile.md | 5 +++++ wp/headless-wp/includes/classes/API.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/cyan-badgers-smile.md diff --git a/.changeset/cyan-badgers-smile.md b/.changeset/cyan-badgers-smile.md new file mode 100644 index 000000000..4d9dce2b8 --- /dev/null +++ b/.changeset/cyan-badgers-smile.md @@ -0,0 +1,5 @@ +--- +"@headstartwp/headstartwp": patch +--- + +Ensure htmlspecialchars receives an empty string instead of null to fix deprecation warnings. diff --git a/wp/headless-wp/includes/classes/API.php b/wp/headless-wp/includes/classes/API.php index a2ad7dea4..9dbc678b9 100644 --- a/wp/headless-wp/includes/classes/API.php +++ b/wp/headless-wp/includes/classes/API.php @@ -98,7 +98,7 @@ public function modify_rest_params( $args, $request ) { return $args; } - $author = htmlspecialchars( filter_input( INPUT_GET, 'author' ) ); + $author = htmlspecialchars( filter_input( INPUT_GET, 'author' ) ?? '' ); if ( ! empty( $author ) && ! is_numeric( $author ) ) { unset( $args['author__in'] ); @@ -108,10 +108,10 @@ public function modify_rest_params( $args, $request ) { $taxonomies = wp_list_filter( get_object_taxonomies( $args['post_type'], 'objects' ), [ 'show_in_rest' => true ] ); foreach ( $taxonomies as $taxonomy ) { - $term = htmlspecialchars( filter_input( INPUT_GET, $taxonomy->name ) ); + $term = htmlspecialchars( filter_input( INPUT_GET, $taxonomy->name ) ?? '' ); if ( ! $term ) { - $term = htmlspecialchars( filter_input( INPUT_GET, $taxonomy->rest_base ) ); + $term = htmlspecialchars( filter_input( INPUT_GET, $taxonomy->rest_base ) ?? '' ); } if ( ! empty( $term ) && ! is_numeric( $term ) ) { From 5b20cc2de89438335b28e4cca9029e1d20458681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcholas=20Andr=C3=A9?= Date: Mon, 22 Jan 2024 14:24:31 +0000 Subject: [PATCH 4/6] chore: update plugins in wp-env.json --- wp/headless-wp/.wp-env.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp/headless-wp/.wp-env.json b/wp/headless-wp/.wp-env.json index c69a89308..157fcfa70 100644 --- a/wp/headless-wp/.wp-env.json +++ b/wp/headless-wp/.wp-env.json @@ -2,7 +2,7 @@ "plugins": [ ".", "../local-plugin", - "https://downloads.wordpress.org/plugin/wordpress-seo.19.14.zip", - "https://downloads.wordpress.org/plugin/safe-redirect-manager.1.11.1.zip" + "https://downloads.wordpress.org/plugin/wordpress-seo.21.8.1.zip", + "https://downloads.wordpress.org/plugin/safe-redirect-manager.2.1.1.zip" ] } From fd00bf1655f4c056d828ac5d0d9710b2becd17cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jan 2024 14:28:45 +0000 Subject: [PATCH 5/6] chore: version packages --- .changeset/cyan-badgers-smile.md | 5 ----- wp/headless-wp/CHANGELOG.md | 6 ++++++ wp/headless-wp/package.json | 2 +- wp/headless-wp/plugin.php | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 .changeset/cyan-badgers-smile.md diff --git a/.changeset/cyan-badgers-smile.md b/.changeset/cyan-badgers-smile.md deleted file mode 100644 index 4d9dce2b8..000000000 --- a/.changeset/cyan-badgers-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@headstartwp/headstartwp": patch ---- - -Ensure htmlspecialchars receives an empty string instead of null to fix deprecation warnings. diff --git a/wp/headless-wp/CHANGELOG.md b/wp/headless-wp/CHANGELOG.md index 8c4e328c2..1866c96ce 100644 --- a/wp/headless-wp/CHANGELOG.md +++ b/wp/headless-wp/CHANGELOG.md @@ -1,5 +1,11 @@ # @headstartwp/headstartwp +## 1.0.12 + +### Patch Changes + +- f18be490: Ensure htmlspecialchars receives an empty string instead of null to fix deprecation warnings. + ## 1.0.11 ### Patch Changes diff --git a/wp/headless-wp/package.json b/wp/headless-wp/package.json index f113ddd44..623b309dc 100644 --- a/wp/headless-wp/package.json +++ b/wp/headless-wp/package.json @@ -1,6 +1,6 @@ { "name": "@headstartwp/headstartwp", - "version": "1.0.11", + "version": "1.0.12", "private": true, "description": "10up Headless WordPress Plugin", "homepage": "https://github.com/10up/headstartwp/blob/develop/wp/headless-wp/README.md", diff --git a/wp/headless-wp/plugin.php b/wp/headless-wp/plugin.php index 1cd6773e1..e17caa302 100644 --- a/wp/headless-wp/plugin.php +++ b/wp/headless-wp/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: HeadstartWP * Plugin URI: https://github.com/10up/headstartwp-plugin * Description: Adds functionality to the WordPress admin and REST API for 10up's headless framework. - * Version: 1.0.11 + * Version: 1.0.12 * Author: 10up * Author URI: https://10up.com * Text Domain: headstartwp @@ -17,7 +17,7 @@ use HeadlessWP\Preview\PreviewToken; // Useful global constants. -define( 'HEADLESS_WP_PLUGIN_VERSION', '1.0.11' ); +define( 'HEADLESS_WP_PLUGIN_VERSION', '1.0.12' ); define( 'HEADLESS_WP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'HEADLESS_WP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'HEADLESS_WP_PLUGIN_INC', HEADLESS_WP_PLUGIN_PATH . 'includes/' ); From 52e1159f9f8f6dc219b96a8dae66cbc5983e9ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcholas=20Andr=C3=A9?= Date: Mon, 22 Jan 2024 14:39:37 +0000 Subject: [PATCH 6/6] chore: more repo to node v20 --- .github/workflows/deploy-docs.yml | 2 +- .github/workflows/eslint.yml | 4 ++-- .github/workflows/nextjs_bundle_analysis.yml | 4 ++-- .github/workflows/npm-release-next-version.yml | 6 +++--- .github/workflows/release-latest-version.yml | 6 +++--- .github/workflows/unit-tests.yml | 2 +- .gitpod.Dockerfile | 2 +- package-lock.json | 2 +- package.json | 2 +- packages/core/.lintstagedrc.json | 8 ++++++++ packages/hooks/.lintstagedrc.json | 8 ++++++++ packages/next-redis-cache-provider/.lintstagedrc.json | 8 ++++++++ packages/next/.lintstagedrc.json | 8 ++++++++ 13 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 packages/core/.lintstagedrc.json create mode 100644 packages/hooks/.lintstagedrc.json create mode 100644 packages/next-redis-cache-provider/.lintstagedrc.json create mode 100644 packages/next/.lintstagedrc.json diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 0fee8fb8b..aac067c22 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: npm - name: Install dependencies run: npm install diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 0f16de5b4..1eaaea5d4 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -8,14 +8,14 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [20.x] steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/nextjs_bundle_analysis.yml b/.github/workflows/nextjs_bundle_analysis.yml index 38c220cba..49f2581d4 100644 --- a/.github/workflows/nextjs_bundle_analysis.yml +++ b/.github/workflows/nextjs_bundle_analysis.yml @@ -19,9 +19,9 @@ jobs: - uses: actions/checkout@v2 - name: Set up node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: '20.x' - name: Install dependencies uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/npm-release-next-version.yml b/.github/workflows/npm-release-next-version.yml index 0f510f27a..f1a7a99ea 100644 --- a/.github/workflows/npm-release-next-version.yml +++ b/.github/workflows/npm-release-next-version.yml @@ -15,10 +15,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Setup Node.js 16.x - uses: actions/setup-node@v2 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Install Dependencies run: npm ci diff --git a/.github/workflows/release-latest-version.yml b/.github/workflows/release-latest-version.yml index 6ee339125..e928076b3 100644 --- a/.github/workflows/release-latest-version.yml +++ b/.github/workflows/release-latest-version.yml @@ -17,10 +17,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Setup Node.js 16.x - uses: actions/setup-node@v2 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Install Dependencies run: npm ci diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b517dc359..9f620daa9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 8163b6b2e..8c00642d5 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,5 +1,5 @@ FROM gitpod/workspace-full:latest -RUN bash -c ". .nvm/nvm.sh && nvm install 16 && nvm use 16 && nvm alias default 16" +RUN bash -c ". .nvm/nvm.sh && nvm install 20 && nvm use 20 && nvm alias default 20" RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a91391a6b..2ff0281c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22153,7 +22153,7 @@ }, "wp/headless-wp": { "name": "@headstartwp/headstartwp", - "version": "1.0.11", + "version": "1.0.12", "license": "GPL-2.0-or-later", "devDependencies": { "@wordpress/env": "^5.14.0" diff --git a/package.json b/package.json index ad8cad075..c1b5aa9d7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "build:packages": "turbo run build --filter=./packages/*", "build:wpnextjs": "npm run build:packages && turbo run build --filter=./projects/wp-nextjs", "test": "npm run build:packages && turbo run test", - "lint": "eslint .", + "lint": "turbo run lint", "wp-env": "npm run wp-env:start -w=wp/headless-wp", "nextjs:dev": "turbo run dev --parallel --filter=!./projects/wp-multisite-nextjs --filter=!./projects/wp-multisite-i18n-nextjs --filter=!./projects/wp-nextjs-ts", "nextjs:dev-multisite": "turbo run dev --parallel --filter=!./projects/wp-nextjs", diff --git a/packages/core/.lintstagedrc.json b/packages/core/.lintstagedrc.json new file mode 100644 index 000000000..7a9d31767 --- /dev/null +++ b/packages/core/.lintstagedrc.json @@ -0,0 +1,8 @@ +{ + "*.[tj]s": [ + "eslint" + ], + "*.[tj]sx": [ + "eslint" + ] +} \ No newline at end of file diff --git a/packages/hooks/.lintstagedrc.json b/packages/hooks/.lintstagedrc.json new file mode 100644 index 000000000..7a9d31767 --- /dev/null +++ b/packages/hooks/.lintstagedrc.json @@ -0,0 +1,8 @@ +{ + "*.[tj]s": [ + "eslint" + ], + "*.[tj]sx": [ + "eslint" + ] +} \ No newline at end of file diff --git a/packages/next-redis-cache-provider/.lintstagedrc.json b/packages/next-redis-cache-provider/.lintstagedrc.json new file mode 100644 index 000000000..7a9d31767 --- /dev/null +++ b/packages/next-redis-cache-provider/.lintstagedrc.json @@ -0,0 +1,8 @@ +{ + "*.[tj]s": [ + "eslint" + ], + "*.[tj]sx": [ + "eslint" + ] +} \ No newline at end of file diff --git a/packages/next/.lintstagedrc.json b/packages/next/.lintstagedrc.json new file mode 100644 index 000000000..7a9d31767 --- /dev/null +++ b/packages/next/.lintstagedrc.json @@ -0,0 +1,8 @@ +{ + "*.[tj]s": [ + "eslint" + ], + "*.[tj]sx": [ + "eslint" + ] +} \ No newline at end of file