Skip to content

feat!: v8 droping node 20 + vitest 5 + tsc 7 latest http-proxy & more - #17

Merged
dprevost-LMI merged 4 commits into
webdriverio:mainfrom
dprevost-LMI:v8
Sep 22, 2026
Merged

dprevost-LMI merged 4 commits into
webdriverio:mainfrom
dprevost-LMI:v8

Conversation

@dprevost-LMI

@dprevost-LMI dprevost-LMI commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Drops Node 20 support across the monorepo and brings every dependency (and the TypeScript target) up to what that floor actually allows.
  • Finishes with a Vitest 4 → 5 upgrade, fixing two test files that relied on now-enforced vi.mock hoisting rules.

Changes

  1. Drop Node 20 support (breaking) — removed Node 20 from the CI matrix and raised engines.node to >=22.0.0 in all three driver packages (previously >=20.0.0, and >=18.0.0 for safaridriver).
  2. Update dependencies to latest — @zip.js/zip.js, http-proxy-agent, https-proxy-agent, which, @types/node, and typescript (6 → 7).
  3. Upgrade to Vitest 5 — vitest and @vitest/coverage-v8 4.1.11 → 5.0.1.
    • packages/node-geckodriver/tests/start-unit.test.ts: hoisted three vi.mock() calls to module scope — Vitest 5 now throws (previously warned) when they're called inside a test body.
    • packages/node-geckodriver/tests/unit.test.ts: switched a per-test ../src/utils.js override to vi.doMock instead of vi.mock, since it's a runtime override for a dynamic import() and was never meant to replace the file's real top-level mock of the same module.
  4. Raise TypeScript target/lib to ES2023 — tsconfig.base.json was still on ES2020 from before the Node 22 floor; Node 22 natively supports ES2023, so this drops unnecessary downleveling in the build output.

dprevost-LMI and others added 3 commits September 21, 2026 21:38
BREAKING CHANGE: minimum supported Node.js version is now 22.

- Remove Node 20 from the CI matrix and bump each package's
  engines.node to >=22.0.0 (was >=20.0.0 / >=18.0.0 for safaridriver).
- Update @zip.js/zip.js, http-proxy-agent, https-proxy-agent, which,
  @types/node, and typescript to their latest versions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Vitest 5 now throws instead of warning when vi.mock/vi.doMock calls
aren't at module top level. Fixes two geckodriver test files that
relied on the old warn-only behavior:

- start-unit.test.ts: hoist the three vi.mock() calls (install.js,
  utils.js, node:child_process) out of the test body to the module
  top level, matching their actual (already-hoisted) execution order.
- unit.test.ts: switch the per-test '../src/utils.js' override in
  "download with proxy support" from vi.mock to vi.doMock, since it's
  a runtime override for a dynamic import (after vi.resetModules()),
  not a static hoisted mock, and was never meant to replace the
  file-level vi.mock of the same module.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Now that every package requires Node >=22.0.0, target/lib ES2020 was
stricter than necessary and downleveled syntax Node already supports
natively. Node 22 covers ES2023.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dprevost-LMI dprevost-LMI changed the title feat:! v8 droping node 20 + vitest 5 + tsc 7 latest http-proxy + wait & more feat!: v8 droping node 20 + vitest 5 + tsc 7 latest http-proxy + wait & more Sep 22, 2026
@dprevost-LMI dprevost-LMI changed the title feat!: v8 droping node 20 + vitest 5 + tsc 7 latest http-proxy + wait & more feat!: v8 droping node 20 + vitest 5 + tsc 7 latest http-proxy & more Sep 22, 2026
@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the previous test-isolation issue fully addressed and no new actionable failures identified.

Summary

This PR raises the supported Node.js floor to 22, updates the TypeScript target and several dependencies, and migrates the test suite to Vitest 5.

  • Removes Node.js 20 from CI and package engine declarations.
  • Updates TypeScript, Vitest, proxy agents, Zip.js, and which.
  • Adjusts geckodriver mocks for Vitest 5's hoisting behavior.
  • Adds cleanup for the test-specific runtime module mock, fully addressing the previous test-isolation finding.

Reviews (2) · Last reviewed commit: "test: clean up runtime mock after proxy ..."

Comment thread packages/node-geckodriver/tests/unit.test.ts
Addresses PR review feedback: vi.doMock registrations aren't torn
down automatically the way hoisted vi.mock calls are. Without
vi.doUnmock, a later test that calls vi.resetModules() and
dynamically imports utils.js/install.js would silently inherit this
test's hasAccess: false stub instead of the file's real top-level
mock. Also restores HTTPS_PROXY so it doesn't leak into later tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dprevost-LMI
dprevost-LMI merged commit 5f1f0ff into webdriverio:main Sep 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant