diff --git a/bin/6to5/index.js b/bin/6to5/index.js index da2137456a..0cd6382a1c 100755 --- a/bin/6to5/index.js +++ b/bin/6to5/index.js @@ -22,7 +22,6 @@ commander.option("--loose [list]", "List of transformers to enable their loose m commander.option("-o, --out-file [out]", "Compile all input files into a single file"); commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory"); commander.option("-c, --remove-comments", "Remove comments from the compiled code", false); -commander.option("-a, --amd-module-ids", "Insert module id in AMD modules", false); // todo: remove in 3.0.0 commander.option("-m, --module-ids", "Insert module id in modules", false); commander.option("-R, --react-compat", "Makes the react transformer produce pre-v0.12 code"); commander.option("-E, --include-regenerator", "Include the regenerator runtime if necessary", false); @@ -100,7 +99,7 @@ exports.opts = { experimental: commander.experimental, reactCompat: commander.reactCompat, playground: commander.playground, - moduleIds: commander.amdModuleIds || commander.moduleIds, + moduleIds: commander.moduleIds, blacklist: commander.blacklist, whitelist: commander.whitelist, sourceMap: commander.sourceMaps || commander.sourceMapsInline, diff --git a/lib/6to5/file.js b/lib/6to5/file.js index b22bf8220e..5c953ba7f2 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -48,9 +48,10 @@ File.helpers = [ File.validOptions = [ "filename", - "fileNameRelative", + "filenameRelative", "blacklist", "whitelist", + "loose", "optional", "modules", "sourceMap", @@ -85,7 +86,7 @@ File.normaliseOptions = function (opts) { reactCompat: false, playground: false, whitespace: true, - moduleIds: opts.amdModuleIds || false, + moduleIds: false, blacklist: [], whitelist: [], sourceMap: false, diff --git a/test/_transformation-helper.js b/test/_transformation-helper.js index c036440f9e..77ae528105 100644 --- a/test/_transformation-helper.js +++ b/test/_transformation-helper.js @@ -49,8 +49,11 @@ var run = function (task, done) { var execCode = exec.code; var result; + var noCheckAst = opts.noCheckAst; + delete opts.noCheckAst; + var checkAst = function (result) { - if (opts.noCheckAst) return; + if (noCheckAst) return; var errors = esvalid.errors(result.ast.program); if (errors.length) { diff --git a/test/fixtures/transformation/es6-modules-amd/module-name/options.json b/test/fixtures/transformation/es6-modules-amd/module-name/options.json index a2868455b4..be49a87d0b 100644 --- a/test/fixtures/transformation/es6-modules-amd/module-name/options.json +++ b/test/fixtures/transformation/es6-modules-amd/module-name/options.json @@ -1,3 +1,3 @@ { - "amdModuleIds": true + "moduleIds": true } diff --git a/test/fixtures/transformation/es6-modules-umd/module-name/options.json b/test/fixtures/transformation/es6-modules-umd/module-name/options.json index a2868455b4..be49a87d0b 100644 --- a/test/fixtures/transformation/es6-modules-umd/module-name/options.json +++ b/test/fixtures/transformation/es6-modules-umd/module-name/options.json @@ -1,3 +1,3 @@ { - "amdModuleIds": true + "moduleIds": true }