aboutsummaryrefslogtreecommitdiff
path: root/packages/create-astro/src
diff options
context:
space:
mode:
authorGravatar Cristopher <32661241+Namchee@users.noreply.github.com> 2024-10-04 16:21:03 +0700
committerGravatar GitHub <noreply@github.com> 2024-10-04 11:21:03 +0200
commitf47b347da899c6e1dcd0b2e7887f7fce6ec8e270 (patch)
tree98b3af845f3fd5ba8b5905f49d539e7a4ac07d0e /packages/create-astro/src
parent657d1973719e20470c3934d086b971e474fee3c6 (diff)
downloadastro-f47b347da899c6e1dcd0b2e7887f7fce6ec8e270.tar.gz
astro-f47b347da899c6e1dcd0b2e7887f7fce6ec8e270.tar.zst
astro-f47b347da899c6e1dcd0b2e7887f7fce6ec8e270.zip
chore(deps): replace strip-ansi with native module (#12118)
* chore(deps): replace strip-ansi with native module * chore: changeset --------- Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
Diffstat (limited to 'packages/create-astro/src')
-rw-r--r--packages/create-astro/src/messages.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts
index ba765f723..898c9c728 100644
--- a/packages/create-astro/src/messages.ts
+++ b/packages/create-astro/src/messages.ts
@@ -1,8 +1,8 @@
import { exec } from 'node:child_process';
+import { stripVTControlCharacters } from 'node:util';
/* eslint no-console: 'off' */
import { color, say as houston, label, spinner as load } from '@astrojs/cli-kit';
import { align, sleep } from '@astrojs/cli-kit/utils';
-import stripAnsi from 'strip-ansi';
import { shell } from './shell.js';
// Users might lack access to the global npm registry, this function
@@ -122,7 +122,7 @@ export const nextSteps = async ({ projectDir, devCmd }: { projectDir: string; de
`\n${prefix}Enter your project directory using`,
color.cyan(`cd ${projectDir}`, ''),
];
- const len = enter[0].length + stripAnsi(enter[1]).length;
+ const len = enter[0].length + stripVTControlCharacters(enter[1]).length;
log(enter.join(len > max ? '\n' + prefix : ' '));
}
log(