Skip to content

Commit

Permalink
build: downgrade to Node.js 20 (#232)
Browse files Browse the repository at this point in the history
* build: downgrade to Node.js 20

* deps: add @eslint/js

* style: fix lint configuration
  • Loading branch information
alexplischke authored Jun 13, 2024
1 parent ab142f8 commit 9de7de6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22
v20
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 @@ -23,6 +18,10 @@ module.exports = ts.config(
'no-undef': 'warn',
},
},
{
files: ['tests/**/*.*js', 'tests/**/*.*ts'],
...jest.configs['flat/recommended'],
},
{
languageOptions: {
globals: {
Expand All @@ -31,6 +30,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 @@ -20,7 +20,7 @@
],
"dependencies": {
"@saucelabs/testcomposer": "3.0.0",
"@tsconfig/node22": "^22.0.0",
"@tsconfig/node20": "^20.1.4",
"@types/shelljs": "^0.8.15",
"dotenv": "16.4.5",
"lodash": "4.17.21",
Expand All @@ -38,6 +38,7 @@
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@eslint/js": "^9.4.0",
"@types/chai": "^4.3.16",
"@types/jest": "^29.5.12",
"@types/jquery": "^3.5.30",
Expand Down
2 changes: 2 additions & 0 deletions src/testcafe-runner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { spawn } from 'child_process';
import path from 'path';
import fs from 'fs';
import { URL } from 'node:url';
import { setTimeout } from 'node:timers';
import {
getArgs,
loadRunConfig,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/testcafe-runner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../../../src/testcafe-runner';
import { Suite, CompilerOptions } from '../../../src/type';

export interface ProcessEnv {
interface ProcessEnv {
[key: string]: string | undefined;
}

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/**/*"
],
Expand Down

0 comments on commit 9de7de6

Please sign in to comment.