From d9293d08e02036591d1415adcd87b6b3db133ae5 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 3 Sep 2026 15:28:20 +0200 Subject: [PATCH 1/2] fix(tests): repair import maps and pin swr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit esm.sh/run now compiles JSX with the automatic runtime and emits `import { jsx } from "react/jsx-runtime"`. The import maps declared `react` but not `react/`, so react, swr, tanstack-query, mercure and github threw before issuing a single request. swr was mapped unpinned; esm.sh serves 2.5.1, which pulls react 19 next to the pages react-dom 18 — two React copies, null hook dispatcher. Pinned to swr@2.2.5?deps=react@18.2.0, matching tanstack-query.html. The lock also held @playwright/test 1.44.0; regenerated to 1.62.1. The manifest already declared ^1.44.0, which permits it, so it is untouched. --- package-lock.json | 67 +++++++++----------------------- tests-server/github.html | 1 + tests-server/mercure.html | 1 + tests-server/react.html | 1 + tests-server/swr.html | 5 ++- tests-server/tanstack-query.html | 1 + 6 files changed, 25 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 538262d..33e60c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "packages/mercure" ], "devDependencies": { - "@playwright/test": "^1.44.0", + "@playwright/test": "^1.62.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", "@types/node": "^20.12.11", @@ -1109,18 +1109,19 @@ } }, "node_modules/@playwright/test": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.0.tgz", - "integrity": "sha512-rNX5lbNidamSUorBhB4XZ9SQTjAqfe5M+p37Z8ic0jPFBMo5iCtQz1kRWkEMg+rYOKSlVycpQmpqjSFq7LXOfg==", + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.62.1.tgz", + "integrity": "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "playwright": "1.44.0" + "playwright": "1.62.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=20" } }, "node_modules/@sigstore/bundle": { @@ -7208,33 +7209,35 @@ } }, "node_modules/playwright": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.0.tgz", - "integrity": "sha512-F9b3GUCLQ3Nffrfb6dunPOkE5Mh68tR7zN32L4jCk4FjQamgesGay7/dAAe1WaMEGV04DkdJfcJzjoCKygUaRQ==", + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz", + "integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.44.0" + "playwright-core": "1.62.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=20" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.0.tgz", - "integrity": "sha512-ZTbkNpFfYcGWohvTTl+xewITm7EOuqIqex0c7dNZ+aXsbrLj0qI8XlGKfPpipjm0Wny/4Lt4CJsWJk1stVS5qQ==", + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz", + "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", "dev": true, + "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=20" } }, "node_modules/postcss": { @@ -9651,17 +9654,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/esa": { - "version": "1.0.0", - "extraneous": true, - "license": "MIT", - "dependencies": { - "urlpattern-polyfill": "^10.0.0" - }, - "devDependencies": { - "typescript": "^5.4.5" - } - }, "packages/ld": { "name": "@api-platform/ld", "version": "1.0.0", @@ -9960,29 +9952,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/use-mercure": { - "version": "1.0.0", - "extraneous": true, - "license": "MIT", - "dependencies": { - "urlpattern-polyfill": "^10.0.0" - }, - "devDependencies": { - "typescript": "^5.4.5" - } - }, - "packages/use-swresa": { - "version": "1.0.0", - "extraneous": true, - "license": "MIT", - "dependencies": { - "swr": "^2.2.5", - "urlpattern-polyfill": "^10.0.0" - }, - "devDependencies": { - "typescript": "^5.4.5" - } - }, "packages/use-swrld": { "name": "@api-platform/use-swrld", "version": "1.0.0", diff --git a/tests-server/github.html b/tests-server/github.html index 7eafb7a..fdad921 100644 --- a/tests-server/github.html +++ b/tests-server/github.html @@ -15,6 +15,7 @@ "imports": { "@jsxImportSource": "https://esm.sh/react@18.2.0", "react": "https://esm.sh/react@18.2.0", + "react/": "https://esm.sh/react@18.2.0/", "react-dom/client": "https://esm.sh/react-dom@18.2.0/client", "urlpattern-polyfill": "https://esm.sh/urlpattern-polyfill@10.0.0", "@api-platform/ld": "./ld.js" diff --git a/tests-server/mercure.html b/tests-server/mercure.html index 0aba74b..d162ad8 100644 --- a/tests-server/mercure.html +++ b/tests-server/mercure.html @@ -10,6 +10,7 @@ "@jsxImportSource": "https://esm.sh/react@18.2.0", "react-dom/": "https://esm.sh/react-dom@18.2.0/", "react": "https://esm.sh/react@18.2.0", + "react/": "https://esm.sh/react@18.2.0/", "@tanstack/react-query": "https://esm.sh/@tanstack/react-query?deps=react@18.2.0", "eventsource": "https://esm.sh/eventsource", "@api-platform/mercure": "./mercure.js" diff --git a/tests-server/react.html b/tests-server/react.html index 299120e..0970ea6 100644 --- a/tests-server/react.html +++ b/tests-server/react.html @@ -9,6 +9,7 @@ "imports": { "@jsxImportSource": "https://esm.sh/react@18.2.0", "react": "https://esm.sh/react@18.2.0", + "react/": "https://esm.sh/react@18.2.0/", "react-dom/client": "https://esm.sh/react-dom@18.2.0/client", "urlpattern-polyfill": "https://esm.sh/urlpattern-polyfill@10.0.0", "@api-platform/ld": "./ld.js" diff --git a/tests-server/swr.html b/tests-server/swr.html index f00abab..2f73e71 100644 --- a/tests-server/swr.html +++ b/tests-server/swr.html @@ -9,11 +9,12 @@ "imports": { "@jsxImportSource": "https://esm.sh/react@18.2.0", "react-dom/client": "https://esm.sh/react-dom@18.2.0/client", - "swr": "https://esm.sh/swr", + "swr": "https://esm.sh/swr@2.2.5?deps=react@18.2.0", "urlpattern-polyfill": "https://esm.sh/urlpattern-polyfill@10.0.0", "@api-platform/ld": "./ld.js", "use-swrld": "./use-swrld.js", - "react": "https://esm.sh/react@18.2.0" + "react": "https://esm.sh/react@18.2.0", + "react/": "https://esm.sh/react@18.2.0/" } } diff --git a/tests-server/tanstack-query.html b/tests-server/tanstack-query.html index b765216..94bf72f 100644 --- a/tests-server/tanstack-query.html +++ b/tests-server/tanstack-query.html @@ -10,6 +10,7 @@ "@jsxImportSource": "https://esm.sh/react@18.2.0", "react-dom/": "https://esm.sh/react-dom@18.2.0/", "react": "https://esm.sh/react@18.2.0", + "react/": "https://esm.sh/react@18.2.0/", "@tanstack/react-query": "https://esm.sh/@tanstack/react-query?deps=react@18.2.0", "urlpattern-polyfill": "https://esm.sh/urlpattern-polyfill@10.0.0", "@api-platform/ld": "./ld.js" From 01b3884ead146f8ba0a915a68292840841357c35 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 3 Sep 2026 15:39:06 +0200 Subject: [PATCH 2/2] fix(tests): author 3 fixture claimed to be author 2 /authors/3 returned {"@id": "/authors/2"}. No test asserted the wrong value, and mercure.html has an Author 3 button nothing ever clicks, so it went unnoticed. --- tests-server/fixtures/authors/3.jsonld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests-server/fixtures/authors/3.jsonld b/tests-server/fixtures/authors/3.jsonld index 9653b7b..db69aff 100644 --- a/tests-server/fixtures/authors/3.jsonld +++ b/tests-server/fixtures/authors/3.jsonld @@ -1 +1 @@ -{"@id": "/authors/2", "name": "Emily Rodda"} +{"@id": "/authors/3", "name": "Emily Rodda"}