@angular-devkit/build-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 (216) hide show
  1. package/README.md +14 -13
  2. package/package.json +24 -24
  3. package/plugins/karma.d.ts +1 -1
  4. package/plugins/karma.js +1 -1
  5. package/src/app-shell/index.d.ts +7 -0
  6. package/src/app-shell/index.js +9 -7
  7. package/src/app-shell/schema.json +1 -4
  8. package/src/babel/babel-loader.d.ts +2 -1
  9. package/src/babel/presets/application.d.ts +7 -0
  10. package/src/babel/presets/application.js +3 -3
  11. package/src/babel/webpack-loader.d.ts +7 -0
  12. package/src/babel/webpack-loader.js +6 -5
  13. package/src/babel-bazel.d.ts +2 -1
  14. package/src/browser/index.d.ts +1 -1
  15. package/src/browser/index.js +34 -33
  16. package/src/browser/schema.d.ts +1 -5
  17. package/src/browser/schema.json +11 -57
  18. package/src/browser/tests/setup.d.ts +1 -1
  19. package/src/browser/tests/setup.js +7 -0
  20. package/src/dev-server/index.d.ts +1 -1
  21. package/src/dev-server/index.js +22 -15
  22. package/src/dev-server/schema.json +1 -3
  23. package/src/dev-server/tests/execute-fetch.d.ts +1 -1
  24. package/src/dev-server/tests/execute-fetch.js +4 -4
  25. package/src/dev-server/tests/setup.d.ts +7 -0
  26. package/src/dev-server/tests/setup.js +7 -0
  27. package/src/extract-i18n/index.d.ts +1 -1
  28. package/src/extract-i18n/index.js +10 -12
  29. package/src/extract-i18n/ivy-extract-loader.d.ts +7 -0
  30. package/src/extract-i18n/ivy-extract-loader.js +7 -6
  31. package/src/extract-i18n/schema.json +2 -14
  32. package/src/index.d.ts +6 -6
  33. package/src/index.js +1 -1
  34. package/src/karma/find-tests.d.ts +7 -0
  35. package/src/karma/find-tests.js +4 -4
  36. package/src/karma/index.d.ts +1 -1
  37. package/src/karma/index.js +21 -13
  38. package/src/karma/schema.json +7 -28
  39. package/src/ng-packagr/index.d.ts +1 -1
  40. package/src/ng-packagr/index.js +4 -4
  41. package/src/ng-packagr/schema.json +1 -3
  42. package/src/protractor/index.d.ts +1 -1
  43. package/src/protractor/index.js +8 -8
  44. package/src/protractor/schema.json +1 -3
  45. package/src/server/index.d.ts +1 -1
  46. package/src/server/index.js +6 -6
  47. package/src/server/schema.d.ts +1 -5
  48. package/src/server/schema.json +7 -35
  49. package/src/test-utils.d.ts +1 -1
  50. package/src/test-utils.js +4 -4
  51. package/src/testing/builder-harness.d.ts +2 -2
  52. package/src/testing/builder-harness.js +10 -8
  53. package/src/testing/file-watching.d.ts +1 -1
  54. package/src/testing/file-watching.js +7 -0
  55. package/src/testing/index.d.ts +1 -1
  56. package/src/testing/index.js +7 -0
  57. package/src/testing/jasmine-helpers.d.ts +2 -2
  58. package/src/testing/jasmine-helpers.js +7 -0
  59. package/src/transforms.d.ts +1 -1
  60. package/src/transforms.js +7 -0
  61. package/src/tslint/index.d.ts +7 -0
  62. package/src/tslint/index.js +10 -12
  63. package/src/tslint/schema.json +1 -1
  64. package/src/typings.d.ts +2 -1
  65. package/src/utils/action-cache.d.ts +7 -0
  66. package/src/utils/action-cache.js +6 -8
  67. package/src/utils/action-executor.d.ts +7 -0
  68. package/src/utils/action-executor.js +13 -28
  69. package/src/utils/build-browser-features.d.ts +1 -1
  70. package/src/utils/build-browser-features.js +3 -7
  71. package/src/utils/build-options.d.ts +1 -2
  72. package/src/utils/build-options.js +1 -1
  73. package/src/utils/bundle-calculator.d.ts +7 -0
  74. package/src/utils/bundle-calculator.js +32 -31
  75. package/src/utils/cache-path.d.ts +7 -0
  76. package/src/utils/cache-path.js +3 -3
  77. package/src/utils/check-port.d.ts +7 -0
  78. package/src/utils/check-port.js +4 -4
  79. package/src/utils/color.d.ts +1 -1
  80. package/src/utils/color.js +3 -3
  81. package/src/utils/copy-assets.d.ts +7 -0
  82. package/src/utils/copy-assets.js +3 -3
  83. package/src/utils/copy-file.d.ts +2 -2
  84. package/src/utils/copy-file.js +4 -4
  85. package/src/utils/default-progress.d.ts +1 -1
  86. package/src/utils/default-progress.js +1 -1
  87. package/src/utils/delete-output-dir.d.ts +7 -0
  88. package/src/utils/delete-output-dir.js +3 -3
  89. package/src/utils/empty.js +0 -1
  90. package/src/utils/environment-options.d.ts +7 -0
  91. package/src/utils/environment-options.js +3 -3
  92. package/src/utils/find-up.d.ts +7 -0
  93. package/src/utils/find-up.js +3 -3
  94. package/src/utils/i18n-inlining.d.ts +1 -1
  95. package/src/utils/i18n-inlining.js +8 -1
  96. package/src/utils/i18n-options.d.ts +1 -1
  97. package/src/utils/i18n-options.js +11 -3
  98. package/src/utils/index-file/augment-index-html.d.ts +1 -1
  99. package/src/utils/index-file/augment-index-html.js +6 -11
  100. package/src/utils/index-file/html-rewriting-stream.d.ts +1 -1
  101. package/src/utils/index-file/html-rewriting-stream.js +2 -2
  102. package/src/utils/index-file/index-html-generator.d.ts +1 -1
  103. package/src/utils/index-file/index-html-generator.js +7 -11
  104. package/src/utils/index-file/inline-critical-css.d.ts +1 -1
  105. package/src/utils/index-file/inline-critical-css.js +1 -1
  106. package/src/utils/index-file/inline-fonts.d.ts +1 -1
  107. package/src/utils/index-file/inline-fonts.js +18 -19
  108. package/src/utils/index.d.ts +1 -1
  109. package/src/utils/index.js +1 -1
  110. package/src/utils/is-directory.d.ts +1 -1
  111. package/src/utils/is-directory.js +2 -3
  112. package/src/utils/load-translations.d.ts +7 -0
  113. package/src/utils/load-translations.js +9 -19
  114. package/src/utils/normalize-asset-patterns.d.ts +1 -1
  115. package/src/utils/normalize-asset-patterns.js +6 -7
  116. package/src/utils/normalize-builder-schema.d.ts +1 -1
  117. package/src/utils/normalize-builder-schema.js +5 -6
  118. package/src/utils/normalize-file-replacements.d.ts +1 -1
  119. package/src/utils/normalize-file-replacements.js +2 -3
  120. package/src/utils/normalize-optimization.d.ts +1 -1
  121. package/src/utils/normalize-optimization.js +12 -8
  122. package/src/utils/normalize-source-maps.d.ts +1 -1
  123. package/src/utils/normalize-source-maps.js +3 -3
  124. package/src/utils/output-paths.d.ts +7 -0
  125. package/src/utils/output-paths.js +7 -4
  126. package/src/utils/package-chunk-sort.d.ts +1 -1
  127. package/src/utils/package-chunk-sort.js +10 -3
  128. package/src/utils/process-bundle-bootstrap.js +3 -2
  129. package/src/utils/process-bundle.d.ts +2 -2
  130. package/src/utils/process-bundle.js +31 -40
  131. package/src/utils/read-tsconfig.d.ts +1 -1
  132. package/src/utils/read-tsconfig.js +2 -4
  133. package/src/utils/run-module-as-observable-fork.d.ts +1 -1
  134. package/src/utils/run-module-as-observable-fork.js +9 -2
  135. package/src/utils/run-module-worker.js +1 -3
  136. package/src/utils/service-worker.d.ts +1 -1
  137. package/src/utils/service-worker.js +3 -3
  138. package/src/utils/spinner.d.ts +1 -1
  139. package/src/utils/spinner.js +1 -1
  140. package/src/utils/strip-bom.d.ts +1 -1
  141. package/src/utils/strip-bom.js +2 -3
  142. package/src/utils/tty.d.ts +1 -1
  143. package/src/utils/tty.js +1 -1
  144. package/src/utils/url.d.ts +1 -1
  145. package/src/utils/url.js +1 -1
  146. package/src/utils/version.d.ts +1 -1
  147. package/src/utils/version.js +3 -3
  148. package/src/utils/webpack-browser-config.d.ts +1 -1
  149. package/src/utils/webpack-browser-config.js +9 -2
  150. package/src/utils/webpack-diagnostics.d.ts +2 -2
  151. package/src/utils/webpack-diagnostics.js +4 -4
  152. package/src/utils/workers.d.ts +1 -1
  153. package/src/utils/workers.js +1 -1
  154. package/src/webpack/configs/browser.d.ts +7 -0
  155. package/src/webpack/configs/browser.js +3 -3
  156. package/src/webpack/configs/common.d.ts +7 -0
  157. package/src/webpack/configs/common.js +16 -19
  158. package/src/webpack/configs/dev-server.d.ts +1 -1
  159. package/src/webpack/configs/dev-server.js +7 -6
  160. package/src/webpack/configs/index.d.ts +1 -1
  161. package/src/webpack/configs/index.js +7 -7
  162. package/src/webpack/configs/server.d.ts +7 -0
  163. package/src/webpack/configs/server.js +4 -4
  164. package/src/webpack/configs/stats.d.ts +1 -1
  165. package/src/webpack/configs/stats.js +1 -1
  166. package/src/webpack/configs/styles.d.ts +7 -0
  167. package/src/webpack/configs/styles.js +6 -10
  168. package/src/webpack/configs/test.d.ts +1 -1
  169. package/src/webpack/configs/test.js +2 -5
  170. package/src/webpack/configs/typescript.d.ts +7 -0
  171. package/src/webpack/configs/typescript.js +4 -6
  172. package/src/webpack/configs/worker.d.ts +7 -0
  173. package/src/webpack/configs/worker.js +3 -3
  174. package/src/webpack/es5-jit-polyfills.js +2 -1
  175. package/src/webpack/es5-polyfills.js +2 -3
  176. package/src/webpack/jit-polyfills.js +2 -1
  177. package/src/webpack/plugins/analytics.d.ts +2 -2
  178. package/src/webpack/plugins/analytics.js +9 -9
  179. package/src/webpack/plugins/any-component-style-budget-checker.d.ts +1 -1
  180. package/src/webpack/plugins/any-component-style-budget-checker.js +3 -9
  181. package/src/webpack/plugins/builder-watch-plugin.d.ts +1 -1
  182. package/src/webpack/plugins/builder-watch-plugin.js +7 -0
  183. package/src/webpack/plugins/common-js-usage-warn-plugin.d.ts +1 -1
  184. package/src/webpack/plugins/common-js-usage-warn-plugin.js +10 -10
  185. package/src/webpack/plugins/dedupe-module-resolve-plugin.d.ts +1 -1
  186. package/src/webpack/plugins/dedupe-module-resolve-plugin.js +9 -2
  187. package/src/webpack/plugins/hmr/hmr-accept.d.ts +1 -1
  188. package/src/webpack/plugins/hmr/hmr-accept.js +6 -9
  189. package/src/webpack/plugins/hmr/hmr-loader.d.ts +1 -1
  190. package/src/webpack/plugins/hmr/hmr-loader.js +2 -2
  191. package/src/webpack/plugins/index-html-webpack-plugin.d.ts +7 -0
  192. package/src/webpack/plugins/index-html-webpack-plugin.js +6 -6
  193. package/src/webpack/plugins/index.d.ts +2 -2
  194. package/src/webpack/plugins/index.js +1 -1
  195. package/src/webpack/plugins/karma/karma-context.html +31 -30
  196. package/src/webpack/plugins/karma/karma-debug.html +34 -33
  197. package/src/webpack/plugins/karma/karma.d.ts +7 -0
  198. package/src/webpack/plugins/karma/karma.js +13 -11
  199. package/src/webpack/plugins/optimize-css-webpack-plugin.d.ts +7 -0
  200. package/src/webpack/plugins/optimize-css-webpack-plugin.js +18 -11
  201. package/src/webpack/plugins/postcss-cli-resources.d.ts +7 -0
  202. package/src/webpack/plugins/postcss-cli-resources.js +11 -9
  203. package/src/webpack/plugins/remove-hash-plugin.d.ts +1 -1
  204. package/src/webpack/plugins/remove-hash-plugin.js +9 -4
  205. package/src/webpack/plugins/scripts-webpack-plugin.d.ts +1 -1
  206. package/src/webpack/plugins/scripts-webpack-plugin.js +11 -10
  207. package/src/webpack/plugins/single-test-transform.d.ts +1 -1
  208. package/src/webpack/plugins/single-test-transform.js +5 -5
  209. package/src/webpack/plugins/suppress-entry-chunks-webpack-plugin.d.ts +1 -1
  210. package/src/webpack/plugins/suppress-entry-chunks-webpack-plugin.js +1 -1
  211. package/src/webpack/utils/async-chunks.d.ts +1 -1
  212. package/src/webpack/utils/async-chunks.js +9 -1
  213. package/src/webpack/utils/helpers.d.ts +1 -1
  214. package/src/webpack/utils/helpers.js +2 -2
  215. package/src/webpack/utils/stats.d.ts +1 -1
  216. package/src/webpack/utils/stats.js +39 -33
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.execute = 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.execute = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const core_1 = require("@angular-devkit/core");
13
13
  const path_1 = require("path");
@@ -35,7 +35,12 @@ async function initialize(options, context, webpackConfigurationTransformer) {
35
35
  namedChunks: true,
36
36
  extractLicenses: false,
37
37
  outputHashing: schema_1.OutputHashing.None,
38
- }, context, wco => [
38
+ // The webpack tier owns the watch behavior so we want to force it in the config.
39
+ // When not in watch mode, webpack-dev-middleware will call `compiler.watch` anyway.
40
+ // https://github.com/webpack/webpack-dev-middleware/blob/698c9ae5e9bb9a013985add6189ff21c1a1ec185/src/index.js#L65
41
+ // https://github.com/webpack/webpack/blob/cde1b73e12eb8a77eb9ba42e7920c9ec5d29c2c9/lib/Compiler.js#L379-L388
42
+ watch: true,
43
+ }, context, (wco) => [
39
44
  configs_1.getCommonConfig(wco),
40
45
  configs_1.getStylesConfig(wco),
41
46
  configs_1.getTypeScriptConfig(wco),
@@ -54,12 +59,15 @@ async function initialize(options, context, webpackConfigurationTransformer) {
54
59
  function execute(options, context, transforms = {}) {
55
60
  // Check Angular version.
56
61
  version_1.assertCompatibleAngularVersion(context.workspaceRoot, context.logger);
62
+ let singleRun;
63
+ if (options.watch !== undefined) {
64
+ singleRun = !options.watch;
65
+ }
57
66
  return rxjs_1.from(initialize(options, context, transforms.webpackConfiguration)).pipe(operators_1.switchMap(async ([karma, webpackConfig]) => {
58
67
  var _a;
59
- const karmaOptions = {};
60
- if (options.watch !== undefined) {
61
- karmaOptions.singleRun = !options.watch;
62
- }
68
+ const karmaOptions = {
69
+ singleRun,
70
+ };
63
71
  // Convert browsers from a string to an array
64
72
  if (options.browsers) {
65
73
  karmaOptions.browsers = options.browsers.split(',');
@@ -68,7 +76,7 @@ function execute(options, context, transforms = {}) {
68
76
  // Split along commas to make it more natural, and remove empty strings.
69
77
  const reporters = options.reporters
70
78
  .reduce((acc, curr) => acc.concat(curr.split(',')), [])
71
- .filter(x => !!x);
79
+ .filter((x) => !!x);
72
80
  if (reporters.length > 0) {
73
81
  karmaOptions.reporters = reporters;
74
82
  }
@@ -108,19 +116,19 @@ function execute(options, context, transforms = {}) {
108
116
  };
109
117
  const config = await karma.config.parseConfig(path_1.resolve(context.workspaceRoot, options.karmaConfig), transforms.karmaOptions ? transforms.karmaOptions(karmaOptions) : karmaOptions, { promiseConfig: true, throwErrors: true });
110
118
  return [karma, config];
111
- }), operators_1.switchMap(([karma, karmaConfig]) => new rxjs_1.Observable(subscriber => {
119
+ }), operators_1.switchMap(([karma, karmaConfig]) => new rxjs_1.Observable((subscriber) => {
112
120
  var _a, _b, _c;
113
121
  var _d, _e;
114
122
  // Pass onto Karma to emit BuildEvents.
115
123
  (_a = karmaConfig.buildWebpack) !== null && _a !== void 0 ? _a : (karmaConfig.buildWebpack = {});
116
124
  if (typeof karmaConfig.buildWebpack === 'object') {
117
- // tslint:disable-next-line: no-any
125
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
118
126
  (_b = (_d = karmaConfig.buildWebpack).failureCb) !== null && _b !== void 0 ? _b : (_d.failureCb = () => subscriber.next({ success: false }));
119
- // tslint:disable-next-line: no-any
127
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
128
  (_c = (_e = karmaConfig.buildWebpack).successCb) !== null && _c !== void 0 ? _c : (_e.successCb = () => subscriber.next({ success: true }));
121
129
  }
122
130
  // Complete the observable once the Karma server returns.
123
- const karmaServer = new karma.Server(karmaConfig, exitCode => {
131
+ const karmaServer = new karma.Server(karmaConfig, (exitCode) => {
124
132
  subscriber.next({ success: exitCode === 0 });
125
133
  subscriber.complete();
126
134
  });
@@ -48,12 +48,7 @@
48
48
  "description": "The stylesheet language to use for the application's inline component styles.",
49
49
  "type": "string",
50
50
  "default": "css",
51
- "enum": [
52
- "css",
53
- "less",
54
- "sass",
55
- "scss"
56
- ]
51
+ "enum": ["css", "less", "sass", "scss"]
57
52
  },
58
53
  "stylePreprocessorOptions": {
59
54
  "description": "Options to pass to style preprocessors",
@@ -157,10 +152,7 @@
157
152
  }
158
153
  },
159
154
  "additionalProperties": false,
160
- "required": [
161
- "src",
162
- "replaceWith"
163
- ]
155
+ "required": ["src", "replaceWith"]
164
156
  },
165
157
  {
166
158
  "type": "object",
@@ -173,10 +165,7 @@
173
165
  }
174
166
  },
175
167
  "additionalProperties": false,
176
- "required": [
177
- "replace",
178
- "with"
179
- ]
168
+ "required": ["replace", "with"]
180
169
  }
181
170
  ]
182
171
  },
@@ -195,11 +184,7 @@
195
184
  }
196
185
  },
197
186
  "additionalProperties": false,
198
- "required": [
199
- "main",
200
- "tsConfig",
201
- "karmaConfig"
202
- ],
187
+ "required": ["main", "tsConfig", "karmaConfig"],
203
188
  "definitions": {
204
189
  "assetPattern": {
205
190
  "oneOf": [
@@ -227,11 +212,7 @@
227
212
  }
228
213
  },
229
214
  "additionalProperties": false,
230
- "required": [
231
- "glob",
232
- "input",
233
- "output"
234
- ]
215
+ "required": ["glob", "input", "output"]
235
216
  },
236
217
  {
237
218
  "type": "string"
@@ -259,9 +240,7 @@
259
240
  }
260
241
  },
261
242
  "additionalProperties": false,
262
- "required": [
263
- "input"
264
- ]
243
+ "required": ["input"]
265
244
  },
266
245
  {
267
246
  "type": "string",
@@ -270,4 +249,4 @@
270
249
  ]
271
250
  }
272
251
  }
273
- }
252
+ }
@@ -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.execute = 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.execute = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const path_1 = require("path");
13
13
  const rxjs_1 = require("rxjs");
@@ -24,7 +24,7 @@ async function initialize(options, root) {
24
24
  * @experimental Direct usage of this function is considered experimental.
25
25
  */
26
26
  function execute(options, context) {
27
- return rxjs_1.from(initialize(options, context.workspaceRoot)).pipe(operators_1.switchMap(packager => options.watch ? packager.watch() : packager.build()), operators_1.mapTo({ success: true }));
27
+ return rxjs_1.from(initialize(options, context.workspaceRoot)).pipe(operators_1.switchMap((packager) => (options.watch ? packager.watch() : packager.build())), operators_1.mapTo({ success: true }));
28
28
  }
29
29
  exports.execute = execute;
30
30
  exports.default = architect_1.createBuilder(execute);
@@ -19,7 +19,5 @@
19
19
  }
20
20
  },
21
21
  "additionalProperties": false,
22
- "required": [
23
- "project"
24
- ]
22
+ "required": ["project"]
25
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.execute = 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.execute = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const core_1 = require("@angular-devkit/core");
13
13
  const path_1 = require("path");
@@ -26,7 +26,10 @@ function runProtractor(root, options) {
26
26
  // TODO: Protractor manages process.exit itself, so this target will allways quit the
27
27
  // process. To work around this we run it in a subprocess.
28
28
  // https://github.com/angular/protractor/issues/4160
29
- return utils_1.runModuleAsObservableFork(root, 'protractor/built/launcher', 'init', [path_1.resolve(root, options.protractorConfig), additionalProtractorConfig]).toPromise();
29
+ return utils_1.runModuleAsObservableFork(root, 'protractor/built/launcher', 'init', [
30
+ path_1.resolve(root, options.protractorConfig),
31
+ additionalProtractorConfig,
32
+ ]).toPromise();
30
33
  }
31
34
  async function updateWebdriver() {
32
35
  // The webdriver-manager update command can only be accessed via a deep import.
@@ -47,7 +50,6 @@ async function updateWebdriver() {
47
50
  Update webdriver-manager manually and run 'ng e2e --no-webdriver-update' instead.
48
51
  `);
49
52
  }
50
- // tslint:disable-next-line:max-line-length no-implicit-dependencies
51
53
  const webdriverUpdate = await Promise.resolve().then(() => require(path));
52
54
  // const webdriverUpdate = await import(path) as typeof import ('webdriver-manager/built/lib/cmds/update');
53
55
  // run `webdriver-manager update --standalone false --gecko false --quiet`
@@ -104,9 +106,7 @@ async function execute(options, context) {
104
106
  if (typeof serverOptions.publicHost === 'string') {
105
107
  let publicHost = serverOptions.publicHost;
106
108
  if (!/^\w+:\/\//.test(publicHost)) {
107
- publicHost = `${serverOptions.ssl
108
- ? 'https'
109
- : 'http'}://${publicHost}`;
109
+ publicHost = `${serverOptions.ssl ? 'https' : 'http'}://${publicHost}`;
110
110
  }
111
111
  const clientUrl = url.parse(publicHost);
112
112
  baseUrl = url.format(clientUrl);
@@ -54,7 +54,5 @@
54
54
  }
55
55
  },
56
56
  "additionalProperties": false,
57
- "required": [
58
- "protractorConfig"
59
- ]
57
+ "required": ["protractorConfig"]
60
58
  }
@@ -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.execute = 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.execute = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const build_webpack_1 = require("@angular-devkit/build-webpack");
13
13
  const core_1 = require("@angular-devkit/core");
@@ -39,7 +39,7 @@ function execute(options, context, transforms = {}) {
39
39
  context.logger.warn(`Option 'bundleDependencies' string value is deprecated since version 9. Use a boolean value instead.`);
40
40
  }
41
41
  if (!options.bundleDependencies && tsConfig.options.enableIvy) {
42
- // tslint:disable-next-line: no-implicit-dependencies
42
+ // eslint-disable-next-line import/no-extraneous-dependencies
43
43
  const { __processed_by_ivy_ngcc__, main = '' } = require('@angular/core/package.json');
44
44
  if (!__processed_by_ivy_ngcc__ ||
45
45
  !__processed_by_ivy_ngcc__.main ||
@@ -72,7 +72,7 @@ function execute(options, context, transforms = {}) {
72
72
  stats_1.webpackStatsLogger(context.logger, webpackStats, config);
73
73
  return { ...output, success };
74
74
  }));
75
- }), operators_1.map(output => {
75
+ }), operators_1.map((output) => {
76
76
  if (!output.success) {
77
77
  return output;
78
78
  }
@@ -93,7 +93,7 @@ async function initialize(options, context, webpackConfigurationTransform) {
93
93
  buildOptimizer: false,
94
94
  aot: true,
95
95
  platform: 'server',
96
- }, context, wco => [
96
+ }, context, (wco) => [
97
97
  configs_1.getCommonConfig(wco),
98
98
  configs_1.getServerConfig(wco),
99
99
  configs_1.getStylesConfig(wco),
@@ -25,10 +25,6 @@ export interface Schema {
25
25
  * Replace compilation source files with other compilation source files in the build.
26
26
  */
27
27
  fileReplacements?: FileReplacement[];
28
- /**
29
- * Run the TypeScript type checker in a forked process.
30
- */
31
- forkTypeChecker?: boolean;
32
28
  /**
33
29
  * How to handle missing translations for i18n.
34
30
  */
@@ -83,7 +79,7 @@ export interface Schema {
83
79
  /**
84
80
  * Show circular dependency warnings on builds.
85
81
  * @deprecated The recommended method to detect circular dependencies in project code is to
86
- * use a either a lint rule or other external tooling.
82
+ * use either a lint rule or other external tooling.
87
83
  */
88
84
  showCircularDependencies?: boolean;
89
85
  /**
@@ -17,12 +17,7 @@
17
17
  "description": "The stylesheet language to use for the application's inline component styles.",
18
18
  "type": "string",
19
19
  "default": "css",
20
- "enum": [
21
- "css",
22
- "less",
23
- "sass",
24
- "scss"
25
- ]
20
+ "enum": ["css", "less", "sass", "scss"]
26
21
  },
27
22
  "stylePreprocessorOptions": {
28
23
  "description": "Options to pass to style preprocessors",
@@ -159,12 +154,7 @@
159
154
  "type": "string",
160
155
  "description": "Define the output filename cache-busting hashing mode.",
161
156
  "default": "none",
162
- "enum": [
163
- "none",
164
- "all",
165
- "media",
166
- "bundles"
167
- ]
157
+ "enum": ["none", "all", "media", "bundles"]
168
158
  },
169
159
  "deleteOutputPath": {
170
160
  "type": "boolean",
@@ -184,7 +174,7 @@
184
174
  "type": "boolean",
185
175
  "description": "Show circular dependency warnings on builds.",
186
176
  "default": false,
187
- "x-deprecated": "The recommended method to detect circular dependencies in project code is to use a either a lint rule or other external tooling."
177
+ "x-deprecated": "The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling."
188
178
  },
189
179
  "namedChunks": {
190
180
  "type": "boolean",
@@ -200,10 +190,7 @@
200
190
  },
201
191
  {
202
192
  "type": "string",
203
- "enum": [
204
- "none",
205
- "all"
206
- ]
193
+ "enum": ["none", "all"]
207
194
  }
208
195
  ]
209
196
  },
@@ -220,11 +207,6 @@
220
207
  "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
221
208
  "default": false
222
209
  },
223
- "forkTypeChecker": {
224
- "type": "boolean",
225
- "description": "Run the TypeScript type checker in a forked process.",
226
- "default": true
227
- },
228
210
  "watch": {
229
211
  "type": "boolean",
230
212
  "description": "Run build when files change.",
@@ -236,11 +218,7 @@
236
218
  }
237
219
  },
238
220
  "additionalProperties": false,
239
- "required": [
240
- "outputPath",
241
- "main",
242
- "tsConfig"
243
- ],
221
+ "required": ["outputPath", "main", "tsConfig"],
244
222
  "definitions": {
245
223
  "fileReplacement": {
246
224
  "oneOf": [
@@ -257,10 +235,7 @@
257
235
  }
258
236
  },
259
237
  "additionalProperties": false,
260
- "required": [
261
- "src",
262
- "replaceWith"
263
- ]
238
+ "required": ["src", "replaceWith"]
264
239
  },
265
240
  {
266
241
  "type": "object",
@@ -275,10 +250,7 @@
275
250
  }
276
251
  },
277
252
  "additionalProperties": false,
278
- "required": [
279
- "replace",
280
- "with"
281
- ]
253
+ "required": ["replace", "with"]
282
254
  }
283
255
  ]
284
256
  }
@@ -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/src/test-utils.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lazyModuleFnImport = exports.lazyModuleFiles = exports.browserBuild = exports.createArchitect = exports.protractorTargetSpec = exports.tslintTargetSpec = exports.karmaTargetSpec = exports.extractI18nTargetSpec = exports.devServerTargetSpec = exports.browserTargetSpec = exports.outputPath = exports.host = exports.workspaceRoot = 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.lazyModuleFnImport = exports.lazyModuleFiles = exports.browserBuild = exports.createArchitect = exports.protractorTargetSpec = exports.tslintTargetSpec = exports.karmaTargetSpec = exports.extractI18nTargetSpec = exports.devServerTargetSpec = exports.browserTargetSpec = exports.outputPath = exports.host = exports.workspaceRoot = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const node_1 = require("@angular-devkit/architect/node");
13
13
  const testing_1 = require("@angular-devkit/architect/testing");
@@ -65,7 +65,7 @@ async function browserBuild(architect, host, target, overrides, scheduleOptions)
65
65
  cache = host
66
66
  .read(core_1.join(outputPath, path))
67
67
  .toPromise()
68
- .then(content => core_1.virtualFs.fileBufferToString(content));
68
+ .then((content) => core_1.virtualFs.fileBufferToString(content));
69
69
  return cache;
70
70
  },
71
71
  });
@@ -1,11 +1,11 @@
1
- /// <reference types="node" />
2
1
  /**
3
2
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
5
4
  *
6
5
  * Use of this source code is governed by an MIT-style license that can be
7
6
  * found in the LICENSE file at https://angular.io/license
8
7
  */
8
+ /// <reference types="node" />
9
9
  import { BuilderHandlerFn, BuilderInfo, BuilderOutput } from '@angular-devkit/architect';
10
10
  import { TestProjectHost } from '@angular-devkit/architect/testing';
11
11
  import { json, logging } from '@angular-devkit/core';
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuilderHarness = 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.BuilderHarness = void 0;
11
11
  const architect_1 = require("@angular-devkit/architect");
12
12
  const core_1 = require("@angular-devkit/core");
13
13
  const rxjs_1 = require("rxjs");
@@ -145,15 +145,15 @@ class BuilderHarness {
145
145
  context.logger.subscribe((e) => logs.push(e));
146
146
  return this.schemaRegistry.compile(this.builderInfo.optionSchema).pipe(operators_1.mergeMap((validator) => validator(targetOptions)), operators_1.map((validationResult) => validationResult.data), operators_1.mergeMap((data) => convertBuilderOutputToObservable(this.builderHandler(data, context))), operators_1.map((buildResult) => ({ result: buildResult, error: undefined })), operators_1.catchError((error) => {
147
147
  if (outputLogsOnException) {
148
- // tslint:disable-next-line: no-console
148
+ // eslint-disable-next-line no-console
149
149
  console.error(logs.map((entry) => entry.message).join('\n'));
150
- // tslint:disable-next-line: no-console
150
+ // eslint-disable-next-line no-console
151
151
  console.error(error);
152
152
  }
153
153
  return rxjs_1.of({ result: undefined, error });
154
154
  }), operators_1.map(({ result, error }) => {
155
155
  if (outputLogsOnFailure && (result === null || result === void 0 ? void 0 : result.success) === false && logs.length > 0) {
156
- // tslint:disable-next-line: no-console
156
+ // eslint-disable-next-line no-console
157
157
  console.error(logs.map((entry) => entry.message).join('\n'));
158
158
  }
159
159
  // Capture current logs and clear for next
@@ -163,6 +163,7 @@ class BuilderHarness {
163
163
  }), operators_1.finalize(() => {
164
164
  this.watcherNotifier = undefined;
165
165
  for (const teardown of context.teardowns) {
166
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
166
167
  teardown();
167
168
  }
168
169
  }));
@@ -217,9 +218,10 @@ class BuilderHarness {
217
218
  return this.host.scopedSync().exists(core_1.normalize(path));
218
219
  }
219
220
  hasFileMatch(directory, pattern) {
220
- return this.host.scopedSync()
221
+ return this.host
222
+ .scopedSync()
221
223
  .list(core_1.normalize(directory))
222
- .some(name => pattern.test(name));
224
+ .some((name) => pattern.test(name));
223
225
  }
224
226
  readFile(path) {
225
227
  const content = this.host.scopedSync().read(core_1.normalize(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.WatcherNotifier = void 0;
4
11
  class WatcherDescriptor {
@@ -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.describeBuilder = void 0;
4
11
  var jasmine_helpers_1 = require("./jasmine-helpers");
@@ -1,11 +1,11 @@
1
- /// <reference types="jasmine" />
2
1
  /**
3
2
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
5
4
  *
6
5
  * Use of this source code is governed by an MIT-style license that can be
7
6
  * found in the LICENSE file at https://angular.io/license
8
7
  */
8
+ /// <reference types="jasmine" />
9
9
  import { BuilderHandlerFn } from '@angular-devkit/architect';
10
10
  import { json } from '@angular-devkit/core';
11
11
  import { BuilderHarness } from './builder-harness';
@@ -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.expectFile = exports.describeBuilder = void 0;
4
11
  const fs_1 = require("fs");
@@ -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/src/transforms.js CHANGED
@@ -1,2 +1,9 @@
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 });
@@ -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 { json } from '@angular-devkit/core';
2
9
  import { Schema as RealTslintBuilderOptions } from './schema';
3
10
  declare const _default: import("@angular-devkit/architect/src/internal").Builder<RealTslintBuilderOptions & json.JsonObject>;