fix(reporter-default): don't dim decimal points in durations in the default reporter

This commit is contained in:
Joakim Carlstein 2024-01-26 15:11:43 +01:00 committed by Joakim Carlstein
parent 1f139fd975
commit 2f6b4d23e0
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@emigrate/cli': patch
---
Don't dim decimal points in durations in the default reporter

View file

@ -21,7 +21,7 @@ const spinner = interactive ? elegantSpinner() : () => figures.pointerSmall;
const formatDuration = (duration: number): string => { const formatDuration = (duration: number): string => {
const pretty = prettyMs(duration); const pretty = prettyMs(duration);
return yellow(pretty.replaceAll(/([^\s\d]+)/g, dim('$1'))); return yellow(pretty.replaceAll(/([^\s\d.]+)/g, dim('$1')));
}; };
const getTitle = ({ command, version, dry, cwd }: ReporterInitParameters) => { const getTitle = ({ command, version, dry, cwd }: ReporterInitParameters) => {