Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"loader-utils": "3.3.1",
"mini-css-extract-plugin": "2.9.2",
"open": "10.1.2",
"ora": "5.4.1",
"ora": "8.2.0",
"picomatch": "4.0.2",
"piscina": "5.0.0",
"postcss": "8.5.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/src/utils/spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* found in the LICENSE file at https://angular.dev/license
*/

import ora from 'ora';
import ora, { type Ora } from 'ora';
import { colors } from './color';
import { isTTY } from './tty';

export class Spinner {
private readonly spinner: ora.Ora;
private readonly spinner: Ora;

/** When false, only fail messages will be displayed. */
enabled = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@angular-devkit/core": "workspace:0.0.0-PLACEHOLDER",
"jsonc-parser": "3.3.1",
"magic-string": "0.30.17",
"ora": "5.4.1",
"ora": "8.2.0",
"rxjs": "7.8.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { BaseException } from '@angular-devkit/core';
import { SpawnOptions, spawn } from 'node:child_process';
import * as path from 'node:path';
import ora from 'ora';
import { Observable } from 'rxjs';
import { TaskExecutor, UnsuccessfulWorkflowExecution } from '../../src';
import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options';

Expand Down Expand Up @@ -127,7 +126,7 @@ export default function (
args.push('--force');
}

return new Observable((obs) => {
return new Promise<void>((resolve, reject) => {
const spinner = ora({
text: `Installing packages (${taskPackageManagerName})...`,
// Workaround for https://github.com/sindresorhus/ora/issues/136.
Expand All @@ -139,14 +138,13 @@ export default function (
if (code === 0) {
spinner.succeed('Packages installed successfully.');
spinner.stop();
obs.next();
obs.complete();
resolve();
} else {
if (options.hideOutput) {
bufferedOutput.forEach(({ stream, data }) => stream.write(data));
}
spinner.fail('Package install failed, see above.');
obs.error(new UnsuccessfulWorkflowExecution());
reject(new UnsuccessfulWorkflowExecution());
}
},
);
Expand Down
57 changes: 53 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.