@angular/cli 14.2.0-rc.0 → 14.2.2

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.
@@ -82,7 +82,7 @@
82
82
  "boolean",
83
83
  "string"
84
84
  ],
85
- "description": "Share anonymous usage data with the Angular Team at Google."
85
+ "description": "Share pseudonymous usage data with the Angular Team at Google."
86
86
  },
87
87
  "analyticsSharing": {
88
88
  "type": "object",
@@ -169,7 +169,7 @@
169
169
  "boolean",
170
170
  "string"
171
171
  ],
172
- "description": "Share anonymous usage data with the Angular Team at Google."
172
+ "description": "Share pseudonymous usage data with the Angular Team at Google."
173
173
  },
174
174
  "analyticsSharing": {
175
175
  "type": "object",
@@ -16,7 +16,7 @@ export interface Schema {
16
16
  }
17
17
  export interface CliOptions {
18
18
  /**
19
- * Share anonymous usage data with the Angular Team at Google.
19
+ * Share pseudonymous usage data with the Angular Team at Google.
20
20
  */
21
21
  analytics?: Analytics;
22
22
  analyticsSharing?: AnalyticsSharing;
@@ -42,7 +42,7 @@ export interface CliOptions {
42
42
  warnings?: Warnings;
43
43
  }
44
44
  /**
45
- * Share anonymous usage data with the Angular Team at Google.
45
+ * Share pseudonymous usage data with the Angular Team at Google.
46
46
  */
47
47
  export declare type Analytics = boolean | string;
48
48
  export interface AnalyticsSharing {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "14.2.0-rc.0",
3
+ "version": "14.2.2",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1402.0-rc.0",
29
- "@angular-devkit/core": "14.2.0-rc.0",
30
- "@angular-devkit/schematics": "14.2.0-rc.0",
31
- "@schematics/angular": "14.2.0-rc.0",
28
+ "@angular-devkit/architect": "0.1402.2",
29
+ "@angular-devkit/core": "14.2.2",
30
+ "@angular-devkit/schematics": "14.2.2",
31
+ "@schematics/angular": "14.2.2",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "debug": "4.3.4",
@@ -49,12 +49,12 @@
49
49
  "ng-update": {
50
50
  "migrations": "@schematics/angular/migrations/migration-collection.json",
51
51
  "packageGroup": {
52
- "@angular/cli": "14.2.0-rc.0",
53
- "@angular-devkit/architect": "0.1402.0-rc.0",
54
- "@angular-devkit/build-angular": "14.2.0-rc.0",
55
- "@angular-devkit/build-webpack": "0.1402.0-rc.0",
56
- "@angular-devkit/core": "14.2.0-rc.0",
57
- "@angular-devkit/schematics": "14.2.0-rc.0"
52
+ "@angular/cli": "14.2.2",
53
+ "@angular-devkit/architect": "0.1402.2",
54
+ "@angular-devkit/build-angular": "14.2.2",
55
+ "@angular-devkit/build-webpack": "0.1402.2",
56
+ "@angular-devkit/core": "14.2.2",
57
+ "@angular-devkit/schematics": "14.2.2"
58
58
  }
59
59
  },
60
60
  "engines": {
@@ -125,8 +125,8 @@ async function promptAnalytics(global, force = false) {
125
125
  type: 'confirm',
126
126
  name: 'analytics',
127
127
  message: core_1.tags.stripIndents `
128
- Would you like to share anonymous usage data about this project with the Angular Team at
129
- Google under Googles Privacy Policy at https://policies.google.com/privacy. For more
128
+ Would you like to share pseudonymous usage data about this project with the Angular Team
129
+ at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
130
130
  details and how to change this setting, see https://angular.io/analytics.
131
131
 
132
132
  `,
@@ -137,7 +137,7 @@ async function promptAnalytics(global, force = false) {
137
137
  if (answers.analytics) {
138
138
  console.log('');
139
139
  console.log(core_1.tags.stripIndent `
140
- Thank you for sharing anonymous usage data. Should you change your mind, the following
140
+ Thank you for sharing pseudonymous usage data. Should you change your mind, the following
141
141
  command will disable this feature entirely:
142
142
 
143
143
  ${color_1.colors.yellow(`ng analytics disable${global ? ' --global' : ''}`)}
@@ -430,9 +430,23 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
430
430
  const content = JSON.parse(packageContent.toString());
431
431
  installedVersion = content.version;
432
432
  }
433
+ const packageVersionsNonDeprecated = [];
434
+ const packageVersionsDeprecated = [];
435
+ for (const [version, { deprecated }] of Object.entries(npmPackageJson.versions)) {
436
+ if (deprecated) {
437
+ packageVersionsDeprecated.push(version);
438
+ }
439
+ else {
440
+ packageVersionsNonDeprecated.push(version);
441
+ }
442
+ }
443
+ const findSatisfyingVersion = (targetVersion) => {
444
+ var _a, _b;
445
+ return (_b = ((_a = semver.maxSatisfying(packageVersionsNonDeprecated, targetVersion)) !== null && _a !== void 0 ? _a : semver.maxSatisfying(packageVersionsDeprecated, targetVersion))) !== null && _b !== void 0 ? _b : undefined;
446
+ };
433
447
  if (!installedVersion) {
434
448
  // Find the version from NPM that fits the range to max.
435
- installedVersion = semver.maxSatisfying(Object.keys(npmPackageJson.versions), packageJsonRange);
449
+ installedVersion = findSatisfyingVersion(packageJsonRange);
436
450
  }
437
451
  if (!installedVersion) {
438
452
  throw new schematics_1.SchematicsException(`An unexpected error happened; could not determine version for package ${name}.`);
@@ -450,7 +464,7 @@ function _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logg
450
464
  targetVersion = npmPackageJson['dist-tags']['latest'];
451
465
  }
452
466
  else {
453
- targetVersion = semver.maxSatisfying(Object.keys(npmPackageJson.versions), targetVersion);
467
+ targetVersion = findSatisfyingVersion(targetVersion);
454
468
  }
455
469
  }
456
470
  if (targetVersion && semver.lte(targetVersion, installedVersion)) {
@@ -36,6 +36,7 @@ export interface NgPackageManifestProperties {
36
36
  };
37
37
  }
38
38
  export interface PackageManifest extends Manifest, NgPackageManifestProperties {
39
+ deprecated?: boolean;
39
40
  }
40
41
  export declare function fetchPackageMetadata(name: string, logger: logging.LoggerApi, options?: {
41
42
  registry?: string;