Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-block-scoping

Package Overview
Dependencies
54
Maintainers
6
Versions
103
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.12.11 to 7.12.12

14

lib/index.js

@@ -311,2 +311,14 @@ "use strict";

function isStrict(path) {
return !!path.find(({
node
}) => {
if (_core.types.isProgram(node)) {
if (node.sourceType === "module") return true;
} else if (!_core.types.isBlockStatement(node)) return false;
return node.directives.some(directive => directive.value.value === "use strict");
});
}
class BlockScoping {

@@ -425,3 +437,3 @@ constructor(loopPath, blockPath, parent, scope, throwIfClosureRequired, tdzEnabled, state) {

if (binding.kind === "hoisted" && (!parentBinding || isVar(parentBinding.path.parent))) {
if (binding.kind === "hoisted" && !binding.path.node.async && !binding.path.node.generator && (!parentBinding || isVar(parentBinding.path.parent)) && !isStrict(binding.path.parentPath)) {
continue;

@@ -428,0 +440,0 @@ }

2

package.json
{
"name": "@babel/plugin-transform-block-scoping",
"version": "7.12.11",
"version": "7.12.12",
"description": "Compile ES2015 block scoping (const and let) to ES5",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc