Skip to content

Commit ff286ef

Browse files
authored
fix: use fast-wrap-ansi in box prompt (#370)
1 parent 1a45f93 commit ff286ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/prompts/src/box.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Writable } from 'node:stream';
22
import { getColumns } from '@clack/core';
3-
import wrap from 'wrap-ansi';
3+
import {wrapAnsi} from 'fast-wrap-ansi';
44
import {
55
type CommonOptions,
66
S_BAR,
@@ -105,7 +105,7 @@ export const box = (message = '', title = '', opts?: BoxOptions) => {
105105
titlePadding,
106106
opts?.titleAlign
107107
);
108-
const wrappedMessage = wrap(message, innerWidth - contentPadding * 2, {
108+
const wrappedMessage = wrapAnsi(message, innerWidth - contentPadding * 2, {
109109
hard: true,
110110
trim: false,
111111
});

0 commit comments

Comments
 (0)