@babel/node
Advanced tools
Comparing version 8.0.0-alpha.11 to 8.0.0-alpha.12
@@ -38,3 +38,3 @@ import * as commander from "commander"; | ||
program.allowUnknownOption(true); | ||
program.version("8.0.0-alpha.11"); | ||
program.version("8.0.0-alpha.12"); | ||
program.usage("[options] [ -e script | script.js ] [arguments]"); | ||
@@ -67,7 +67,2 @@ program.parse(process.argv); | ||
visitor: { | ||
VariableDeclaration(path) { | ||
if (path.node.kind !== "var") { | ||
throw path.buildCodeFrameError("Only `var` variables are supported in the REPL"); | ||
} | ||
}, | ||
Program(path) { | ||
@@ -90,7 +85,7 @@ let hasExpressionStatement; | ||
if (!code) return undefined; | ||
code = babel.transformSync(code, { | ||
filename: filename, | ||
presets: opts.presets, | ||
code = babel.transformSync(code, Object.assign({ | ||
filename: filename | ||
}, babelOptions, { | ||
plugins: (opts.plugins || []).concat([replPlugin]) | ||
}).code; | ||
})).code; | ||
return vm.runInThisContext(code, { | ||
@@ -97,0 +92,0 @@ filename: filename |
@@ -14,3 +14,3 @@ import getV8Flags from "v8flags"; | ||
function getNormalizedV8Flag(arg) { | ||
const matches = arg.match(/--(?:no)?(.+)/); | ||
const matches = /--(?:no)?(.+)/.exec(arg); | ||
if (matches) { | ||
@@ -17,0 +17,0 @@ return `--${matches[1].replace(/_/g, "-")}`; |
{ | ||
"name": "@babel/node", | ||
"version": "8.0.0-alpha.11", | ||
"version": "8.0.0-alpha.12", | ||
"description": "Babel command line", | ||
@@ -26,3 +26,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/register": "^8.0.0-alpha.11", | ||
"@babel/register": "^8.0.0-alpha.12", | ||
"commander": "^12.1.0", | ||
@@ -34,9 +34,9 @@ "core-js": "^3.30.2", | ||
"peerDependencies": { | ||
"@babel/core": "^8.0.0-alpha.11" | ||
"@babel/core": "^8.0.0-alpha.12" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^8.0.0-alpha.11", | ||
"@babel/helper-transform-fixture-test-runner": "^8.0.0-alpha.11", | ||
"@babel/preset-env": "^8.0.0-alpha.11", | ||
"@babel/runtime": "^8.0.0-alpha.11", | ||
"@babel/core": "^8.0.0-alpha.12", | ||
"@babel/helper-transform-fixture-test-runner": "^8.0.0-alpha.12", | ||
"@babel/preset-env": "^8.0.0-alpha.12", | ||
"@babel/runtime": "^8.0.0-alpha.12", | ||
"@types/v8flags": "^3.1.1" | ||
@@ -43,0 +43,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96930
272