Skip to content

Commit 2a23579

Browse files
committed
build: update ora to version 8
This commit update ora to version 8.
1 parent 7e69aa0 commit 2a23579

File tree

5 files changed

+60
-13
lines changed

5 files changed

+60
-13
lines changed

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"loader-utils": "3.3.1",
4242
"mini-css-extract-plugin": "2.9.2",
4343
"open": "10.1.2",
44-
"ora": "5.4.1",
44+
"ora": "8.2.0",
4545
"picomatch": "4.0.2",
4646
"piscina": "5.0.0",
4747
"postcss": "8.5.3",

packages/angular_devkit/build_angular/src/utils/spinner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import ora from 'ora';
9+
import ora, { type Ora } from 'ora';
1010
import { colors } from './color';
1111
import { isTTY } from './tty';
1212

1313
export class Spinner {
14-
private readonly spinner: ora.Ora;
14+
private readonly spinner: Ora;
1515

1616
/** When false, only fail messages will be displayed. */
1717
enabled = true;

packages/angular_devkit/schematics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@angular-devkit/core": "workspace:0.0.0-PLACEHOLDER",
1717
"jsonc-parser": "3.3.1",
1818
"magic-string": "0.30.17",
19-
"ora": "5.4.1",
19+
"ora": "8.2.0",
2020
"rxjs": "7.8.2"
2121
}
2222
}

packages/angular_devkit/schematics/tasks/package-manager/executor.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { BaseException } from '@angular-devkit/core';
1010
import { SpawnOptions, spawn } from 'node:child_process';
1111
import * as path from 'node:path';
1212
import ora from 'ora';
13-
import { Observable } from 'rxjs';
1413
import { TaskExecutor, UnsuccessfulWorkflowExecution } from '../../src';
1514
import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options';
1615

@@ -127,7 +126,7 @@ export default function (
127126
args.push('--force');
128127
}
129128

130-
return new Observable((obs) => {
129+
return new Promise<void>((resolve, reject) => {
131130
const spinner = ora({
132131
text: `Installing packages (${taskPackageManagerName})...`,
133132
// Workaround for https://github.com/sindresorhus/ora/issues/136.
@@ -139,14 +138,13 @@ export default function (
139138
if (code === 0) {
140139
spinner.succeed('Packages installed successfully.');
141140
spinner.stop();
142-
obs.next();
143-
obs.complete();
141+
resolve();
144142
} else {
145143
if (options.hideOutput) {
146144
bufferedOutput.forEach(({ stream, data }) => stream.write(data));
147145
}
148146
spinner.fail('Package install failed, see above.');
149-
obs.error(new UnsuccessfulWorkflowExecution());
147+
reject(new UnsuccessfulWorkflowExecution());
150148
}
151149
},
152150
);

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)