From a8563ba85681747427d034983a302596db7b8e72 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Sun, 22 Mar 2026 13:05:00 -0600 Subject: [PATCH 1/4] chore: relax Node.js version to 18+ This is a more conservative choice and follows what Playwright folks do for their userbase. --- CONTRIBUTING.md | 2 +- README.md | 2 +- build.mts | 2 +- package.json | 2 +- src/showReport.ts | 4 +++- src/stripAnsi.ts | 4 +--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f861f84..53eb6a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Prerequisites -- Node.js 22+ +- Node.js 18+ - [pnpm](https://pnpm.io/) ## Getting Started diff --git a/README.md b/README.md index 8ca7190..6c18216 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Flakiness SDK provides a comprehensive set of tools for creating and managin npm i @flakiness/sdk @flakiness/flakiness-report ``` -Requires Node.js 22+. +Requires Node.js 18+. ## Quick Start diff --git a/build.mts b/build.mts index 1d50a20..547fd6e 100755 --- a/build.mts +++ b/build.mts @@ -26,7 +26,7 @@ const { errors } = await esbuild.build({ outdir: outDir, format: 'esm', platform: 'node', - target: ['node22'], + target: ['node18'], sourcemap: true, bundle: true, // Bundle, but keep un-bundled all public dependencies. diff --git a/package.json b/package.json index 07f7fdd..216a567 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "author": "Degu Labs, Inc", "license": "MIT", "engines": { - "node": ">=22" + "node": ">=18" }, "devDependencies": { "@flakiness/flakiness-report": "^0.28.0", diff --git a/src/showReport.ts b/src/showReport.ts index 911e792..c726438 100644 --- a/src/showReport.ts +++ b/src/showReport.ts @@ -1,8 +1,10 @@ -import { styleText } from 'node:util'; +import * as nodeUtil from 'node:util'; import open from "open"; import { randomUUIDBase62 } from './_internalUtils.js'; import { StaticServer } from './staticServer.js'; +const styleText = nodeUtil.styleText ?? ((_format, text, _options) => text); + /** * Opens and displays a Flakiness report in the default web browser. * diff --git a/src/stripAnsi.ts b/src/stripAnsi.ts index c0f1e28..aa96e27 100644 --- a/src/stripAnsi.ts +++ b/src/stripAnsi.ts @@ -13,9 +13,7 @@ const ansiRegex = new RegExp('[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*( * * @example * ```typescript - * import { styleText } from 'node:util'; - * - * const clean = stripAnsi(styleText('red', 'Error: test failed')); + * const clean = stripAnsi('\u001B[31mError: test failed\u001B[39m'); * // Returns: 'Error: test failed' (without color codes) * ``` */ From 8a69bf18bf857a776b44d8fe9b5be29cd27a524f Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Sun, 22 Mar 2026 13:34:42 -0600 Subject: [PATCH 2/4] fix comments --- README.md | 2 +- package.json | 2 +- src/showReport.ts | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6c18216..0df9f1b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Flakiness SDK provides a comprehensive set of tools for creating and managin npm i @flakiness/sdk @flakiness/flakiness-report ``` -Requires Node.js 18+. +Requires Node.js ^20.17.0 or >=22.9.0. ## Quick Start diff --git a/package.json b/package.json index 216a567..5b41c57 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "author": "Degu Labs, Inc", "license": "MIT", "engines": { - "node": ">=18" + "node": "^20.17.0 || >=22.9.0" }, "devDependencies": { "@flakiness/flakiness-report": "^0.28.0", diff --git a/src/showReport.ts b/src/showReport.ts index c726438..911e792 100644 --- a/src/showReport.ts +++ b/src/showReport.ts @@ -1,10 +1,8 @@ -import * as nodeUtil from 'node:util'; +import { styleText } from 'node:util'; import open from "open"; import { randomUUIDBase62 } from './_internalUtils.js'; import { StaticServer } from './staticServer.js'; -const styleText = nodeUtil.styleText ?? ((_format, text, _options) => text); - /** * Opens and displays a Flakiness report in the default web browser. * From bc2ef8cd4ac3c5de8ece76fed119506d6a37ef57 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Sun, 22 Mar 2026 13:38:40 -0600 Subject: [PATCH 3/4] fix build target --- build.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.mts b/build.mts index 547fd6e..29f94c8 100755 --- a/build.mts +++ b/build.mts @@ -26,7 +26,7 @@ const { errors } = await esbuild.build({ outdir: outDir, format: 'esm', platform: 'node', - target: ['node18'], + target: ['node20'], sourcemap: true, bundle: true, // Bundle, but keep un-bundled all public dependencies. From 8784f8abc08b085c003b16514f4b372c4ce417ac Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Sun, 22 Mar 2026 12:48:35 -0700 Subject: [PATCH 4/4] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53eb6a8..cfc6e6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Prerequisites -- Node.js 18+ +- Node.js 20+ - [pnpm](https://pnpm.io/) ## Getting Started