@angular/cli 15.0.0-next.5 → 15.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "15.0.0-next.5",
3
+ "version": "15.0.0-rc.0",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,20 +25,20 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1500.0-next.5",
29
- "@angular-devkit/core": "15.0.0-next.5",
30
- "@angular-devkit/schematics": "15.0.0-next.5",
31
- "@schematics/angular": "15.0.0-next.5",
28
+ "@angular-devkit/architect": "0.1500.0-rc.0",
29
+ "@angular-devkit/core": "15.0.0-rc.0",
30
+ "@angular-devkit/schematics": "15.0.0-rc.0",
31
+ "@schematics/angular": "15.0.0-rc.0",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "ini": "3.0.1",
35
35
  "inquirer": "8.2.4",
36
36
  "jsonc-parser": "3.2.0",
37
37
  "npm-package-arg": "9.1.2",
38
- "npm-pick-manifest": "7.0.2",
38
+ "npm-pick-manifest": "8.0.0",
39
39
  "open": "8.4.0",
40
40
  "ora": "5.4.1",
41
- "pacote": "14.0.0",
41
+ "pacote": "15.0.0",
42
42
  "resolve": "1.22.1",
43
43
  "semver": "7.3.8",
44
44
  "symbol-observable": "4.0.0",
@@ -47,12 +47,12 @@
47
47
  "ng-update": {
48
48
  "migrations": "@schematics/angular/migrations/migration-collection.json",
49
49
  "packageGroup": {
50
- "@angular/cli": "15.0.0-next.5",
51
- "@angular-devkit/architect": "0.1500.0-next.5",
52
- "@angular-devkit/build-angular": "15.0.0-next.5",
53
- "@angular-devkit/build-webpack": "0.1500.0-next.5",
54
- "@angular-devkit/core": "15.0.0-next.5",
55
- "@angular-devkit/schematics": "15.0.0-next.5"
50
+ "@angular/cli": "15.0.0-rc.0",
51
+ "@angular-devkit/architect": "0.1500.0-rc.0",
52
+ "@angular-devkit/build-angular": "15.0.0-rc.0",
53
+ "@angular-devkit/build-webpack": "0.1500.0-rc.0",
54
+ "@angular-devkit/core": "15.0.0-rc.0",
55
+ "@angular-devkit/schematics": "15.0.0-rc.0"
56
56
  }
57
57
  },
58
58
  "engines": {
@@ -13,6 +13,7 @@ export declare class AnalyticsCollector {
13
13
  private readonly requestParameterStringified;
14
14
  private readonly userParameters;
15
15
  constructor(context: CommandContext, userId: string);
16
+ reportWorkspaceInfoEvent(parameters: Partial<Record<EventCustomMetric, string | boolean | number | undefined>>): void;
16
17
  reportRebuildRunEvent(parameters: Partial<Record<EventCustomMetric & EventCustomDimension, string | boolean | number | undefined>>): void;
17
18
  reportBuildRunEvent(parameters: Partial<Record<EventCustomMetric & EventCustomDimension, string | boolean | number | undefined>>): void;
18
19
  reportArchitectRunEvent(parameters: Partial<Record<EventCustomDimension, PrimitiveTypes>>): void;
@@ -67,6 +67,8 @@ class AnalyticsCollector {
67
67
  // While architecture is being collect by GA as UserAgentArchitecture.
68
68
  // It doesn't look like there is a way to query this. Therefore we collect this as a custom user dimension too.
69
69
  [analytics_parameters_1.UserCustomDimension.OsArchitecture]: os.arch(),
70
+ // While User ID is being collected by GA, this is not visible in reports/for filtering.
71
+ [analytics_parameters_1.UserCustomDimension.UserId]: userId,
70
72
  [analytics_parameters_1.UserCustomDimension.NodeVersion]: nodeVersion,
71
73
  [analytics_parameters_1.UserCustomDimension.NodeMajorVersion]: +nodeVersion.split('.', 1)[0],
72
74
  [analytics_parameters_1.UserCustomDimension.PackageManager]: context.packageManager.name,
@@ -78,6 +80,9 @@ class AnalyticsCollector {
78
80
  [analytics_parameters_1.UserCustomDimension.AngularCLIMajorVersion]: version_1.VERSION.major,
79
81
  };
80
82
  }
83
+ reportWorkspaceInfoEvent(parameters) {
84
+ this.event('workspace_info', parameters);
85
+ }
81
86
  reportRebuildRunEvent(parameters) {
82
87
  this.event('run_rebuild', parameters);
83
88
  }
@@ -45,6 +45,7 @@ export declare enum RequestParameter {
45
45
  * @see https://support.google.com/analytics/answer/10075209?hl=en
46
46
  */
47
47
  export declare enum UserCustomDimension {
48
+ UserId = "up.ng_user_id",
48
49
  OsArchitecture = "up.ng_os_architecture",
49
50
  NodeVersion = "up.ng_node_version",
50
51
  NodeMajorVersion = "upn.ng_node_major_version",
@@ -91,5 +92,8 @@ export declare enum EventCustomMetric {
91
92
  DurationInMs = "epn.ng_duration_ms",
92
93
  CssSizeInBytes = "epn.ng_css_size_bytes",
93
94
  JsSizeInBytes = "epn.ng_js_size_bytes",
94
- NgComponentCount = "epn.ng_component_count"
95
+ NgComponentCount = "epn.ng_component_count",
96
+ AllProjectsCount = "epn.all_projects_count",
97
+ LibraryProjectsCount = "epn.libs_projects_count",
98
+ ApplicationProjectsCount = "epn.apps_projects_count"
95
99
  }
@@ -49,6 +49,7 @@ var RequestParameter;
49
49
  */
50
50
  var UserCustomDimension;
51
51
  (function (UserCustomDimension) {
52
+ UserCustomDimension["UserId"] = "up.ng_user_id";
52
53
  UserCustomDimension["OsArchitecture"] = "up.ng_os_architecture";
53
54
  UserCustomDimension["NodeVersion"] = "up.ng_node_version";
54
55
  UserCustomDimension["NodeMajorVersion"] = "upn.ng_node_major_version";
@@ -98,4 +99,7 @@ var EventCustomMetric;
98
99
  EventCustomMetric["CssSizeInBytes"] = "epn.ng_css_size_bytes";
99
100
  EventCustomMetric["JsSizeInBytes"] = "epn.ng_js_size_bytes";
100
101
  EventCustomMetric["NgComponentCount"] = "epn.ng_component_count";
102
+ EventCustomMetric["AllProjectsCount"] = "epn.all_projects_count";
103
+ EventCustomMetric["LibraryProjectsCount"] = "epn.libs_projects_count";
104
+ EventCustomMetric["ApplicationProjectsCount"] = "epn.apps_projects_count";
101
105
  })(EventCustomMetric = exports.EventCustomMetric || (exports.EventCustomMetric = {}));
@@ -185,7 +185,7 @@ async function getAnalyticsUserId(context, skipPrompt = false) {
185
185
  return localOrGlobalConfig;
186
186
  }
187
187
  }
188
- return globalConfig || (0, crypto_1.randomUUID)();
188
+ return globalConfig;
189
189
  }
190
190
  exports.getAnalyticsUserId = getAnalyticsUserId;
191
191
  function analyticsConfigValueToHumanFormat(value) {
@@ -90,6 +90,8 @@ export declare abstract class CommandModule<T extends {} = {}> implements Comman
90
90
  * flush and call flush one last time.
91
91
  */
92
92
  protected getAnalyticsParameters(options: (Options<T> & OtherOptions) | OtherOptions): Partial<Record<EventCustomDimension | EventCustomMetric, string | boolean | number>>;
93
+ private reportCommandRunAnalytics;
94
+ private reportWorkspaceInfoAnalytics;
93
95
  }
94
96
  /**
95
97
  * Creates an known command module error.
@@ -108,20 +108,9 @@ class CommandModule {
108
108
  const stopPeriodicFlushes = analytics && analytics.periodFlush();
109
109
  let exitCode;
110
110
  try {
111
- // Run and time command.
112
111
  if (analytics) {
113
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
- const internalMethods = yargs_1.default.getInternalMethods();
115
- // $0 generate component [name] -> generate_component
116
- // $0 add <collection> -> add
117
- const fullCommand = internalMethods.getUsageInstance().getUsage()[0][0]
118
- .split(' ')
119
- .filter((x) => {
120
- const code = x.charCodeAt(0);
121
- return code >= 97 && code <= 122;
122
- })
123
- .join('_');
124
- analytics.reportCommandRunEvent(fullCommand);
112
+ this.reportCommandRunAnalytics(analytics);
113
+ this.reportWorkspaceInfoAnalytics(analytics);
125
114
  }
126
115
  exitCode = await this.run(camelCasedOptions);
127
116
  }
@@ -231,6 +220,43 @@ class CommandModule {
231
220
  }
232
221
  return parameters;
233
222
  }
223
+ reportCommandRunAnalytics(analytics) {
224
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
225
+ const internalMethods = yargs_1.default.getInternalMethods();
226
+ // $0 generate component [name] -> generate_component
227
+ // $0 add <collection> -> add
228
+ const fullCommand = internalMethods.getUsageInstance().getUsage()[0][0]
229
+ .split(' ')
230
+ .filter((x) => {
231
+ const code = x.charCodeAt(0);
232
+ return code >= 97 && code <= 122;
233
+ })
234
+ .join('_');
235
+ analytics.reportCommandRunEvent(fullCommand);
236
+ }
237
+ reportWorkspaceInfoAnalytics(analytics) {
238
+ const { workspace } = this.context;
239
+ if (!workspace) {
240
+ return;
241
+ }
242
+ let applicationProjectsCount = 0;
243
+ let librariesProjectsCount = 0;
244
+ for (const project of workspace.projects.values()) {
245
+ switch (project.extensions['projectType']) {
246
+ case 'application':
247
+ applicationProjectsCount++;
248
+ break;
249
+ case 'library':
250
+ librariesProjectsCount++;
251
+ break;
252
+ }
253
+ }
254
+ analytics.reportWorkspaceInfoEvent({
255
+ [analytics_parameters_1.EventCustomMetric.AllProjectsCount]: librariesProjectsCount + applicationProjectsCount,
256
+ [analytics_parameters_1.EventCustomMetric.ApplicationProjectsCount]: applicationProjectsCount,
257
+ [analytics_parameters_1.EventCustomMetric.LibraryProjectsCount]: librariesProjectsCount,
258
+ });
259
+ }
234
260
  }
235
261
  __decorate([
236
262
  memoize_1.memoize