babel-core
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -29,3 +29,3 @@ #!/usr/bin/env node | ||
commander.option("--keep-module-id-extensions", "Keep extensions when generating module ids", false); | ||
commander.option("-a, --auxilary-comment [comment]", "Comment text to prepend to all auxilary code"); | ||
commander.option("-a, --auxiliary-comment [comment]", "Comment text to prepend to all auxiliary code"); | ||
@@ -104,3 +104,3 @@ commander.on("--help", function () { | ||
keepModuleIdExtensions: commander.keepModuleIdExtensions, | ||
auxilaryComment: commander.auxilaryComment, | ||
auxiliaryComment: commander.auxiliaryComment, | ||
externalHelpers: commander.externalHelpers, | ||
@@ -107,0 +107,0 @@ sourceMapName: commander.outFile, |
@@ -10,3 +10,3 @@ # 6to5 Changelog | ||
* **New Feature** | ||
* Add `auxilaryComment`/`--auxilary-comment` option that prepends comments to auxilary helpers. | ||
* Add `auxiliaryComment`/`--auxiliary-comment` option that prepends comments to auxiliary helpers. | ||
@@ -13,0 +13,0 @@ ## 3.6.5 |
@@ -16,2 +16,9 @@ # Changelog | ||
## 4.2.0 | ||
* **Polish** | ||
* Use an assignment instead of a define for `__esModule` in loose mode. | ||
* **Internal** | ||
* Add error for `eval();` usage and enable strict mode for parsing. | ||
## 4.1.0 | ||
@@ -18,0 +25,0 @@ |
@@ -19,3 +19,4 @@ var util = require("util"); | ||
unknownForHead: "Unknown node type $1 in ForStatement", | ||
didYouMean: "Did you mean $1?" | ||
didYouMean: "Did you mean $1?", | ||
evalInStrictMode: "eval is not allowed in strict mode" | ||
}; | ||
@@ -22,0 +23,0 @@ |
@@ -90,3 +90,3 @@ "use strict"; | ||
"externalHelpers", | ||
"auxilaryComment", | ||
"auxiliaryComment", | ||
@@ -306,4 +306,4 @@ // these are used by plugins | ||
File.prototype.attachAuxilaryComment = function (node) { | ||
var comment = this.opts.auxilaryComment; | ||
File.prototype.attachAuxiliaryComment = function (node) { | ||
var comment = this.opts.auxiliaryComment; | ||
if (comment) { | ||
@@ -373,3 +373,3 @@ node.leadingComments = node.leadingComments || []; | ||
opts.allowImportExportEverywhere = this.isLoose("es6.modules"); | ||
//opts.strictMode = this.transformers.useStrict.canRun(); | ||
opts.strictMode = this.transformers.useStrict.canRun(); | ||
@@ -376,0 +376,0 @@ return parse(opts, code, function (tree) { |
@@ -44,8 +44,3 @@ "use strict"; | ||
// invalid key | ||
throw new ReferenceError( | ||
"Unknown transformer " + key + " specified in " + type + " - " + | ||
"transformer key names have been changed in 3.0.0 see " + | ||
"the changelog for more info " + | ||
"https://github.com/babel/babel/blob/master/CHANGELOG.md#300" | ||
); | ||
throw new ReferenceError("Unknown transformer " + key + " specified in " + type); | ||
} | ||
@@ -52,0 +47,0 @@ } |
@@ -23,3 +23,5 @@ "use strict"; | ||
if (!this.noInteropRequireImport && this.hasNonDefaultExports) { | ||
file.ast.program.body.push(util.template("exports-module-declaration", true)); | ||
var templateName = "exports-module-declaration"; | ||
if (this.file.isLoose("es6.modules")) templateName += "-loose"; | ||
file.ast.program.body.push(util.template(templateName, true)); | ||
} | ||
@@ -26,0 +28,0 @@ }; |
@@ -23,3 +23,3 @@ "use strict"; | ||
if (declar.init) { | ||
node.body.unshift(file.attachAuxilaryComment(t.variableDeclaration(kind, [declarNode]))); | ||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, [declarNode]))); | ||
} else { | ||
@@ -32,3 +32,3 @@ kinds[kind] = kinds[kind] || []; | ||
for (kind in kinds) { | ||
node.body.unshift(file.attachAuxilaryComment(t.variableDeclaration(kind, kinds[kind]))); | ||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, kinds[kind]))); | ||
} | ||
@@ -35,0 +35,0 @@ }); |
"use strict"; | ||
var useStrict = require("../../helpers/use-strict"); | ||
var messages = require("../../../messages"); | ||
var t = require("../../../types"); | ||
@@ -20,1 +21,7 @@ | ||
}; | ||
exports.CallExpression = function (node, parent, scope, file) { | ||
if (t.isIdentifier(node.callee, { name: "eval" })) { | ||
throw file.errorWithNode(node, messages.get("evalInStrictMode")); | ||
} | ||
}; |
{ | ||
"name": "babel-core", | ||
"description": "Turn ES6 code into readable vanilla ES5 with source maps", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -26,3 +26,3 @@ "homepage": "https://babeljs.io/", | ||
"dependencies": { | ||
"acorn-babel": "0.11.1-32", | ||
"acorn-babel": "0.11.1-33", | ||
"ast-types": "~0.6.1", | ||
@@ -29,0 +29,0 @@ "chalk": "^0.5.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1607574
13201
42
+ Addedacorn-babel@0.11.1-33(transitive)
- Removedacorn-babel@0.11.1-32(transitive)
Updatedacorn-babel@0.11.1-33