@babel/plugin-transform-block-scoped-functions
Advanced tools
Comparing version 7.21.4-esm.3 to 7.21.4-esm.4
@@ -1,10 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
var _core = require("@babel/core"); | ||
var _default = (0, _helperPluginUtils.declare)(api => { | ||
import { declare } from "@babel/helper-plugin-utils"; | ||
import { types as t } from "@babel/core"; | ||
export default declare(api => { | ||
api.assertVersion(7); | ||
@@ -15,3 +9,3 @@ function transformStatementList(paths) { | ||
const func = path.node; | ||
const declar = _core.types.variableDeclaration("let", [_core.types.variableDeclarator(func.id, _core.types.toExpression(func))]); | ||
const declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]); | ||
declar._blockHoist = 2; | ||
@@ -30,5 +24,5 @@ func.id = null; | ||
} = path; | ||
if (_core.types.isFunction(parent, { | ||
if (t.isFunction(parent, { | ||
body: node | ||
}) || _core.types.isExportDeclaration(parent)) { | ||
}) || t.isExportDeclaration(parent)) { | ||
return; | ||
@@ -44,4 +38,3 @@ } | ||
}); | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-transform-block-scoped-functions", | ||
"version": "7.21.4-esm.3", | ||
"version": "7.21.4-esm.4", | ||
"description": "Babel plugin to ensure function declarations at the block level are block scoped", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.21.4-esm.3" | ||
"@babel/helper-plugin-utils": "7.21.4-esm.4" | ||
}, | ||
@@ -27,4 +27,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.21.4-esm.3", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.3" | ||
"@babel/core": "7.21.4-esm.4", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.4" | ||
}, | ||
@@ -31,0 +31,0 @@ "engines": { |
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
6
6269
36
+ Added@babel/helper-plugin-utils@7.21.4-esm.4(transitive)
- Removed@babel/helper-plugin-utils@7.21.4-esm.3(transitive)