From ec614104d05b5d51e724b4043459ee21e8fe1ca8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 13:19:07 +0000 Subject: [PATCH] CI: pin Playwright for the audit, move to Node 22 The audit step failed on GitHub because playwright was not a dependency. Pin it to the exact version used locally so the browser build matches. Node 20 is past end of life; build on Node 22 here and on Cloudflare Pages. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Gnmfunw3PUpLkhSGZWPpfn --- .github/workflows/site.yml | 2 +- .node-version | 2 +- deploy/README.md | 2 +- package-lock.json | 32 +++++++++++++++++++++++++++++++- package.json | 5 +++-- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 0afeafb..5009091 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -49,7 +49,7 @@ jobs: run: npm run build - name: Accessibility, CSP and page-weight audit run: | - npx --yes playwright@1 install --with-deps chromium + npx playwright install --with-deps chromium # version pinned in package.json npm run audit - name: Validate the Caddy config run: docker run --rm -v "$PWD/deploy/hetzner/Caddyfile:/etc/caddy/Caddyfile:ro" caddy:2 caddy validate --adapter caddyfile --config /etc/caddy/Caddyfile diff --git a/.node-version b/.node-version index 209e3ef..2bd5a0a 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20 +22 diff --git a/deploy/README.md b/deploy/README.md index 7eea74d..f4457d6 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -194,7 +194,7 @@ Workers & Pages, Create, Pages, **Connect to Git**, choose `djoleradikod/djonko. | Environment variables, Production | `SITE_URL` = `https://djonko-dev.pages.dev` (until launch) | | Environment variables, Preview | none. Preview builds take their own address from `CF_PAGES_URL`. | -Node comes from `.node-version` (20). Under Settings, Build, keep the build system at version 3. +Node comes from `.node-version` (22). Under Settings, Build, keep the build system at version 3. Under Settings, Build, **Branch control**: production deployments on for `main`; preview deployments for **Custom branches**, include `*`, exclude `dependabot/*`. Dependabot pull requests are checked by the GitHub diff --git a/package-lock.json b/package-lock.json index f083e57..beae16f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,8 @@ "satori": "^0.18.4" }, "devDependencies": { - "axe-core": "^4.14.0" + "axe-core": "^4.14.0", + "playwright": "1.63.0" }, "engines": { "node": ">=20" @@ -6112,6 +6113,35 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/playwright": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.63.0.tgz", + "integrity": "sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.63.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.63.0.tgz", + "integrity": "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/points-on-curve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", diff --git a/package.json b/package.json index 75050c7..3a55fd9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.2.0", "private": true, "engines": { - "node": ">=20" + "node": ">=22" }, "scripts": { "dev": "astro dev", @@ -33,6 +33,7 @@ "satori": "^0.18.4" }, "devDependencies": { - "axe-core": "^4.14.0" + "axe-core": "^4.14.0", + "playwright": "1.63.0" } }