@angular/cli 13.0.0-rc.2 → 13.0.0-rc.3

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": "13.0.0-rc.2",
3
+ "version": "13.0.0-rc.3",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/angular/angular-cli",
30
30
  "dependencies": {
31
- "@angular-devkit/architect": "0.1300.0-rc.2",
32
- "@angular-devkit/core": "13.0.0-rc.2",
33
- "@angular-devkit/schematics": "13.0.0-rc.2",
34
- "@schematics/angular": "13.0.0-rc.2",
31
+ "@angular-devkit/architect": "0.1300.0-rc.3",
32
+ "@angular-devkit/core": "13.0.0-rc.3",
33
+ "@angular-devkit/schematics": "13.0.0-rc.3",
34
+ "@schematics/angular": "13.0.0-rc.3",
35
35
  "@yarnpkg/lockfile": "1.1.0",
36
36
  "ansi-colors": "4.1.1",
37
37
  "debug": "4.3.2",
@@ -51,12 +51,12 @@
51
51
  "ng-update": {
52
52
  "migrations": "@schematics/angular/migrations/migration-collection.json",
53
53
  "packageGroup": {
54
- "@angular/cli": "13.0.0-rc.2",
55
- "@angular-devkit/architect": "0.1300.0-rc.2",
56
- "@angular-devkit/build-angular": "13.0.0-rc.2",
57
- "@angular-devkit/build-webpack": "0.1300.0-rc.2",
58
- "@angular-devkit/core": "13.0.0-rc.2",
59
- "@angular-devkit/schematics": "13.0.0-rc.2"
54
+ "@angular/cli": "13.0.0-rc.3",
55
+ "@angular-devkit/architect": "0.1300.0-rc.3",
56
+ "@angular-devkit/build-angular": "13.0.0-rc.3",
57
+ "@angular-devkit/build-webpack": "0.1300.0-rc.3",
58
+ "@angular-devkit/core": "13.0.0-rc.3",
59
+ "@angular-devkit/schematics": "13.0.0-rc.3"
60
60
  }
61
61
  },
62
62
  "engines": {
@@ -320,13 +320,34 @@ function _usageMessage(options, infoMap, logger) {
320
320
  const packageGroups = new Map();
321
321
  const packagesToUpdate = [...infoMap.entries()]
322
322
  .map(([name, info]) => {
323
- const tag = options.next
323
+ var _a, _b;
324
+ let tag = options.next
324
325
  ? info.npmPackageJson['dist-tags']['next']
325
326
  ? 'next'
326
327
  : 'latest'
327
328
  : 'latest';
328
- const version = info.npmPackageJson['dist-tags'][tag];
329
- const target = info.npmPackageJson.versions[version];
329
+ let version = info.npmPackageJson['dist-tags'][tag];
330
+ let target = info.npmPackageJson.versions[version];
331
+ const versionDiff = semver.diff(info.installed.version, version);
332
+ if (versionDiff !== 'patch' &&
333
+ versionDiff !== 'minor' &&
334
+ /^@(?:angular|nguniversal)\//.test(name)) {
335
+ const installedMajorVersion = (_a = semver.parse(info.installed.version)) === null || _a === void 0 ? void 0 : _a.major;
336
+ const toInstallMajorVersion = (_b = semver.parse(version)) === null || _b === void 0 ? void 0 : _b.major;
337
+ if (installedMajorVersion !== undefined &&
338
+ toInstallMajorVersion !== undefined &&
339
+ installedMajorVersion < toInstallMajorVersion - 1) {
340
+ const nextMajorVersion = `${installedMajorVersion + 1}.`;
341
+ const nextMajorVersions = Object.keys(info.npmPackageJson.versions)
342
+ .filter((v) => v.startsWith(nextMajorVersion))
343
+ .sort((a, b) => (a > b ? -1 : 1));
344
+ if (nextMajorVersions.length) {
345
+ version = nextMajorVersions[0];
346
+ target = info.npmPackageJson.versions[version];
347
+ tag = '';
348
+ }
349
+ }
350
+ }
330
351
  return {
331
352
  name,
332
353
  info,
@@ -342,10 +363,11 @@ function _usageMessage(options, infoMap, logger) {
342
363
  return target['ng-update'];
343
364
  })
344
365
  .map(({ name, info, version, tag, target }) => {
366
+ var _a, _b;
345
367
  // Look for packageGroup.
346
- if (target['ng-update'] && target['ng-update']['packageGroup']) {
347
- const packageGroup = target['ng-update']['packageGroup'];
348
- const packageGroupName = target['ng-update']['packageGroupName'] || target['ng-update']['packageGroup'][0];
368
+ const packageGroup = (_a = target['ng-update']) === null || _a === void 0 ? void 0 : _a['packageGroup'];
369
+ if (packageGroup) {
370
+ const packageGroupName = packageGroup === null || packageGroup === void 0 ? void 0 : packageGroup[0];
349
371
  if (packageGroupName) {
350
372
  if (packageGroups.has(name)) {
351
373
  return null;
@@ -356,7 +378,10 @@ function _usageMessage(options, infoMap, logger) {
356
378
  }
357
379
  }
358
380
  let command = `ng update ${name}`;
359
- if (tag == 'next') {
381
+ if (!tag) {
382
+ command += `@${((_b = semver.parse(version)) === null || _b === void 0 ? void 0 : _b.major) || version}`;
383
+ }
384
+ else if (tag == 'next') {
360
385
  command += ' --next';
361
386
  }
362
387
  return [name, `${info.installed.version} -> ${version} `, command];