@angular-devkit/build-angular 0.901.6 → 0.901.7

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,22 +1,22 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "0.901.6",
3
+ "version": "0.901.7",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "experimental": true,
6
6
  "main": "src/index.js",
7
7
  "typings": "src/index.d.ts",
8
8
  "builders": "builders.json",
9
9
  "dependencies": {
10
- "@angular-devkit/architect": "0.901.6",
11
- "@angular-devkit/build-optimizer": "0.901.6",
12
- "@angular-devkit/build-webpack": "0.901.6",
13
- "@angular-devkit/core": "9.1.6",
10
+ "@angular-devkit/architect": "0.901.7",
11
+ "@angular-devkit/build-optimizer": "0.901.7",
12
+ "@angular-devkit/build-webpack": "0.901.7",
13
+ "@angular-devkit/core": "9.1.7",
14
14
  "@babel/core": "7.9.0",
15
15
  "@babel/generator": "7.9.3",
16
16
  "@babel/preset-env": "7.9.0",
17
17
  "@babel/template": "7.8.6",
18
18
  "@jsdevtools/coverage-istanbul-loader": "3.0.3",
19
- "@ngtools/webpack": "9.1.6",
19
+ "@ngtools/webpack": "9.1.7",
20
20
  "ajv": "6.12.0",
21
21
  "autoprefixer": "9.7.4",
22
22
  "babel-loader": "8.0.6",
@@ -63,7 +63,7 @@
63
63
  "terser-webpack-plugin": "2.3.5",
64
64
  "webpack": "4.42.0",
65
65
  "webpack-dev-middleware": "3.7.2",
66
- "webpack-dev-server": "3.10.3",
66
+ "webpack-dev-server": "3.11.0",
67
67
  "webpack-merge": "4.2.2",
68
68
  "webpack-sources": "1.4.3",
69
69
  "webpack-subresource-integrity": "1.4.0",
@@ -14,7 +14,6 @@ const url = require("url");
14
14
  const utils_1 = require("../utils");
15
15
  function runProtractor(root, options) {
16
16
  const additionalProtractorConfig = {
17
- elementExplorer: options.elementExplorer,
18
17
  baseUrl: options.baseUrl,
19
18
  specs: options.specs && options.specs.length ? options.specs : undefined,
20
19
  suite: options.suite,
@@ -12,6 +12,9 @@ export interface Schema {
12
12
  devServerTarget?: string;
13
13
  /**
14
14
  * Start Protractor's Element Explorer for debugging.
15
+ * @deprecated This option has no effect. See:
16
+ * https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow
17
+ * for alternative methods.
15
18
  */
16
19
  elementExplorer?: boolean;
17
20
  /**
@@ -38,7 +38,8 @@
38
38
  "elementExplorer": {
39
39
  "type": "boolean",
40
40
  "description": "Start Protractor's Element Explorer for debugging.",
41
- "default": false
41
+ "default": false,
42
+ "x-deprecated": "This option has no effect. See: https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow for alternative methods."
42
43
  },
43
44
  "webdriverUpdate": {
44
45
  "type": "boolean",
@@ -420,7 +420,7 @@ async function inlineLocales(options) {
420
420
  // If locale data is provided, load it and prepend to file
421
421
  const localeDataPath = (_a = i18n.locales[locale]) === null || _a === void 0 ? void 0 : _a.dataPath;
422
422
  if (localeDataPath) {
423
- localeDataContent = await loadLocaleData(localeDataPath, true);
423
+ localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
424
424
  }
425
425
  }
426
426
  const { diagnostics: localeDiagnostics, plugins } = await createI18nPlugins(locale, translations, isSourceLocale ? 'ignore' : options.missingTranslation || 'warning', localeDataContent);
@@ -492,7 +492,7 @@ async function inlineLocalesDirect(ast, options) {
492
492
  let localeDataSource = null;
493
493
  const localeDataPath = i18n.locales[locale] && i18n.locales[locale].dataPath;
494
494
  if (localeDataPath) {
495
- const localeDataContent = await loadLocaleData(localeDataPath, true);
495
+ const localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
496
496
  localeDataSource = new webpack_sources_1.OriginalSource(localeDataContent, path.basename(localeDataPath));
497
497
  }
498
498
  outputSource = localeDataSource
@@ -571,16 +571,33 @@ utils) {
571
571
  }
572
572
  return positions;
573
573
  }
574
- async function loadLocaleData(path, optimize) {
574
+ async function loadLocaleData(path, optimize, es5) {
575
575
  // The path is validated during option processing before the build starts
576
576
  const content = fs.readFileSync(path, 'utf8');
577
- // NOTE: This can be removed once the locale data files are preprocessed in the framework
578
- if (optimize) {
579
- const result = await terserMangle(content, {
580
- compress: true,
581
- ecma: 5,
582
- });
583
- return result.code;
577
+ // Downlevel and optimize the data
578
+ const transformResult = await core_1.transformAsync(content, {
579
+ filename: path,
580
+ // The types do not include the false option even though it is valid
581
+ // tslint:disable-next-line: no-any
582
+ inputSourceMap: false,
583
+ babelrc: false,
584
+ configFile: false,
585
+ presets: [
586
+ [
587
+ require.resolve('@babel/preset-env'),
588
+ {
589
+ bugfixes: true,
590
+ // IE 9 is the oldest supported browser
591
+ targets: es5 ? { ie: '9' } : { esmodules: true },
592
+ },
593
+ ],
594
+ ],
595
+ minified: environment_options_1.allowMinify && optimize,
596
+ compact: !environment_options_1.shouldBeautify && optimize,
597
+ comments: !optimize,
598
+ });
599
+ if (!transformResult || !transformResult.code) {
600
+ throw new Error(`Unknown error occurred processing bundle for "${path}".`);
584
601
  }
585
- return content;
602
+ return transformResult.code;
586
603
  }