From d2ece43e105dfc75924308087016b0db236717de Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:15:50 +0100 Subject: [PATCH] fix: use fast-wrap-ansi in box prompt --- packages/prompts/src/box.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/prompts/src/box.ts b/packages/prompts/src/box.ts index 4a4894bc..97320e9f 100644 --- a/packages/prompts/src/box.ts +++ b/packages/prompts/src/box.ts @@ -1,6 +1,6 @@ import type { Writable } from 'node:stream'; import { getColumns } from '@clack/core'; -import wrap from 'wrap-ansi'; +import {wrapAnsi} from 'fast-wrap-ansi'; import { type CommonOptions, S_BAR, @@ -105,7 +105,7 @@ export const box = (message = '', title = '', opts?: BoxOptions) => { titlePadding, opts?.titleAlign ); - const wrappedMessage = wrap(message, innerWidth - contentPadding * 2, { + const wrappedMessage = wrapAnsi(message, innerWidth - contentPadding * 2, { hard: true, trim: false, });