chore: drop chalk from dependencies#12
Conversation
There's a nice native replacement now.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fa0faea92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,4 +1,4 @@ | |||
| import chalk from 'chalk'; | |||
| import { styleText } from 'node:util'; | |||
There was a problem hiding this comment.
Avoid making the top-level SDK import require
util.styleText
Because src/index.ts:11 re-exports showReport, this named import is evaluated whenever consumers import @flakiness/sdk, even if they never call showReport(). util.styleText is only available on newer Node releases (v20.12+), so Node 18 / early Node 20 users can still install this package version and then hit an immediate module-load failure after this patch. If the runtime floor is intentionally changing, it needs to be enforced in package metadata or guarded with a fallback instead of silently breaking the main entrypoint.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce3428627c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "engines": { | ||
| "node": ">=22" | ||
| }, |
There was a problem hiding this comment.
Keep the Node 22 floor off the browser-only entrypoint
This makes the entire package un-installable on older build runtimes via engines, even though package.json still exposes ./browser and that path (src/browser.ts/src/reportUtilsBrowser.ts) never touches styleText. In projects that only consume @flakiness/sdk/browser from Node 18/20-based toolchains, package managers with engine enforcement will now reject the install for a change that only affected showReport().
Useful? React with 👍 / 👎.
There's a nice native replacement now.
Since node.js 20 will end-of-life on April, 2026, we default to node 22+.