@schematics/angular 12.0.3 → 12.0.4

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": "@schematics/angular",
3
- "version": "12.0.3",
3
+ "version": "12.0.4",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -15,8 +15,8 @@
15
15
  ],
16
16
  "schematics": "./collection.json",
17
17
  "dependencies": {
18
- "@angular-devkit/core": "12.0.3",
19
- "@angular-devkit/schematics": "12.0.3",
18
+ "@angular-devkit/core": "12.0.4",
19
+ "@angular-devkit/schematics": "12.0.4",
20
20
  "jsonc-parser": "3.0.0"
21
21
  },
22
22
  "repository": {
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.latestVersions = void 0;
11
11
  exports.latestVersions = {
12
12
  // These versions should be kept up to date with latest Angular peer dependencies.
13
- Angular: '~12.0.3',
13
+ Angular: '~12.0.4',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.11.4',
16
16
  TypeScript: '~4.2.3',
@@ -97,8 +97,7 @@ function default_1(options) {
97
97
  if (!projectTarget) {
98
98
  throw new Error(`Target is not defined for this project.`);
99
99
  }
100
- const projectTargetOptions = (projectTarget.options ||
101
- {});
100
+ const projectTargetOptions = (projectTarget.options || {});
102
101
  if (options.path === undefined) {
103
102
  options.path = workspace_1.buildDefaultPath(project);
104
103
  }
@@ -111,6 +110,16 @@ function default_1(options) {
111
110
  const workerConfigPath = core_1.join(core_1.normalize(root), 'tsconfig.worker.json');
112
111
  projectTargetOptions.webWorkerTsConfig = workerConfigPath;
113
112
  }
113
+ const projectTestTarget = project.targets.get('test');
114
+ if (projectTestTarget) {
115
+ const projectTestTargetOptions = (projectTestTarget.options ||
116
+ {});
117
+ const needWebWorkerConfig = !projectTestTargetOptions.webWorkerTsConfig;
118
+ if (needWebWorkerConfig) {
119
+ const workerConfigPath = core_1.join(core_1.normalize(root), 'tsconfig.worker.json');
120
+ projectTestTargetOptions.webWorkerTsConfig = workerConfigPath;
121
+ }
122
+ }
114
123
  const templateSource = schematics_1.apply(schematics_1.url('./files/worker'), [
115
124
  schematics_1.applyTemplates({ ...options, ...core_1.strings }),
116
125
  schematics_1.move(parsedPath.path),