From 90e5033751161f06741a765e7c3f79216a1505e8 Mon Sep 17 00:00:00 2001 From: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> Date: Tue, 28 Apr 2026 18:13:34 -0500 Subject: [PATCH 1/3] feat(preferred): add wrap-ansi replacement to fast-wrap-ansi --- docs/modules/wrap-ansi.md | 20 ++++++++++++++++++++ manifests/preferred.json | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 docs/modules/wrap-ansi.md diff --git a/docs/modules/wrap-ansi.md b/docs/modules/wrap-ansi.md new file mode 100644 index 0000000..157032a --- /dev/null +++ b/docs/modules/wrap-ansi.md @@ -0,0 +1,20 @@ +--- +description: Modern replacement for the wrap-ansi package for wrapping terminal strings (including ANSI-colored output) +--- + +# Replacements for `wrap-ansi` + +## `fast-wrap-ansi` + +[`fast-wrap-ansi`](https://www.npmjs.com/package/fast-wrap-ansi) is a focused replacement for `wrap-ansi` that preserves the same usage pattern while reducing dependency overhead. + +For most codebases, this is a direct import swap and works with the same common options: + +```ts +import wrapAnsi from 'wrap-ansi' // [!code --] +import wrapAnsi from 'fast-wrap-ansi' // [!code ++] + +const value = '\u001B[36mhello-super-long-token-without-spaces\u001B[39m' + +console.log(wrapAnsi(value, 12, { hard: true, trim: false })) +``` diff --git a/manifests/preferred.json b/manifests/preferred.json index e275345..c14a977 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -2690,6 +2690,12 @@ "replacements": ["fetch", "ofetch", "ky"], "url": {"type": "e18e", "id": "fetch"} }, + "wrap-ansi": { + "type": "module", + "moduleName": "wrap-ansi", + "replacements": ["fast-wrap-ansi"], + "url": {"type": "e18e", "id": "wrap-ansi"} + }, "xmldom": { "type": "module", "moduleName": "xmldom", @@ -3027,6 +3033,11 @@ "type": "documented", "replacementModule": "fast-uri" }, + "fast-wrap-ansi": { + "id": "fast-wrap-ansi", + "type": "documented", + "replacementModule": "fast-wrap-ansi" + }, "fdir": {"id": "fdir", "type": "documented", "replacementModule": "fdir"}, "fetch": { "id": "fetch", From b7bff1d6519ee8b3ede8cdad393da1d3400770c5 Mon Sep 17 00:00:00 2001 From: paul valladares <85648028+dreyfus92@users.noreply.github.com> Date: Tue, 28 Apr 2026 18:20:12 -0500 Subject: [PATCH 2/3] Update docs/modules/wrap-ansi.md Co-authored-by: Roman --- docs/modules/wrap-ansi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/wrap-ansi.md b/docs/modules/wrap-ansi.md index 157032a..99ee895 100644 --- a/docs/modules/wrap-ansi.md +++ b/docs/modules/wrap-ansi.md @@ -6,7 +6,7 @@ description: Modern replacement for the wrap-ansi package for wrapping terminal ## `fast-wrap-ansi` -[`fast-wrap-ansi`](https://www.npmjs.com/package/fast-wrap-ansi) is a focused replacement for `wrap-ansi` that preserves the same usage pattern while reducing dependency overhead. +[`fast-wrap-ansi`](https://github.com/43081j/fast-wrap-ansi) is a focused replacement for `wrap-ansi` that preserves the same usage pattern while reducing dependency overhead. For most codebases, this is a direct import swap and works with the same common options: From cf267152a10164a5815498b733f466e49ea8fe84 Mon Sep 17 00:00:00 2001 From: paul valladares <85648028+dreyfus92@users.noreply.github.com> Date: Tue, 28 Apr 2026 18:26:03 -0500 Subject: [PATCH 3/3] Update docs/modules/wrap-ansi.md Co-authored-by: Roman --- docs/modules/wrap-ansi.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/modules/wrap-ansi.md b/docs/modules/wrap-ansi.md index 99ee895..3b13bad 100644 --- a/docs/modules/wrap-ansi.md +++ b/docs/modules/wrap-ansi.md @@ -6,9 +6,7 @@ description: Modern replacement for the wrap-ansi package for wrapping terminal ## `fast-wrap-ansi` -[`fast-wrap-ansi`](https://github.com/43081j/fast-wrap-ansi) is a focused replacement for `wrap-ansi` that preserves the same usage pattern while reducing dependency overhead. - -For most codebases, this is a direct import swap and works with the same common options: +[`fast-wrap-ansi`](https://github.com/43081j/fast-wrap-ansi) is a drop‑in replacement for `wrap-ansi` that’s faster and smaller. ```ts import wrapAnsi from 'wrap-ansi' // [!code --]