@schematics/angular 12.0.0-rc.0 → 12.0.0

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.
Files changed (166) hide show
  1. package/README.md +20 -20
  2. package/app-shell/app-shell-long.md +2 -2
  3. package/app-shell/index.d.ts +7 -0
  4. package/app-shell/index.js +17 -19
  5. package/app-shell/schema.d.ts +4 -4
  6. package/app-shell/schema.json +2 -4
  7. package/application/index.d.ts +7 -0
  8. package/application/index.js +46 -47
  9. package/application/other-files/app.component.html.template +0 -11
  10. package/application/schema.json +15 -13
  11. package/class/index.d.ts +7 -0
  12. package/class/index.js +9 -9
  13. package/class/schema.json +1 -3
  14. package/collection.json +13 -13
  15. package/component/index.d.ts +7 -0
  16. package/component/index.js +23 -20
  17. package/component/schema.json +3 -10
  18. package/directive/index.d.ts +7 -0
  19. package/directive/index.js +13 -13
  20. package/directive/schema.json +1 -3
  21. package/e2e/e2e-long.md +1 -1
  22. package/e2e/index.d.ts +7 -0
  23. package/e2e/index.js +20 -8
  24. package/e2e/schema.json +1 -3
  25. package/enum/files/{__name@dasherize__.enum.ts.template → __name@dasherize____type__.ts.template} +0 -0
  26. package/enum/index.d.ts +7 -0
  27. package/enum/index.js +8 -7
  28. package/enum/schema.d.ts +4 -0
  29. package/enum/schema.json +5 -3
  30. package/guard/files/__name@dasherize__.guard.ts.template +1 -1
  31. package/guard/index.d.ts +7 -0
  32. package/guard/index.js +20 -12
  33. package/guard/schema.json +3 -12
  34. package/interceptor/index.d.ts +7 -0
  35. package/interceptor/index.js +4 -4
  36. package/interface/index.d.ts +7 -0
  37. package/interface/index.js +3 -3
  38. package/interface/schema.json +1 -3
  39. package/library/index.d.ts +7 -0
  40. package/library/index.js +4 -4
  41. package/library/library-long.md +1 -1
  42. package/migrations/update-10/add-deprecation-rule-tslint.d.ts +7 -0
  43. package/migrations/update-10/add-deprecation-rule-tslint.js +8 -1
  44. package/migrations/update-10/remove-es5-browser-support.d.ts +1 -1
  45. package/migrations/update-10/remove-es5-browser-support.js +5 -9
  46. package/migrations/update-10/remove-solution-style-tsconfig.d.ts +7 -0
  47. package/migrations/update-10/remove-solution-style-tsconfig.js +4 -3
  48. package/migrations/update-10/rename-browserslist-config.d.ts +7 -0
  49. package/migrations/update-10/rename-browserslist-config.js +3 -3
  50. package/migrations/update-10/update-angular-config.d.ts +1 -1
  51. package/migrations/update-10/update-angular-config.js +2 -2
  52. package/migrations/update-10/update-dependencies.d.ts +1 -1
  53. package/migrations/update-10/update-dependencies.js +7 -0
  54. package/migrations/update-10/update-libraries-tslib.d.ts +1 -1
  55. package/migrations/update-10/update-libraries-tslib.js +1 -1
  56. package/migrations/update-10/update-module-and-target-compiler-options.d.ts +7 -0
  57. package/migrations/update-10/update-module-and-target-compiler-options.js +11 -12
  58. package/migrations/update-10/update-tslint.d.ts +7 -0
  59. package/migrations/update-10/update-tslint.js +13 -8
  60. package/migrations/update-11/add-declaration-map-compiler-option.d.ts +1 -1
  61. package/migrations/update-11/add-declaration-map-compiler-option.js +1 -1
  62. package/migrations/update-11/replace-ng-packagr-builder.d.ts +1 -1
  63. package/migrations/update-11/replace-ng-packagr-builder.js +3 -3
  64. package/migrations/update-11/update-angular-config.d.ts +1 -1
  65. package/migrations/update-11/update-angular-config.js +3 -3
  66. package/migrations/update-11/update-dependencies.d.ts +1 -1
  67. package/migrations/update-11/update-dependencies.js +7 -0
  68. package/migrations/update-12/production-default-config.d.ts +1 -1
  69. package/migrations/update-12/production-default-config.js +4 -3
  70. package/migrations/update-12/remove-emit-decorator-metadata.d.ts +7 -0
  71. package/migrations/update-12/remove-emit-decorator-metadata.js +15 -3
  72. package/migrations/update-12/update-angular-config.d.ts +1 -1
  73. package/migrations/update-12/update-angular-config.js +6 -5
  74. package/migrations/update-12/update-lazy-module-paths.d.ts +1 -1
  75. package/migrations/update-12/update-lazy-module-paths.js +9 -4
  76. package/migrations/update-12/update-web-workers.d.ts +1 -1
  77. package/migrations/update-12/update-web-workers.js +7 -0
  78. package/migrations/update-12/update-zonejs.d.ts +7 -0
  79. package/migrations/update-12/update-zonejs.js +3 -4
  80. package/migrations/update-9/add-tslib.d.ts +1 -1
  81. package/migrations/update-9/add-tslib.js +8 -1
  82. package/migrations/update-9/index.d.ts +1 -1
  83. package/migrations/update-9/index.js +2 -2
  84. package/migrations/update-9/ivy-libraries.d.ts +1 -1
  85. package/migrations/update-9/ivy-libraries.js +2 -2
  86. package/migrations/update-9/ngsw-config.d.ts +1 -1
  87. package/migrations/update-9/ngsw-config.js +7 -0
  88. package/migrations/update-9/remove-tsickle.d.ts +1 -1
  89. package/migrations/update-9/remove-tsickle.js +7 -0
  90. package/migrations/update-9/schematic-options.d.ts +7 -0
  91. package/migrations/update-9/schematic-options.js +3 -3
  92. package/migrations/update-9/update-app-tsconfigs.d.ts +7 -0
  93. package/migrations/update-9/update-app-tsconfigs.js +3 -3
  94. package/migrations/update-9/update-dependencies.d.ts +1 -1
  95. package/migrations/update-9/update-dependencies.js +7 -0
  96. package/migrations/update-9/update-i18n.d.ts +7 -0
  97. package/migrations/update-9/update-i18n.js +9 -4
  98. package/migrations/update-9/update-server-main-file.d.ts +1 -1
  99. package/migrations/update-9/update-server-main-file.js +12 -5
  100. package/migrations/update-9/update-workspace-config.d.ts +7 -0
  101. package/migrations/update-9/update-workspace-config.js +7 -0
  102. package/migrations/update-9/utils.d.ts +7 -0
  103. package/migrations/update-9/utils.js +3 -3
  104. package/module/index.d.ts +7 -0
  105. package/module/index.js +14 -16
  106. package/module/schema.json +2 -4
  107. package/ng-new/index.d.ts +1 -1
  108. package/ng-new/index.js +3 -5
  109. package/package.json +4 -4
  110. package/pipe/index.d.ts +7 -0
  111. package/pipe/index.js +8 -8
  112. package/pipe/schema.json +1 -3
  113. package/resolver/index.d.ts +7 -0
  114. package/resolver/index.js +9 -11
  115. package/resolver/schema.json +1 -3
  116. package/service/index.d.ts +7 -0
  117. package/service/index.js +4 -4
  118. package/service-worker/index.d.ts +7 -0
  119. package/service-worker/index.js +2 -2
  120. package/service-worker/schema.d.ts +13 -13
  121. package/service-worker/schema.json +1 -3
  122. package/universal/index.d.ts +7 -0
  123. package/universal/index.js +15 -14
  124. package/universal/schema.d.ts +4 -4
  125. package/universal/schema.json +6 -5
  126. package/utility/ast-utils.d.ts +7 -0
  127. package/utility/ast-utils.js +40 -45
  128. package/utility/change.d.ts +1 -1
  129. package/utility/change.js +13 -4
  130. package/utility/dependencies.d.ts +1 -1
  131. package/utility/dependencies.js +7 -0
  132. package/utility/find-module.d.ts +1 -1
  133. package/utility/find-module.js +14 -14
  134. package/utility/json-file.d.ts +1 -1
  135. package/utility/json-file.js +2 -2
  136. package/utility/latest-versions.d.ts +1 -1
  137. package/utility/latest-versions.js +3 -3
  138. package/utility/lint-fix.d.ts +1 -1
  139. package/utility/lint-fix.js +4 -4
  140. package/utility/ng-ast-utils.d.ts +7 -0
  141. package/utility/ng-ast-utils.js +8 -7
  142. package/utility/parse-name.d.ts +1 -1
  143. package/utility/parse-name.js +3 -3
  144. package/utility/paths.d.ts +1 -1
  145. package/utility/paths.js +1 -1
  146. package/utility/project-targets.d.ts +1 -1
  147. package/utility/project-targets.js +1 -1
  148. package/utility/test/create-app-module.d.ts +1 -1
  149. package/utility/test/create-app-module.js +7 -0
  150. package/utility/test/get-file-content.d.ts +1 -1
  151. package/utility/test/get-file-content.js +7 -0
  152. package/utility/test/index.d.ts +1 -1
  153. package/utility/test/index.js +7 -7
  154. package/utility/validation.d.ts +7 -0
  155. package/utility/validation.js +5 -5
  156. package/utility/workspace-models.d.ts +3 -3
  157. package/utility/workspace-models.js +3 -3
  158. package/utility/workspace.d.ts +1 -1
  159. package/utility/workspace.js +3 -3
  160. package/web-worker/index.d.ts +7 -0
  161. package/web-worker/index.js +8 -6
  162. package/web-worker/schema.json +1 -4
  163. package/workspace/files/package.json.template +2 -5
  164. package/workspace/index.d.ts +7 -0
  165. package/workspace/index.js +3 -3
  166. package/workspace/schema.json +1 -4
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
@@ -49,7 +49,7 @@ class JSONFile {
49
49
  let getInsertionIndex;
50
50
  if (insertInOrder === undefined) {
51
51
  const property = jsonPath.slice(-1)[0];
52
- getInsertionIndex = properties => [...properties, property].sort().findIndex(p => p === property);
52
+ getInsertionIndex = (properties) => [...properties, property].sort().findIndex((p) => p === property);
53
53
  }
54
54
  else if (insertInOrder !== false) {
55
55
  getInsertionIndex = insertInOrder;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
@@ -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.0-rc.0',
13
+ Angular: '~12.0.0',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.11.4',
16
16
  TypeScript: '~4.2.3',
@@ -19,5 +19,5 @@ exports.latestVersions = {
19
19
  // published together from the same monorepo, and they are both
20
20
  // non-experimental, they will always have the same version.
21
21
  DevkitBuildAngular: '~' + require('../package.json')['version'],
22
- ngPackagr: '^12.0.0-next.8',
22
+ ngPackagr: '^12.0.0',
23
23
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyLintFix = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.applyLintFix = void 0;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const tasks_1 = require("@angular-devkit/schematics/tasks");
13
13
  function applyLintFix(path = '/') {
@@ -15,7 +15,7 @@ function applyLintFix(path = '/') {
15
15
  // Find the closest tslint.json or tslint.yaml
16
16
  let dir = tree.getDir(path.substr(0, path.lastIndexOf('/')));
17
17
  do {
18
- if (dir.subfiles.some(f => f === 'tslint.json' || f === 'tslint.yaml')) {
18
+ if (dir.subfiles.some((f) => f === 'tslint.json' || f === 'tslint.yaml')) {
19
19
  break;
20
20
  }
21
21
  dir = dir.parent;
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
1
8
  import { Tree } from '@angular-devkit/schematics';
2
9
  import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';
3
10
  export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
11
11
  const core_1 = require("@angular-devkit/core");
12
12
  const schematics_1 = require("@angular-devkit/schematics");
13
13
  const path_1 = require("path");
@@ -26,8 +26,9 @@ function findBootstrapModuleCall(host, mainPath) {
26
26
  let bootstrapCallNode = null;
27
27
  bootstrapCallNode = ast_utils_1.findNode(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
28
28
  // Walk up the parent until CallExpression is found.
29
- while (bootstrapCallNode && bootstrapCallNode.parent
30
- && bootstrapCallNode.parent.kind !== ts.SyntaxKind.CallExpression) {
29
+ while (bootstrapCallNode &&
30
+ bootstrapCallNode.parent &&
31
+ bootstrapCallNode.parent.kind !== ts.SyntaxKind.CallExpression) {
31
32
  bootstrapCallNode = bootstrapCallNode.parent;
32
33
  }
33
34
  if (bootstrapCallNode !== null &&
@@ -55,10 +56,10 @@ function findBootstrapModulePath(host, mainPath) {
55
56
  const allNodes = ast_utils_1.getSourceNodes(source);
56
57
  const bootstrapModuleRelativePath = allNodes
57
58
  .filter(ts.isImportDeclaration)
58
- .filter(imp => {
59
+ .filter((imp) => {
59
60
  return ast_utils_1.findNode(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
60
61
  })
61
- .map(imp => {
62
+ .map((imp) => {
62
63
  const modulePathStringLiteral = imp.moduleSpecifier;
63
64
  return modulePathStringLiteral.text;
64
65
  })[0];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseName = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.parseName = void 0;
11
11
  // import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs";
12
12
  const core_1 = require("@angular-devkit/core");
13
13
  function parseName(path, name) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
package/utility/paths.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.createAppModule = void 0;
4
11
  function createAppModule(tree, path) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.getFileContent = void 0;
4
11
  function getFileContent(tree, path) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
@@ -10,12 +17,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
17
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
18
  };
12
19
  Object.defineProperty(exports, "__esModule", { value: true });
13
- /**
14
- * @license
15
- * Copyright Google Inc. All Rights Reserved.
16
- *
17
- * Use of this source code is governed by an MIT-style license that can be
18
- * found in the LICENSE file at https://angular.io/license
19
- */
20
20
  __exportStar(require("./create-app-module"), exports);
21
21
  __exportStar(require("./get-file-content"), exports);
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
1
8
  export declare function validateName(name: string): void;
2
9
  export declare const htmlSelectorRe: RegExp;
3
10
  export declare function validateHtmlSelector(selector: string): void;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateProjectName = exports.validateHtmlSelector = exports.htmlSelectorRe = exports.validateName = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.validateProjectName = exports.validateHtmlSelector = exports.htmlSelectorRe = exports.validateName = void 0;
11
11
  const core_1 = require("@angular-devkit/core");
12
12
  const schematics_1 = require("@angular-devkit/schematics");
13
13
  function validateName(name) {
@@ -63,11 +63,11 @@ function getRegExpFailPosition(str) {
63
63
  const parts = str.indexOf('-') >= 0 ? str.split('-') : [str];
64
64
  const matched = [];
65
65
  const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/;
66
- parts.forEach(part => {
66
+ parts.forEach((part) => {
67
67
  if (part.match(projectNameRegexp)) {
68
68
  matched.push(part);
69
69
  }
70
70
  });
71
71
  const compare = matched.join('-');
72
- return (str !== compare) ? compare.length : null;
72
+ return str !== compare ? compare.length : null;
73
73
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -123,8 +123,8 @@ export interface WorkspaceSchema {
123
123
  }
124
124
  export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType.Application> {
125
125
  /**
126
- * Project type.
127
- */
126
+ * Project type.
127
+ */
128
128
  projectType: ProjectType;
129
129
  root: string;
130
130
  sourceRoot: string;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Builders = exports.ProjectType = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.Builders = exports.ProjectType = void 0;
11
11
  var ProjectType;
12
12
  (function (ProjectType) {
13
13
  ProjectType["Application"] = "application";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.getWorkspace = exports.updateWorkspace = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.getWorkspace = exports.updateWorkspace = void 0;
11
11
  const core_1 = require("@angular-devkit/core");
12
12
  const schematics_1 = require("@angular-devkit/schematics");
13
13
  const workspace_models_1 = require("./workspace-models");
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
1
8
  import { Rule } from '@angular-devkit/schematics';
2
9
  import { Schema as WebWorkerOptions } from './schema';
3
10
  export default function (options: WebWorkerOptions): Rule;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  /**
4
3
  * @license
5
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
6
5
  *
7
6
  * Use of this source code is governed by an MIT-style license that can be
8
7
  * found in the LICENSE file at https://angular.io/license
9
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  const core_1 = require("@angular-devkit/core");
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const json_file_1 = require("../utility/json-file");
@@ -44,10 +44,11 @@ function addSnippet(options) {
44
44
  return;
45
45
  }
46
46
  const fileRegExp = new RegExp(`^${options.name}.*\.ts`);
47
- const siblingModules = host.getDir(options.path).subfiles
48
- // Find all files that start with the same name, are ts files,
47
+ const siblingModules = host
48
+ .getDir(options.path)
49
+ .subfiles // Find all files that start with the same name, are ts files,
49
50
  // and aren't spec or module files.
50
- .filter(f => fileRegExp.test(f) && !/(module|spec)\.ts$/.test(f))
51
+ .filter((f) => fileRegExp.test(f) && !/(module|spec)\.ts$/.test(f))
51
52
  // Sort alphabetically for consistency.
52
53
  .sort();
53
54
  if (siblingModules.length === 0) {
@@ -96,7 +97,8 @@ function default_1(options) {
96
97
  if (!projectTarget) {
97
98
  throw new Error(`Target is not defined for this project.`);
98
99
  }
99
- const projectTargetOptions = (projectTarget.options || {});
100
+ const projectTargetOptions = (projectTarget.options ||
101
+ {});
100
102
  if (options.path === undefined) {
101
103
  options.path = workspace_1.buildDefaultPath(project);
102
104
  }
@@ -39,8 +39,5 @@
39
39
  "description": "Add a worker creation snippet in a sibling file of the same name."
40
40
  }
41
41
  },
42
- "required": [
43
- "name",
44
- "project"
45
- ]
42
+ "required": ["name", "project"]
46
43
  }
@@ -6,8 +6,7 @@
6
6
  "start": "ng serve",
7
7
  "build": "ng build",
8
8
  "watch": "ng build --watch --configuration development"<% if (!minimal) { %>,
9
- "test": "ng test",
10
- "lint": "ng lint"<% } %>
9
+ "test": "ng test"<% } %>
11
10
  },
12
11
  "private": true,
13
12
  "dependencies": {
@@ -29,13 +28,11 @@
29
28
  "@types/jasmine": "~3.6.0",<% } %>
30
29
  "@types/node": "^12.11.1",<% if (!minimal) { %>
31
30
  "jasmine-core": "~3.7.0",
32
- "jasmine-spec-reporter": "~7.0.0",
33
31
  "karma": "~6.3.0",
34
32
  "karma-chrome-launcher": "~3.1.0",
35
33
  "karma-coverage": "~2.0.3",
36
34
  "karma-jasmine": "~4.0.0",
37
- "karma-jasmine-html-reporter": "^1.5.0",
38
- "ts-node": "~9.1.1",<% } %>
35
+ "karma-jasmine-html-reporter": "^1.5.0",<% } %>
39
36
  "typescript": "<%= latestVersions.TypeScript %>"
40
37
  }
41
38
  }
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
1
8
  import { Rule } from '@angular-devkit/schematics';
2
9
  import { Schema as WorkspaceOptions } from './schema';
3
10
  export default function (options: WorkspaceOptions): Rule;
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  /**
4
3
  * @license
5
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
6
5
  *
7
6
  * Use of this source code is governed by an MIT-style license that can be
8
7
  * found in the LICENSE file at https://angular.io/license
9
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  const core_1 = require("@angular-devkit/core");
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const latest_versions_1 = require("../utility/latest-versions");
13
13
  function default_1(options) {
14
14
  return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
15
- options.minimal ? schematics_1.filter(path => !path.endsWith('editorconfig.template')) : schematics_1.noop(),
15
+ options.minimal ? schematics_1.filter((path) => !path.endsWith('editorconfig.template')) : schematics_1.noop(),
16
16
  schematics_1.applyTemplates({
17
17
  utils: core_1.strings,
18
18
  ...options,
@@ -46,8 +46,5 @@
46
46
  "enum": ["npm", "yarn", "pnpm", "cnpm"]
47
47
  }
48
48
  },
49
- "required": [
50
- "name",
51
- "version"
52
- ]
49
+ "required": ["name", "version"]
53
50
  }