From 0ce967bbdb88daf972477d85e4bede32fec55e57 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Wed, 7 Oct 2026 10:44:31 -0400 Subject: [PATCH 1/2] revert: react-dom 19 and fetch-mock 12 bumps This reverts #2602 and #2600. #2602 narrowed the published react-dom peer range on @faustwp/core, @faustwp/blocks and @faustwp/block-editor-utils to ^18.3.1, which would reject React 17 and React 19 installs, and moved the getting-started example to react-dom 19 while it still uses react 18. #2600 moved to fetch-mock 12, which removed fetchMock.restore() and the v9 routing API the core tests use, so the core test suite fails. --- .../next/faustwp-getting-started/package.json | 2 +- package-lock.json | 61 ++----------------- packages/block-editor-utils/package.json | 2 +- packages/blocks/package.json | 2 +- packages/faustwp-core/package.json | 4 +- 5 files changed, 10 insertions(+), 61 deletions(-) diff --git a/examples/next/faustwp-getting-started/package.json b/examples/next/faustwp-getting-started/package.json index f8cbeced4..703e9e7df 100644 --- a/examples/next/faustwp-getting-started/package.json +++ b/examples/next/faustwp-getting-started/package.json @@ -19,7 +19,7 @@ "graphql": "^16.12.0", "next": "^16.3.8", "react": "^18.3.1", - "react-dom": "^19.3.0", + "react-dom": "^18.3.1", "sass": "1.97.3" }, "devDependencies": { diff --git a/package-lock.json b/package-lock.json index ec74119c7..136fc96d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ "graphql": "^16.12.0", "next": "^16.3.8", "react": "^18.3.1", - "react-dom": "^19.3.0", + "react-dom": "^18.3.1", "sass": "1.97.3" }, "devDependencies": { @@ -102,18 +102,6 @@ } } }, - "examples/next/faustwp-getting-started/node_modules/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.28.0" - }, - "peerDependencies": { - "react": "^19.3.0" - } - }, "examples/next/faustwp-getting-started/node_modules/sass": { "version": "1.97.3", "license": "MIT", @@ -132,12 +120,6 @@ "@parcel/watcher": "^2.4.1" } }, - "examples/next/faustwp-getting-started/node_modules/scheduler": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", - "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", - "license": "MIT" - }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -3333,13 +3315,6 @@ "@types/node": "*" } }, - "node_modules/@types/glob-to-regexp": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@types/glob-to-regexp/-/glob-to-regexp-0.4.4.tgz", - "integrity": "sha512-nDKoaKJYbnn1MZxUY0cA1bPmmgZbg0cTq7Rh13d0KWYNOiKbqoR+2d89SnRPszGh7ROzSwZ/GOjZ4jPbmmZ6Eg==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -21959,16 +21934,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexparam": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-3.0.0.tgz", - "integrity": "sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/rehackt": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz", @@ -24828,7 +24793,7 @@ }, "peerDependencies": { "react": "^18.0.0", - "react-dom": "^18.3.1" + "react-dom": "^18.0.0" } }, "packages/block-editor-utils/node_modules/@ariakit/components": { @@ -26711,7 +26676,7 @@ "@wordpress/style-engine": ">=1.18.0", "next": "^16.3.8", "react": ">=17.0.2", - "react-dom": "^18.3.1" + "react-dom": ">=17.0.2" } }, "packages/blocks/node_modules/@testing-library/dom": { @@ -27164,7 +27129,7 @@ "@wry/equality": "^0.5.6", "@wry/trie": "^0.5.0", "concurrently": "^7.6.0", - "fetch-mock": "^12.6.0", + "fetch-mock": "9.11.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", "is-typedarray": "1.0.0", @@ -27195,7 +27160,7 @@ "@apollo/client": ">=3.6.6", "next": "^16.3.8", "react": ">=17.0.2", - "react-dom": "^18.3.1" + "react-dom": ">=17.0.2" } }, "packages/faustwp-core/node_modules/@apollo/client": { @@ -27358,22 +27323,6 @@ "node": ">=6" } }, - "packages/faustwp-core/node_modules/fetch-mock": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-12.6.0.tgz", - "integrity": "sha512-oAy0OqAvjAvduqCeWveBix7LLuDbARPqZZ8ERYtBcCURA3gy7EALA3XWq0tCNxsSg+RmmJqyaeeZlOCV9abv6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/glob-to-regexp": "^0.4.4", - "dequal": "^2.0.3", - "glob-to-regexp": "^0.4.1", - "regexparam": "^3.0.0" - }, - "engines": { - "node": ">=18.11.0" - } - }, "packages/faustwp-core/node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", diff --git a/packages/block-editor-utils/package.json b/packages/block-editor-utils/package.json index 8602435fd..7d57c2545 100644 --- a/packages/block-editor-utils/package.json +++ b/packages/block-editor-utils/package.json @@ -7,7 +7,7 @@ "types": "dist/mjs/index.d.ts", "peerDependencies": { "react": "^18.0.0", - "react-dom": "^18.3.1" + "react-dom": "^18.0.0" }, "dependencies": { "@wordpress/block-editor": "^18.0.0", diff --git a/packages/blocks/package.json b/packages/blocks/package.json index 72af2db13..dbaac2c75 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -11,7 +11,7 @@ "@wordpress/style-engine": ">=1.18.0", "next": "^16.3.8", "react": ">=17.0.2", - "react-dom": "^18.3.1" + "react-dom": ">=17.0.2" }, "devDependencies": { "@testing-library/jest-dom": "^7.0.1", diff --git a/packages/faustwp-core/package.json b/packages/faustwp-core/package.json index af46973cc..1beaacaf7 100644 --- a/packages/faustwp-core/package.json +++ b/packages/faustwp-core/package.json @@ -9,7 +9,7 @@ "@apollo/client": ">=3.6.6", "next": "^16.3.8", "react": ">=17.0.2", - "react-dom": "^18.3.1" + "react-dom": ">=17.0.2" }, "devDependencies": { "@apollo/client": "^3.6.6", @@ -28,7 +28,7 @@ "@wry/equality": "^0.5.6", "@wry/trie": "^0.5.0", "concurrently": "^7.6.0", - "fetch-mock": "12.6.0", + "fetch-mock": "9.11.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", "is-typedarray": "1.0.0", From c56c7e987a6d59e154c1de97e587af1e2e02961e Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Wed, 7 Oct 2026 11:07:07 -0400 Subject: [PATCH 2/2] ci: build the e2e example from the checkout with local packages The e2e job fetched the example with create-next-app, which calls the GitHub API unauthenticated and fails when rate limited, then installed the published @faustwp packages and copied the local builds over them. npm treated the copied CLI as already installed and never installed its current dependencies, so the app kept archiver 6 and the CLI failed to import ZipArchive. Copy the example from the checkout and point it at the local packages before its first install instead. --- .../workflows/e2e-next-faustwp-example.yml | 48 ++++--------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/.github/workflows/e2e-next-faustwp-example.yml b/.github/workflows/e2e-next-faustwp-example.yml index 5eeb42693..a47972917 100644 --- a/.github/workflows/e2e-next-faustwp-example.yml +++ b/.github/workflows/e2e-next-faustwp-example.yml @@ -4,14 +4,12 @@ on: pull_request: paths: - 'examples/next/**' + - '.github/workflows/e2e-next-faustwp-example.yml' jobs: e2e-test-faustwp-getting-started-example: name: (faustwp) Next Getting Started Example on Node ${{ matrix.node }} runs-on: ubuntu-22.04 - env: - PR_REPO: ${{github.event.pull_request.head.repo.full_name}} - PR_BRANCH: ${{github.event.pull_request.head.ref}} strategy: matrix: node: ['20', '22', '24'] @@ -25,48 +23,20 @@ jobs: uses: actions/setup-node@v7 with: node-version: ${{ matrix.node }} - # Get the PR branch so we can pull the correct Next.js example path - - name: echo current pr branch name + # Copy the example from this checkout so the app is built from the + # PR's own example source. + - name: copy getting started example run: | - echo $PR_BRANCH - # Get the PR repo so we can pull the correct Next.js example path - - name: echo current pr repo - run: | - echo $PR_REPO - # Install the Faust.js Next getting started example via npx create next app - # and use the PR branch to pull the correct example URL - - name: npx create next app - run: | - npx create-next-app@13 \ - -e https://github.com/${PR_REPO}/tree/${PR_BRANCH} \ - --example-path examples/next/faustwp-getting-started \ - --use-npm \ - e2e-app + cp -r examples/next/faustwp-getting-started e2e-app - name: install and build packages working-directory: ./ run: | npm ci npm run build - # To ensure PR changes are tested accurately, we replace the - # faust node_modules downloaded from NPM with the faust packages - # built in the previous step - # TODO: It would be nice to use symlink or npm link here, but upon - # writing this they do not function as expected on GH actions - - name: replace downloaded registry faust packages with local build - run: | - mkdir -p e2e-app/node_modules/@faustwp - rm -rf e2e-app/node_modules/@faustwp/cli - rm -rf e2e-app/node_modules/@faustwp/core - cp -r packages/faustwp-cli e2e-app/node_modules/@faustwp/cli - cp -r packages/faustwp-core e2e-app/node_modules/@faustwp/core - mkdir -p e2e-app/node_modules/.bin - ln -sf ../@faustwp/cli/dist/index.js e2e-app/node_modules/.bin/faust - chmod +x e2e-app/node_modules/@faustwp/cli/dist/index.js - # create-next-app's npm install may fail if @faustwp/* versions - # are not yet published. Point deps at local builds so npm install - # can resolve them and install all remaining dependencies. - # --install-links copies packages instead of symlinking, avoiding - # duplicate React instances from split module resolution. + # Point the app at the local package builds before its first install + # so npm installs their current dependencies. --install-links copies + # packages instead of symlinking, avoiding duplicate React instances + # from split module resolution. - name: install e2e-app dependencies working-directory: e2e-app run: |