Skip to content

Commit

Permalink
build: downgrade to Node.js 20 (#264)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alexplischke committed Jun 13, 2024
1 parent 580c804 commit 2ef6dd0
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ jobs:
matrix:
os: [Win10, Win11, macOS12, macOS13]
browser: [Chromium, Firefox, Webkit]
exclude:
- os: macOS12
browser: Webkit
fail-fast: false

runs-on: ubuntu-latest
Expand Down Expand Up @@ -226,6 +229,8 @@ jobs:
browser: Webkit
- os: Win11
browser: Webkit
- os: macOS12
browser: Webkit
fail-fast: false

runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ module.exports = ts.config(
js.configs.recommended,
...ts.configs.recommended,
prettier,
{
plugins: {
jest: jest,
},
},
{
ignores: ['lib/**'],
},
Expand All @@ -24,6 +19,10 @@ module.exports = ts.config(
'no-undef': 'warn',
},
},
{
files: ['tests/**/*.*js', 'tests/**/*.*ts'],
...jest.configs['flat/recommended'],
},
{
languageOptions: {
globals: {
Expand All @@ -32,6 +31,7 @@ module.exports = ts.config(
exports: true,
module: true,
require: true,
process: true,
},
},
},
Expand Down
28 changes: 19 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@tsconfig/node22": "^22.0.0",
"@eslint/js": "^9.4.0",
"@tsconfig/node20": "^20.1.4",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.4",
"@types/node": "^20.14.2",
Expand Down
1 change: 1 addition & 0 deletions src/cucumber-runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { spawn } from 'node:child_process';
import * as path from 'node:path';
import { setTimeout } from 'node:timers';
import { prepareNpmEnv, preExec } from 'sauce-testrunner-utils';

import type { CucumberRunnerConfig } from './types';
Expand Down
1 change: 1 addition & 0 deletions src/playwright-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { spawn } from 'node:child_process';
import * as path from 'node:path';
import * as fs from 'node:fs';
import { setTimeout } from 'node:timers';

import _ from 'lodash';
import {
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/cloud/cucumber/features/support/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { Before, When, Then } = require('@cucumber/cucumber');
const { chromium, firefox, webkit } = require('playwright');
const { expect } = require('@playwright/test');
const prettySeconds = require('pretty-seconds');
const { setTimeout } = require('node:timers');

Before(async function () {
const opts = {
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/local/cucumber/features/support/steps.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { Before, When, Then } = require('@cucumber/cucumber');
const { chromium, firefox, webkit } = require('playwright');
const { setTimeout } = require('node:timers');

Before(async function () {
const opts = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { Before, When, Then } = require('@cucumber/cucumber');
const { chromium, firefox, webkit } = require('playwright');
const { expect } = require('@playwright/test');
const prettySeconds = require('pretty-seconds');
const { setTimeout } = require('node:timers');

Before(async function () {
const opts = {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node22/tsconfig.json",
"extends": "@tsconfig/node20/tsconfig.json",
"include": ["src/**/*"],
"exclude": ["node_modules"],
"compilerOptions": {
Expand Down

0 comments on commit 2ef6dd0

Please sign in to comment.