Commit 58d101d
committed
feat(@angular/cli): add
This commit introduces a `--json` option to the `ng version` command. When this flag is used, the command will output all version information in a machine-readable JSON format.
The JSON structure is designed to be a stable, well-organized public API, with information grouped into `cli`, `system`, and `packages` categories. This is useful for scripting, tool integration, and creating detailed, parsable bug reports.
The standard, human-readable output is still the default.--json output to ng version
1 parent 68b7d48 commit 58d101dCopy full SHA for 58d101d
File tree
Expand file treeCollapse file tree
2 files changed
+59
-29
lines changedOpen diff view settings
Filter options
- packages/angular/cli/src/commands/version
Expand file treeCollapse file tree
2 files changed
+59
-29
lines changedOpen diff view settings
Collapse file
packages/angular/cli/src/commands/version/cli.ts
Copy file name to clipboardExpand all lines: packages/angular/cli/src/commands/version/cli.ts+21-11Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | | - |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
49 | 52 | |
50 | 53 | |
51 | 54 | |
52 | 55 | |
53 | 56 | |
54 | | - |
| 57 | + |
55 | 58 | |
56 | 59 | |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
57 | 68 | |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
66 | 76 | |
67 | 77 | |
68 | 78 | |
| ||
87 | 97 | |
88 | 98 | |
89 | 99 | |
90 | | - |
| 100 | + |
91 | 101 | |
92 | 102 | |
93 | 103 | |
|
Collapse file
packages/angular/cli/src/commands/version/version-info.ts
Copy file name to clipboardExpand all lines: packages/angular/cli/src/commands/version/version-info.ts+38-18Lines changed: 38 additions & 18 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
34 | 44 | |
35 | 45 | |
36 | 46 | |
| ||
81 | 91 | |
82 | 92 | |
83 | 93 | |
84 | | - |
| 94 | + |
85 | 95 | |
86 | 96 | |
87 | | - |
| 97 | + |
88 | 98 | |
89 | 99 | |
90 | 100 | |
91 | 101 | |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
100 | 120 | |
101 | 121 | |
102 | 122 | |
|
0 commit comments