Skip to content

Commit 2ef6dd0

Browse files
author
Alex Plischke
authored
build: downgrade to Node.js 20 (#264)
* build: downgrade to Node.js 20 * deps: add @eslint/js * build: add eslint globals * style: incorrect eslint configuration * refactor: explicit globals * ci: exclude known combinations that aren't working
1 parent 580c804 commit 2ef6dd0

File tree

10 files changed

+37
-16
lines changed

10 files changed

+37
-16
lines changed

.github/workflows/test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ jobs:
187187
matrix:
188188
os: [Win10, Win11, macOS12, macOS13]
189189
browser: [Chromium, Firefox, Webkit]
190+
exclude:
191+
- os: macOS12
192+
browser: Webkit
190193
fail-fast: false
191194

192195
runs-on: ubuntu-latest
@@ -226,6 +229,8 @@ jobs:
226229
browser: Webkit
227230
- os: Win11
228231
browser: Webkit
232+
- os: macOS12
233+
browser: Webkit
229234
fail-fast: false
230235

231236
runs-on: ubuntu-latest

eslint.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ module.exports = ts.config(
77
js.configs.recommended,
88
...ts.configs.recommended,
99
prettier,
10-
{
11-
plugins: {
12-
jest: jest,
13-
},
14-
},
1510
{
1611
ignores: ['lib/**'],
1712
},
@@ -24,6 +19,10 @@ module.exports = ts.config(
2419
'no-undef': 'warn',
2520
},
2621
},
22+
{
23+
files: ['tests/**/*.*js', 'tests/**/*.*ts'],
24+
...jest.configs['flat/recommended'],
25+
},
2726
{
2827
languageOptions: {
2928
globals: {
@@ -32,6 +31,7 @@ module.exports = ts.config(
3231
exports: true,
3332
module: true,
3433
require: true,
34+
process: true,
3535
},
3636
},
3737
},

package-lock.json

+19-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"devDependencies": {
4444
"@babel/core": "^7.24.7",
4545
"@babel/preset-env": "^7.24.7",
46-
"@tsconfig/node22": "^22.0.0",
46+
"@eslint/js": "^9.4.0",
47+
"@tsconfig/node20": "^20.1.4",
4748
"@types/jest": "^29.5.12",
4849
"@types/lodash": "^4.17.4",
4950
"@types/node": "^20.14.2",

src/cucumber-runner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { spawn } from 'node:child_process';
22
import * as path from 'node:path';
3+
import { setTimeout } from 'node:timers';
34
import { prepareNpmEnv, preExec } from 'sauce-testrunner-utils';
45

56
import type { CucumberRunnerConfig } from './types';

src/playwright-runner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { spawn } from 'node:child_process';
33
import * as path from 'node:path';
44
import * as fs from 'node:fs';
5+
import { setTimeout } from 'node:timers';
56

67
import _ from 'lodash';
78
import {

tests/fixtures/cloud/cucumber/features/support/steps.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const { Before, When, Then } = require('@cucumber/cucumber');
22
const { chromium, firefox, webkit } = require('playwright');
33
const { expect } = require('@playwright/test');
44
const prettySeconds = require('pretty-seconds');
5+
const { setTimeout } = require('node:timers');
56

67
Before(async function () {
78
const opts = {

tests/fixtures/local/cucumber/features/support/steps.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const { Before, When, Then } = require('@cucumber/cucumber');
22
const { chromium, firefox, webkit } = require('playwright');
3+
const { setTimeout } = require('node:timers');
34

45
Before(async function () {
56
const opts = {

tests/fixtures/post-release/cucumber/features/support/steps.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const { Before, When, Then } = require('@cucumber/cucumber');
22
const { chromium, firefox, webkit } = require('playwright');
33
const { expect } = require('@playwright/test');
44
const prettySeconds = require('pretty-seconds');
5+
const { setTimeout } = require('node:timers');
56

67
Before(async function () {
78
const opts = {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "@tsconfig/node22/tsconfig.json",
2+
"extends": "@tsconfig/node20/tsconfig.json",
33
"include": ["src/**/*"],
44
"exclude": ["node_modules"],
55
"compilerOptions": {

0 commit comments

Comments
 (0)