Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-block-scoped-functions

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-block-scoped-functions - npm Package Compare versions

Comparing version 7.21.4-esm.3 to 7.21.4-esm.4

lib/package.json

19

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc