@schematics/angular 15.0.0 → 15.0.1

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.
@@ -11,19 +11,26 @@ const json_file_1 = require("../../utility/json-file");
11
11
  const workspace_1 = require("../../utility/workspace");
12
12
  const workspace_models_1 = require("../../utility/workspace-models");
13
13
  function default_1() {
14
- return async (host) => {
14
+ return async (host, context) => {
15
15
  // Workspace level tsconfig
16
16
  updateTarget(host, 'tsconfig.json');
17
17
  const workspace = await (0, workspace_1.getWorkspace)(host);
18
18
  // Find all tsconfig which are refereces used by builders
19
19
  for (const [, project] of workspace.projects) {
20
- for (const [, target] of project.targets) {
20
+ for (const [targetName, target] of project.targets) {
21
21
  // Update all other known CLI builders that use a tsconfig
22
22
  const tsConfigs = [target.options || {}, ...Object.values(target.configurations || {})]
23
23
  .filter((opt) => typeof (opt === null || opt === void 0 ? void 0 : opt.tsConfig) === 'string')
24
24
  .map((opt) => opt.tsConfig);
25
- const uniqueTsConfigs = [...new Set(tsConfigs)];
26
- if (uniqueTsConfigs.length < 1) {
25
+ const uniqueTsConfigs = new Set(tsConfigs);
26
+ for (const tsConfig of uniqueTsConfigs) {
27
+ if (host.exists(tsConfig)) {
28
+ continue;
29
+ }
30
+ uniqueTsConfigs.delete(tsConfig);
31
+ context.logger.warn(`'${tsConfig}' referenced in the '${targetName}' target does not exist.`);
32
+ }
33
+ if (!uniqueTsConfigs.size) {
27
34
  continue;
28
35
  }
29
36
  switch (target.builder) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "15.0.0",
3
+ "version": "15.0.1",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "schematics": "./collection.json",
25
25
  "dependencies": {
26
- "@angular-devkit/core": "15.0.0",
27
- "@angular-devkit/schematics": "15.0.0",
26
+ "@angular-devkit/core": "15.0.1",
27
+ "@angular-devkit/schematics": "15.0.1",
28
28
  "jsonc-parser": "3.2.0"
29
29
  },
30
30
  "repository": {