From 86784a5eef6c9d4e5fbb68e5c7a1eedfc23ed8a8 Mon Sep 17 00:00:00 2001 From: Andrej Baran Date: Fri, 14 Oct 2016 10:54:54 +0200 Subject: [PATCH] Get rid of ES6 completely --- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/types.ts | 6 ++---- tests/baselines/reference/APISample_linter.js | 4 ++-- tests/cases/compiler/APISample_linter.ts | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 553efa9e3af..545c7f3e708 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -101,7 +101,7 @@ namespace ts { "amd": ModuleKind.AMD, "system": ModuleKind.System, "umd": ModuleKind.UMD, - "es6": ModuleKind.ES6, + "es6": ModuleKind.ES2015, "es2015": ModuleKind.ES2015, }), description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015, @@ -261,7 +261,7 @@ namespace ts { type: createMap({ "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, - "es6": ScriptTarget.ES6, + "es6": ScriptTarget.ES2015, "es2015": ScriptTarget.ES2015, "es2016": ScriptTarget.ES2016, "es2017": ScriptTarget.ES2017, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ae9502c21d2..68bda608238 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3019,8 +3019,7 @@ namespace ts { AMD = 2, UMD = 3, System = 4, - ES6 = 5, - ES2015 = ES6, + ES2015 = 5, } export const enum JsxEmit { @@ -3053,8 +3052,7 @@ namespace ts { export const enum ScriptTarget { ES3 = 0, ES5 = 1, - ES6 = 2, - ES2015 = ES6, + ES2015 = 2, ES2016 = 3, ES2017 = 4, Latest = ES2017, diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 4e563c7cac3..1421b53a00c 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -58,7 +58,7 @@ export function delint(sourceFile: ts.SourceFile) { const fileNames: string[] = process.argv.slice(2); fileNames.forEach(fileName => { // Parse a file - let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); + let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true); // delint it delint(sourceFile); @@ -113,7 +113,7 @@ exports.delint = delint; var fileNames = process.argv.slice(2); fileNames.forEach(function (fileName) { // Parse a file - var sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); + var sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true); // delint it delint(sourceFile); }); diff --git a/tests/cases/compiler/APISample_linter.ts b/tests/cases/compiler/APISample_linter.ts index 89f0be7a0f5..dc5e2644b4f 100644 --- a/tests/cases/compiler/APISample_linter.ts +++ b/tests/cases/compiler/APISample_linter.ts @@ -61,7 +61,7 @@ export function delint(sourceFile: ts.SourceFile) { const fileNames: string[] = process.argv.slice(2); fileNames.forEach(fileName => { // Parse a file - let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); + let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true); // delint it delint(sourceFile);