diff --git a/README.md b/README.md index 8832328..f151c94 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ The Flakiness SDK provides a comprehensive set of tools for creating and managin npm i @flakiness/sdk @flakiness/flakiness-report ``` +Requires Node.js 22+. + ## Quick Start Here's a minimal example of creating a Flakiness JSON Report: @@ -125,4 +127,3 @@ Use this entry point when you need to process or manipulate reports in browser-b ``` If neither method is available, the upload is skipped with a `'skipped'` status. - diff --git a/package.json b/package.json index 8681083..58abe02 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,9 @@ "keywords": [], "author": "Degu Labs, Inc", "license": "MIT", + "engines": { + "node": ">=22" + }, "devDependencies": { "@flakiness/flakiness-report": "^0.27.0", "@flakiness/playwright": "^1.3.2", @@ -45,7 +48,6 @@ "@flakiness/flakiness-report": ">=0.26.0 <1.0.0" }, "dependencies": { - "chalk": "^5.6.2", "debug": "^4.4.3", "open": "^10.2.0", "stable-hash": "^0.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 508511a..9dcd7eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: dependencies: - chalk: - specifier: ^5.6.2 - version: 5.6.2 debug: specifier: ^4.4.3 version: 4.4.3 diff --git a/src/showReport.ts b/src/showReport.ts index dd63307..911e792 100644 --- a/src/showReport.ts +++ b/src/showReport.ts @@ -1,4 +1,4 @@ -import chalk from 'chalk'; +import { styleText } from 'node:util'; import open from "open"; import { randomUUIDBase62 } from './_internalUtils.js'; import { StaticServer } from './staticServer.js'; @@ -38,7 +38,7 @@ export async function showReport(reportFolder: string, options?: { url.searchParams.set('port', String(server.port())); url.searchParams.set('token', token); - console.log(chalk.cyan(` + console.log(styleText('cyan', ` Serving Flakiness report at ${(url.toString())} Press Ctrl+C to quit.`)) await open(url.toString()); diff --git a/src/stripAnsi.ts b/src/stripAnsi.ts index 6b1ed5e..c0f1e28 100644 --- a/src/stripAnsi.ts +++ b/src/stripAnsi.ts @@ -13,7 +13,9 @@ const ansiRegex = new RegExp('[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*( * * @example * ```typescript - * const clean = stripAnsi(chalk.red('Error: test failed')); + * import { styleText } from 'node:util'; + * + * const clean = stripAnsi(styleText('red', 'Error: test failed')); * // Returns: 'Error: test failed' (without color codes) * ``` */