Skip to content
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- Node.js 22+
- Node.js 20+
- [pnpm](https://pnpm.io/)

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^20.17.0 or >=22.9.0.

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { errors } = await esbuild.build({
outdir: outDir,
format: 'esm',
platform: 'node',
target: ['node22'],
target: ['node20'],
sourcemap: true,
bundle: true,
// Bundle, but keep un-bundled all public dependencies.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"author": "Degu Labs, Inc",
"license": "MIT",
"engines": {
"node": ">=22"
"node": "^20.17.0 || >=22.9.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Node 20 out of engines until the CJS entry works

This newly advertises ^20.17.0 as a supported runtime, but the package still exposes require conditions that point at ESM files (package.json:10-18 under "type": "module"). In Node 20.17/20.18, require('@flakiness/sdk') or require('@flakiness/sdk/browser') will still throw ERR_REQUIRE_ESM, so CommonJS consumers in the newly supported 20.x range can install a package that they cannot actually import.

Useful? React with 👍 / 👎.

},
"devDependencies": {
"@flakiness/flakiness-report": "^0.28.0",
Expand Down
4 changes: 1 addition & 3 deletions src/stripAnsi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* ```
*/
Expand Down