diff --git a/integration/angular_cli/e2e/tsconfig.json b/integration/angular_cli/e2e/tsconfig.json index 39b800f78961..c92199cfd63f 100644 --- a/integration/angular_cli/e2e/tsconfig.json +++ b/integration/angular_cli/e2e/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "outDir": "../out-tsc/e2e", "module": "commonjs", - "target": "es5", + "target": "es2018", "types": [ "jasmine", "jasminewd2", diff --git a/integration/angular_cli/tsconfig.json b/integration/angular_cli/tsconfig.json index 8c4ef3bbae3a..28b9d3a9c9fa 100644 --- a/integration/angular_cli/tsconfig.json +++ b/integration/angular_cli/tsconfig.json @@ -7,10 +7,10 @@ "declaration": false, "downlevelIteration": true, "experimentalDecorators": true, - "module": "esnext", + "module": "es2020", "moduleResolution": "node", "importHelpers": true, - "target": "es2015", + "target": "es2016", "lib": [ "es2018", "dom" diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index b7561498d3d9..dfb0b6e72eea 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -193,7 +193,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { if (profilingEnabled) { extraPlugins.push( new debug.ProfilingPlugin({ - outputPath: path.resolve(root, `chrome-profiler-events${targetInFileName}.json`), + outputPath: path.resolve(root, 'chrome-profiler-events.json'), }), ); } @@ -302,7 +302,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { apply(compiler: Compiler) { compiler.hooks.emit.tap('angular-cli-stats', compilation => { const data = JSON.stringify(compilation.getStats().toJson('verbose')); - compilation.assets[`stats${targetInFileName}.json`] = new RawSource(data); + compilation.assets['stats.json'] = new RawSource(data); }); } })(), diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts index 8e380442a5c4..63469f36c128 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts @@ -32,7 +32,8 @@ export enum ThresholdSeverity { } enum DifferentialBuildType { - ORIGINAL = 'es2015', + // FIXME: this should match the actual file suffix and not hardcoded. + ORIGINAL = 'es2016', DOWNLEVEL = 'es5', } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator_spec.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator_spec.ts index 17988d6f0e75..605816760fbd 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator_spec.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator_spec.ts @@ -126,7 +126,7 @@ describe('bundle-calculator', () => { { name: '0', original: { - filename: 'foo-es2015.js', + filename: 'foo-es2016.js', size: 1.25 * KB, }, downlevel: { @@ -141,7 +141,7 @@ describe('bundle-calculator', () => { expect(failures.length).toBe(2); expect(failures).toContain({ severity: ThresholdSeverity.Error, - message: jasmine.stringMatching('Exceeded maximum budget for foo-es2015.'), + message: jasmine.stringMatching('Exceeded maximum budget for foo-es2016.'), }); expect(failures).toContain({ severity: ThresholdSeverity.Error, @@ -170,7 +170,7 @@ describe('bundle-calculator', () => { name: '0', // Individual builds are under budget, but combined they are over. original: { - filename: 'foo-es2015.js', + filename: 'foo-es2016.js', size: 0.5 * KB, }, downlevel: { @@ -240,7 +240,7 @@ describe('bundle-calculator', () => { name: '0', // Individual builds are under budget, but combined they are over. original: { - filename: 'initial-es2015.js', + filename: 'initial-es2016.js', size: 1.25 * KB, }, downlevel: { @@ -255,7 +255,7 @@ describe('bundle-calculator', () => { expect(failures.length).toBe(2); expect(failures).toContain({ severity: ThresholdSeverity.Error, - message: jasmine.stringMatching('Exceeded maximum budget for initial-es2015.'), + message: jasmine.stringMatching('Exceeded maximum budget for initial-es2016.'), }); expect(failures).toContain({ severity: ThresholdSeverity.Error, @@ -283,7 +283,7 @@ describe('bundle-calculator', () => { name: '0', // Individual builds are under budget, but combined they are over. original: { - filename: 'initial-es2015.js', + filename: 'initial-es2016.js', size: 0.5 * KB, }, downlevel: { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts index a986e007d0de..bdb1357e50f4 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts @@ -51,10 +51,10 @@ describe('augment-index-html', () => { it(`should emit correct script tags when having 'module' and 'non-module' js`, async () => { const es2015JsFiles: FileInfo[] = [ - { file: 'runtime-es2015.js', extension: '.js', name: 'main' }, - { file: 'main-es2015.js', extension: '.js', name: 'main' }, - { file: 'runtime-es2015.js', extension: '.js', name: 'polyfills' }, - { file: 'polyfills-es2015.js', extension: '.js', name: 'polyfills' }, + { file: 'runtime-es2016.js', extension: '.js', name: 'main' }, + { file: 'main-es2016.js', extension: '.js', name: 'main' }, + { file: 'runtime-es2016.js', extension: '.js', name: 'polyfills' }, + { file: 'polyfills-es2016.js', extension: '.js', name: 'polyfills' }, ]; const es5JsFiles: FileInfo[] = [ @@ -82,11 +82,11 @@ describe('augment-index-html', () => {
- - + + - +