Skip to content

Commit 377574c

Browse files
authored
chore: replace ora with yocto-spinner (#1186)
1 parent 774aa6c commit 377574c

3 files changed

Lines changed: 25 additions & 92 deletions

File tree

‎lib/cli.js‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ora from 'ora';
21
import { styleText } from 'node:util';
2+
import yoctoSpinner from 'yocto-spinner';
33
import * as inquirer from '@inquirer/prompts';
44

55
import { warning, error, info, success } from './figures.js';
@@ -29,7 +29,7 @@ export default class CLI {
2929
constructor(stream, options = {}) {
3030
const spinnerOptions = options.spinner ?? {};
3131
this.stream = stream || process.stderr;
32-
this.spinner = ora({ stream: this.stream, ...spinnerOptions });
32+
this.spinner = yoctoSpinner({ stream: this.stream, ...spinnerOptions });
3333
this.SPINNER_STATUS = SPINNER_STATUS;
3434
this.QUESTION_TYPE = QUESTION_TYPE;
3535
this.figureIndent = ' ';
@@ -154,10 +154,7 @@ export default class CLI {
154154
case INFO:
155155
symbol = info;
156156
}
157-
const text = ' ' + rawText;
158-
this.spinner.stopAndPersist({
159-
symbol, text
160-
});
157+
this.spinner.stop(`${symbol} ${rawText}`);
161158
}
162159

163160
write(text) {

‎package-lock.json‎

Lines changed: 20 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
"htmlparser2": "^12.0.0",
4747
"js-yaml": "^5.2.1",
4848
"listr2": "^11.1.0",
49-
"ora": "^9.0.0",
5049
"semver": "^7.7.1",
5150
"smol-toml": "^1.7.0",
5251
"undici": "^8.3.0",
53-
"yargs": "^18.0.0"
52+
"yargs": "^18.0.0",
53+
"yocto-spinner": "^1.2.2"
5454
},
5555
"devDependencies": {
5656
"@eslint/js": "^9.39.4",

0 commit comments

Comments
 (0)