From 90b3604473743a2ec2e0bd94e68ef0217c1a6ffe Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 1 Oct 2026 21:15:48 +0300 Subject: [PATCH 1/2] devops(ci): upload the upstream report from the hidden .roll/ directory The playwright-cli watch failed on 2026-09-21 and 2026-09-28 in the pull-request job: "Artifact not found for name: playwright-cli-report". upload-artifact@v4 defaults to include-hidden-files: false, the report lives in .roll/, so the track job logged "No files were found" and, with if-no-files-found: ignore, carried on green. The branch got pushed and tested, but no pull request was ever opened. The patchright-core roll has the same step and would have failed the same way on its first automatic roll; the online selftest uploads .patchright-cli/ and never had screenshots for the same reason. Upload hidden files in all three, and fail the upload itself when the upstream report is missing, since the pull-request job depends on it. --- .github/workflows/stealth-online.yml | 1 + .github/workflows/upstream-playwright-cli.yml | 5 ++++- .github/workflows/upstream-roll.yml | 5 ++++- CHANGELOG.md | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stealth-online.yml b/.github/workflows/stealth-online.yml index 6ab82a8..c7239cc 100644 --- a/.github/workflows/stealth-online.yml +++ b/.github/workflows/stealth-online.yml @@ -22,4 +22,5 @@ jobs: with: name: selftest-online-screenshots path: .patchright-cli/ + include-hidden-files: true if-no-files-found: warn diff --git a/.github/workflows/upstream-playwright-cli.yml b/.github/workflows/upstream-playwright-cli.yml index 306dddb..413202a 100644 --- a/.github/workflows/upstream-playwright-cli.yml +++ b/.github/workflows/upstream-playwright-cli.yml @@ -56,11 +56,14 @@ jobs: done [ -f .roll/playwright-cli-report.md ] && cat .roll/playwright-cli-report.md >> "$GITHUB_STEP_SUMMARY" if [ "$code" != "0" ] && [ "$code" != "2" ]; then exit "$code"; fi + # .roll/ is a dot directory: upload-artifact skips hidden files unless told otherwise, and + # the pull-request job cannot open a PR without this report, so a missing one fails here. - uses: actions/upload-artifact@v4 with: name: playwright-cli-report path: .roll/ - if-no-files-found: ignore + include-hidden-files: true + if-no-files-found: error - name: Open an issue for a blocked merge if: steps.watch.outputs.classification == 'blocked' env: diff --git a/.github/workflows/upstream-roll.yml b/.github/workflows/upstream-roll.yml index e5aeaca..7e8fbd7 100644 --- a/.github/workflows/upstream-roll.yml +++ b/.github/workflows/upstream-roll.yml @@ -102,11 +102,14 @@ jobs: echo "classification=$(node -p "require('./.roll/result.json').classification")" >> "$GITHUB_OUTPUT" cat .roll/report.md >> "$GITHUB_STEP_SUMMARY" if [ "$code" != "0" ] && [ "$code" != "2" ]; then exit "$code"; fi + # .roll/ is a dot directory: upload-artifact skips hidden files unless told otherwise, and + # the pull-request job cannot open a PR without this report, so a missing one fails here. - uses: actions/upload-artifact@v4 with: name: roll-report path: .roll/ - if-no-files-found: ignore + include-hidden-files: true + if-no-files-found: error - name: Open an issue for a blocked roll if: steps.roll.outputs.classification == 'blocked' env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ce9d6..f7445b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project are documented here. The format follows [Kee ### Fixed - Windows: a staged Chrome update no longer puts a version in the user agent that the browser is not serving. Chrome unpacks the next build into a second `\` directory beside the running one and keeps serving the old build until it restarts, so the newest directory could disagree with the client hints (user agent `Chrome/153`, `uaFullVersion` `152.0.7977.82`) — the exact contradiction a detector looks for. With more than one directory the executable's own version resource decides. - Upstream roll: a repository with issues disabled (a fork has them off by default) no longer fails the `detect` job. The blocked-issue lookup warns and continues, and a blocked roll that cannot open an issue says so with the report in the job summary and the artifact. +- Upstream workflows: the report artifact is uploaded again, so the pull request gets opened. `upload-artifact@v4` skips hidden files by default and the report lives in `.roll/`, so nothing was uploaded and the `pull-request` job died on the download; the playwright-cli watch has failed this way on every upstream change since playwright-cli 0.1.20. A missing report now fails the upload step itself. The manual online selftest had the same problem with `.patchright-cli/`. - `npm pack` from a working tree no longer picks up the ignored `skills/patchright-cli-workspace/` evaluation runs: `files` names `skills/patchright-cli` instead of `skills`. Release tarballs, built from a clean checkout, are unchanged. ### Upstream From f0a6d50ff69ce53ff470564156806ca48efebf09 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 1 Oct 2026 21:19:08 +0300 Subject: [PATCH 2/2] devops(ci): drop Node 20, run on the Node 24 action releases Node 20 reached end of life in April 2026, and every run warned that checkout, setup-node, upload-artifact and download-artifact v4 target Node 20 and are being forced onto Node 24. - CI matrix: Node 22 and 24, the two supported LTS lines; macOS keeps skipping the floor version, as it did with 20. - The floor follows what CI tests: engines >=22, README, the skill and the esbuild target. - checkout v7, setup-node v7, upload-artifact v7, download-artifact v8. Their breaking changes do not touch us: checkout keeps the token in a separate file but git push still uses it, setup-node's automatic cache is moot with an explicit `cache: npm`, and the artifacts are still zipped, so the download digest check and unzip behave as before. --- .github/workflows/ci.yml | 11 ++++++----- .github/workflows/release.yml | 4 ++-- .github/workflows/stealth-online.yml | 6 +++--- .github/workflows/upstream-playwright-cli.yml | 10 +++++----- .github/workflows/upstream-roll.yml | 14 +++++++------- CHANGELOG.md | 3 +++ README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- scripts/build.mjs | 2 +- skills/patchright-cli/SKILL.md | 2 +- 11 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d6b57f..72ad563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,15 +28,16 @@ jobs: matrix: # Google Chrome is preinstalled on all three runner images; no browser download needed. os: [ubuntu-latest, windows-latest, macos-15] - node: [20, 22] + # The supported LTS lines: the floor in package.json engines and the active LTS. + node: [22, 24] exclude: - os: macos-15 - node: 20 + node: 22 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: ref: ${{ inputs.ref || github.ref }} - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v7 with: node-version: ${{ matrix.node }} cache: npm @@ -53,7 +54,7 @@ jobs: - name: Stealth tests (headed Chrome) if: runner.os != 'Linux' run: npm run test:stealth - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: failure() with: name: test-results-${{ matrix.os }}-node${{ matrix.node }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3773691..e38b5b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,8 @@ jobs: tarball: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: 22 cache: npm diff --git a/.github/workflows/stealth-online.yml b/.github/workflows/stealth-online.yml index c7239cc..b459d59 100644 --- a/.github/workflows/stealth-online.yml +++ b/.github/workflows/stealth-online.yml @@ -10,15 +10,15 @@ jobs: online: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: 22 cache: npm - run: npm ci - name: selftest --online run: xvfb-run -a node bin/patchright-cli.js selftest --online || true - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: selftest-online-screenshots path: .patchright-cli/ diff --git a/.github/workflows/upstream-playwright-cli.yml b/.github/workflows/upstream-playwright-cli.yml index 413202a..b15597d 100644 --- a/.github/workflows/upstream-playwright-cli.yml +++ b/.github/workflows/upstream-playwright-cli.yml @@ -36,8 +36,8 @@ jobs: branch: ${{ steps.push.outputs.branch }} pushed: ${{ steps.push.outputs.pushed }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: 22 cache: npm @@ -58,7 +58,7 @@ jobs: if [ "$code" != "0" ] && [ "$code" != "2" ]; then exit "$code"; fi # .roll/ is a dot directory: upload-artifact skips hidden files unless told otherwise, and # the pull-request job cannot open a PR without this report, so a missing one fails here. - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: playwright-cli-report path: .roll/ @@ -118,10 +118,10 @@ jobs: CLASSIFICATION: ${{ needs.track.outputs.classification }} CI_RESULT: ${{ needs.test.result }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: ref: ${{ needs.track.outputs.branch }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: playwright-cli-report path: .roll diff --git a/.github/workflows/upstream-roll.yml b/.github/workflows/upstream-roll.yml index 7e8fbd7..5d62625 100644 --- a/.github/workflows/upstream-roll.yml +++ b/.github/workflows/upstream-roll.yml @@ -47,8 +47,8 @@ jobs: too_fresh: ${{ steps.check.outputs.too_fresh }} open_issue: ${{ steps.issue.outputs.open_issue }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: 22 cache: npm @@ -84,8 +84,8 @@ jobs: branch: ${{ steps.push.outputs.branch }} pushed: ${{ steps.push.outputs.pushed }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: 22 cache: npm @@ -104,7 +104,7 @@ jobs: if [ "$code" != "0" ] && [ "$code" != "2" ]; then exit "$code"; fi # .roll/ is a dot directory: upload-artifact skips hidden files unless told otherwise, and # the pull-request job cannot open a PR without this report, so a missing one fails here. - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: roll-report path: .roll/ @@ -162,10 +162,10 @@ jobs: CLASSIFICATION: ${{ needs.roll.outputs.classification }} CI_RESULT: ${{ needs.test.result }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: ref: ${{ needs.roll.outputs.branch }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: roll-report path: .roll diff --git a/CHANGELOG.md b/CHANGELOG.md index f7445b2..9e518ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ All notable changes to this project are documented here. The format follows [Kee - `recording-start` / `recording-stop` (new upstream commands): record what you do in the window and print it back as code. They carry the new `recorder-injection` warning, because the recorder puts a `__pw_recorder` binding on the page main world and an overlay element on every page until it is stopped. - `install --global` (alias `-g`) is a real flag now that the daemon takes it; it needs `--skills`, and says so instead of ignoring it. +### Changed +- Node.js 22 or newer is required: Node 20 reached end of life in April 2026. CI tests the two supported LTS lines, 22 and 24, and the workflows use the action releases that run on Node 24 (`checkout`, `setup-node` and `upload-artifact` v7, `download-artifact` v8). + ### Fixed - Windows: a staged Chrome update no longer puts a version in the user agent that the browser is not serving. Chrome unpacks the next build into a second `\` directory beside the running one and keeps serving the old build until it restarts, so the newest directory could disagree with the client hints (user agent `Chrome/153`, `uaFullVersion` `152.0.7977.82`) — the exact contradiction a detector looks for. With more than one directory the executable's own version resource decides. - Upstream roll: a repository with issues disabled (a fork has them off by default) no longer fails the `detect` job. The blocked-issue lookup warns and continues, and a blocked roll that cannot open an issue says so with the report in the job summary and the artifact. diff --git a/README.md b/README.md index f5bc7ce..21de6ca 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Because the `patchright-cli` npm name belongs to an unrelated project, this one ## Requirements -- Node.js 20 or newer. +- Node.js 22 or newer. - Google Chrome (Microsoft Edge is the fallback). The bundled Chromium works but is detectable and warns. - Windows, macOS or Linux. Headless (the default) needs no display; `--headed` needs one (Linux: `xvfb-run -a`; macOS: a logged-in desktop session). diff --git a/package-lock.json b/package-lock.json index e90c576..4af1858 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "typescript": "^5.9.3" }, "engines": { - "node": ">=20" + "node": ">=22" } }, "node_modules/@esbuild/aix-ppc64": { diff --git a/package.json b/package.json index 7015e92..d40c4e8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "homepage": "https://github.com/b1zya/patchright-cli#readme", "engines": { - "node": ">=20" + "node": ">=22" }, "author": { "name": "b1zya" diff --git a/scripts/build.mjs b/scripts/build.mjs index ae5f294..157fe58 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -7,7 +7,7 @@ await build({ outfile: 'lib/cli.js', bundle: true, platform: 'node', - target: 'node20', + target: 'node22', format: 'cjs', sourcemap: false, logLevel: 'info', diff --git a/skills/patchright-cli/SKILL.md b/skills/patchright-cli/SKILL.md index eb0a910..7eed5df 100644 --- a/skills/patchright-cli/SKILL.md +++ b/skills/patchright-cli/SKILL.md @@ -412,7 +412,7 @@ patchright-cli doctor patchright-cli install --skills ``` -Requires Node.js 20+ and Google Chrome (or Microsoft Edge). Headless (the default) needs no display; `--headed` needs one (Linux: `xvfb-run -a`). Platform notes for Linux, Windows and macOS (displays, permissions, Gatekeeper, console windows) are in [references/platforms.md](references/platforms.md). +Requires Node.js 22+ and Google Chrome (or Microsoft Edge). Headless (the default) needs no display; `--headed` needs one (Linux: `xvfb-run -a`). Platform notes for Linux, Windows and macOS (displays, permissions, Gatekeeper, console windows) are in [references/platforms.md](references/platforms.md). ## Example: log in with a persistent identity