@angular/cli 13.0.1 → 13.0.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.
@@ -109,9 +109,21 @@ function wrap(schematicFile, schematicDirectory, moduleCache, exportName) {
109
109
  return legacyModules[id];
110
110
  }
111
111
  else if (id.startsWith('@angular-devkit/') || id.startsWith('@schematics/')) {
112
+ // Files should not redirect `@angular/core` and instead use the direct
113
+ // dependency if available. This allows old major version migrations to continue to function
114
+ // even though the latest major version may have breaking changes in `@angular/core`.
115
+ if (id.startsWith('@angular-devkit/core')) {
116
+ try {
117
+ return schematicRequire(id);
118
+ }
119
+ catch (e) {
120
+ if (e.code !== 'MODULE_NOT_FOUND') {
121
+ throw e;
122
+ }
123
+ }
124
+ }
112
125
  // Resolve from inside the `@angular/cli` project
113
- const packagePath = require.resolve(id);
114
- return hostRequire(packagePath);
126
+ return hostRequire(id);
115
127
  }
116
128
  else if (id.startsWith('.') || id.startsWith('@angular/cdk')) {
117
129
  // Wrap relative files inside the schematic collection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "13.0.1",
3
+ "version": "13.0.2",
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.1",
32
- "@angular-devkit/core": "13.0.1",
33
- "@angular-devkit/schematics": "13.0.1",
34
- "@schematics/angular": "13.0.1",
31
+ "@angular-devkit/architect": "0.1300.2",
32
+ "@angular-devkit/core": "13.0.2",
33
+ "@angular-devkit/schematics": "13.0.2",
34
+ "@schematics/angular": "13.0.2",
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.1",
55
- "@angular-devkit/architect": "0.1300.1",
56
- "@angular-devkit/build-angular": "13.0.1",
57
- "@angular-devkit/build-webpack": "0.1300.1",
58
- "@angular-devkit/core": "13.0.1",
59
- "@angular-devkit/schematics": "13.0.1"
54
+ "@angular/cli": "13.0.2",
55
+ "@angular-devkit/architect": "0.1300.2",
56
+ "@angular-devkit/build-angular": "13.0.2",
57
+ "@angular-devkit/build-webpack": "0.1300.2",
58
+ "@angular-devkit/core": "13.0.2",
59
+ "@angular-devkit/schematics": "13.0.2"
60
60
  }
61
61
  },
62
62
  "engines": {
@@ -356,18 +356,13 @@ function _usageMessage(options, infoMap, logger) {
356
356
  target,
357
357
  };
358
358
  })
359
- .filter(({ info, version, target }) => {
360
- return target && semver.compare(info.installed.version, version) < 0;
361
- })
362
- .filter(({ target }) => {
363
- return target['ng-update'];
364
- })
359
+ .filter(({ info, version, target }) => (target === null || target === void 0 ? void 0 : target['ng-update']) && semver.compare(info.installed.version, version) < 0)
365
360
  .map(({ name, info, version, tag, target }) => {
366
- var _a, _b;
361
+ var _a;
367
362
  // Look for packageGroup.
368
- const packageGroup = (_a = target['ng-update']) === null || _a === void 0 ? void 0 : _a['packageGroup'];
363
+ const packageGroup = target['ng-update']['packageGroup'];
369
364
  if (packageGroup) {
370
- const packageGroupName = packageGroup === null || packageGroup === void 0 ? void 0 : packageGroup[0];
365
+ const packageGroupName = target['ng-update']['packageGroupName'] || packageGroup[0];
371
366
  if (packageGroupName) {
372
367
  if (packageGroups.has(name)) {
373
368
  return null;
@@ -379,7 +374,7 @@ function _usageMessage(options, infoMap, logger) {
379
374
  }
380
375
  let command = `ng update ${name}`;
381
376
  if (!tag) {
382
- command += `@${((_b = semver.parse(version)) === null || _b === void 0 ? void 0 : _b.major) || version}`;
377
+ command += `@${((_a = semver.parse(version)) === null || _a === void 0 ? void 0 : _a.major) || version}`;
383
378
  }
384
379
  else if (tag == 'next') {
385
380
  command += ' --next';