Commit 4a6cfd8
chore: test on Node 20-26, use a recent yarn berry, bump typescript
- Replace the Node 18 bots with Node 26. Playwright requires Node >=20,
so every 18.x job was failing while installing `@playwright/test`.
`engines.node` is bumped to >=20 accordingly.
- Install yarn berry from npm instead of corepack. `yarn init`, which the
generator runs, is a corepack "transparent command": in a project without a
`packageManager` field corepack runs its own hardcoded default (4.14.1 today)
and pins that into the generated project, no matter what
`corepack prepare yarn@4 --activate` selected. Installing @yarnpkg/cli-dist
directly makes the generated projects use the yarn we actually installed.
- Skip the yarn-berry step on the Node 22 bots. On Node versions with a broken
fstat for zip fds, the yarn PnP loader passes the CommonJS source to Node,
which then loads Playwright through the ESM loader's CommonJS translator,
where `require.cache` is undefined and loading test files fails with
"TypeError: Cannot read properties of undefined". Node 22 is in that window
for the current yarn. To be removed once the fix ships in @playwright/test.
- Bump typescript to 6.0.3 and @types/node to 20.19.43. TypeScript 6 does not
include @types/* automatically anymore, hence `types: ["node"]`. Dropping
`include` puts the root playwright.config.ts into the project as well, so it
is type checked instead of falling back to an inferred config in the editor.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019K5oVK8bNuHCvNVRauYieU1 parent 380df0f commit 4a6cfd8
5 files changed
Lines changed: 42 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
0 commit comments