Skip to content

Commit

Permalink
refactor(@angular/cli): improve console status logging for add command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
clydin committed Jun 17, 2024
1 parent fb2981d commit af10166
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 182 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"@discoveryjs/json-ext": "0.5.7",
"@inquirer/confirm": "3.1.9",
"@inquirer/prompts": "5.0.5",
"@listr2/prompt-adapter-inquirer": "2.0.8",
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@types/babel__core": "7.20.5",
Expand Down Expand Up @@ -157,6 +158,7 @@
"less": "4.2.0",
"less-loader": "12.2.0",
"license-webpack-plugin": "4.0.2",
"listr2": "8.2.1",
"lmdb": "3.0.12",
"loader-utils": "3.3.1",
"lodash": "^4.17.21",
Expand Down
2 changes: 2 additions & 0 deletions packages/angular/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ts_library(
"//packages/angular_devkit/schematics/tools",
"@npm//@angular/core",
"@npm//@inquirer/prompts",
"@npm//@listr2/prompt-adapter-inquirer",
"@npm//@types/ini",
"@npm//@types/node",
"@npm//@types/npm-package-arg",
Expand All @@ -67,6 +68,7 @@ ts_library(
"@npm//ansi-colors",
"@npm//ini",
"@npm//jsonc-parser",
"@npm//listr2",
"@npm//npm-package-arg",
"@npm//ora",
"@npm//pacote",
Expand Down
2 changes: 2 additions & 0 deletions packages/angular/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER",
"@inquirer/prompts": "5.0.5",
"@listr2/prompt-adapter-inquirer": "2.0.8",
"@schematics/angular": "0.0.0-PLACEHOLDER",
"@yarnpkg/lockfile": "1.1.0",
"ansi-colors": "4.1.3",
"ini": "4.1.3",
"jsonc-parser": "3.2.1",
"listr2": "8.2.1",
"npm-package-arg": "11.0.2",
"npm-pick-manifest": "9.0.1",
"ora": "5.4.1",
Expand Down
Loading

0 comments on commit af10166

Please sign in to comment.