Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: downgrade to Node.js 20 #264

Merged
merged 6 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Expand Up @@ -46,7 +47,7 @@
);
return;
}
let result: any = convert.xml2js(xmlData, { compact: true });

Check warning on line 50 in src/playwright-runner.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
if (!result.testsuites || !result.testsuites.testsuite) {
console.warn('JUnit file generation skipped: no test suites detected.');
return;
Expand All @@ -63,7 +64,7 @@
let totalSkipped = 0;
let totalTime = 0;
for (let i = 0; i < result.testsuites.testsuite.length; i++) {
const testsuite = result.testsuites.testsuite[i] as any;

Check warning on line 67 in src/playwright-runner.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
if (testsuite._attributes) {
totalTests += +testsuite._attributes.tests || 0;
totalFailures += +testsuite._attributes.failures || 0;
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
Loading