Skip to content

Commit af10166

Browse files
committed
refactor(@angular/cli): improve console status logging for add command
The step-based console UI of the add command has been refactored to use the `listr2` library. Previously, an `ora` spinner was manually used and needed to handle a variety of error conditions and could not handle the potential for concurrent tasks as well as streaming subcommands cleanly while the spinner was in use. Behavior of the add command has not been changed during this refactor. Further improvements are possible including the integration of the schematic execution within the step-based UI.
1 parent fb2981d commit af10166

File tree

7 files changed

+413
-182
lines changed

7 files changed

+413
-182
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"@discoveryjs/json-ext": "0.5.7",
8787
"@inquirer/confirm": "3.1.9",
8888
"@inquirer/prompts": "5.0.5",
89+
"@listr2/prompt-adapter-inquirer": "2.0.8",
8990
"@rollup/plugin-commonjs": "^26.0.0",
9091
"@rollup/plugin-node-resolve": "^13.0.5",
9192
"@types/babel__core": "7.20.5",
@@ -157,6 +158,7 @@
157158
"less": "4.2.0",
158159
"less-loader": "12.2.0",
159160
"license-webpack-plugin": "4.0.2",
161+
"listr2": "8.2.1",
160162
"lmdb": "3.0.12",
161163
"loader-utils": "3.3.1",
162164
"lodash": "^4.17.21",

packages/angular/cli/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ ts_library(
5555
"//packages/angular_devkit/schematics/tools",
5656
"@npm//@angular/core",
5757
"@npm//@inquirer/prompts",
58+
"@npm//@listr2/prompt-adapter-inquirer",
5859
"@npm//@types/ini",
5960
"@npm//@types/node",
6061
"@npm//@types/npm-package-arg",
@@ -67,6 +68,7 @@ ts_library(
6768
"@npm//ansi-colors",
6869
"@npm//ini",
6970
"@npm//jsonc-parser",
71+
"@npm//listr2",
7072
"@npm//npm-package-arg",
7173
"@npm//ora",
7274
"@npm//pacote",

packages/angular/cli/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
2727
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
2828
"@inquirer/prompts": "5.0.5",
29+
"@listr2/prompt-adapter-inquirer": "2.0.8",
2930
"@schematics/angular": "0.0.0-PLACEHOLDER",
3031
"@yarnpkg/lockfile": "1.1.0",
3132
"ansi-colors": "4.1.3",
3233
"ini": "4.1.3",
3334
"jsonc-parser": "3.2.1",
35+
"listr2": "8.2.1",
3436
"npm-package-arg": "11.0.2",
3537
"npm-pick-manifest": "9.0.1",
3638
"ora": "5.4.1",

0 commit comments

Comments
 (0)