Skip to content

Commit 64ff17d

Browse files
clydinmgechev
authored andcommitted
refactor(@angular-devkit/architect-cli): minor package cleanup (#15289)
1 parent 125d5d6 commit 64ff17d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/angular_devkit/architect_cli/bin/architect.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
import { Architect, BuilderInfo, BuilderProgressState, Target } from '@angular-devkit/architect';
1010
import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node';
11-
import { json, logging, schema, tags, terminal, workspaces } from '@angular-devkit/core';
11+
import { logging, schema, tags, terminal, workspaces } from '@angular-devkit/core';
1212
import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node';
1313
import { existsSync } from 'fs';
1414
import * as minimist from 'minimist';
@@ -55,8 +55,7 @@ function usage(logger: logging.Logger, exitCode = 0): never {
5555
Any additional option is passed the target, overriding existing options.
5656
`);
5757

58-
process.exit(exitCode);
59-
throw 0; // The node typing sometimes don't have a never type for process.exit().
58+
return process.exit(exitCode);
6059
}
6160

6261
function _targetStringFromTarget({ project, target, configuration }: Target) {
@@ -74,7 +73,7 @@ async function _executeTarget(
7473
workspace: workspaces.WorkspaceDefinition,
7574
root: string,
7675
argv: minimist.ParsedArgs,
77-
registry: json.schema.SchemaRegistry,
76+
registry: schema.SchemaRegistry,
7877
) {
7978
const architectHost = new WorkspaceNodeModulesArchitectHost(workspace, root);
8079
const architect = new Architect(architectHost, registry);

packages/angular_devkit/architect_cli/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
"dependencies": {
1616
"@angular-devkit/architect": "0.0.0",
1717
"@angular-devkit/core": "0.0.0",
18-
"@types/progress": "^2.0.3",
1918
"minimist": "1.2.0",
20-
"progress": "^2.0.3",
19+
"progress": "2.0.3",
2120
"rxjs": "6.4.0",
2221
"symbol-observable": "1.2.0"
22+
},
23+
"devDependencies": {
24+
"@types/progress": "2.0.3"
2325
}
2426
}

packages/angular_devkit/architect_cli/src/progress.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import { terminal } from '@angular-devkit/core';
98
import * as ProgressBar from 'progress';
109
import * as readline from 'readline';
1110

@@ -14,7 +13,7 @@ export class MultiProgressBar<Key, T> {
1413

1514
constructor(private _status: string, private _stream = process.stderr) {}
1615
private _add(id: Key, data: T): { data: T, bar: ProgressBar } {
17-
const width = Math.min(80, terminal.getCapabilities(this._stream).columns || 80);
16+
const width = Math.min(80, this._stream.columns || 80);
1817
const value = {
1918
data,
2019
bar: new ProgressBar(this._status, {

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@
10521052
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.14.0.tgz#85c6998293fc6f2945915419296c7fbb63384f66"
10531053
integrity sha512-6tQyh4Q4B5pECcXBOQDZ5KjyBIxRZGzrweGPM47sAYTdVG4+7R+2EGMTmp0h6ZwgqHrFRCeg2gdhsG9xXEl2Sg==
10541054

1055-
"@types/progress@^2.0.3":
1055+
"@types/progress@2.0.3", "@types/progress@^2.0.3":
10561056
version "2.0.3"
10571057
resolved "https://registry.yarnpkg.com/@types/progress/-/progress-2.0.3.tgz#7ccbd9c6d4d601319126c469e73b5bb90dfc8ccc"
10581058
integrity sha512-bPOsfCZ4tsTlKiBjBhKnM8jpY5nmIll166IPD58D92hR7G7kZDfx5iB9wGF4NfZrdKolebjeAr3GouYkSGoJ/A==
@@ -8802,7 +8802,7 @@ process@^0.11.10:
88028802
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
88038803
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
88048804

8805-
progress@^2.0.1, progress@^2.0.3:
8805+
progress@2.0.3, progress@^2.0.1:
88068806
version "2.0.3"
88078807
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
88088808
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==

0 commit comments

Comments
 (0)