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

babel-plugin-minify-mangle-names

Package Overview
Dependencies
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-mangle-names - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

24

lib/scope-tracker.js

@@ -142,2 +142,26 @@ "use strict";

// Safari raises a syntax error for a `let` or `const` declaration in a
// `for` loop initialization that shadows a parent function's parameter.
// https://github.com/babel/babili/issues/559
// https://bugs.webkit.org/show_bug.cgi?id=171041
// https://trac.webkit.org/changeset/217200/webkit/trunk/Source
var maybeDecl = binding.path.parentPath;
var isBlockScoped = maybeDecl.isVariableDeclaration({ kind: "let" }) || maybeDecl.isVariableDeclaration({ kind: "const" });
if (isBlockScoped) {
var maybeFor = maybeDecl.parentPath;
var isForLoopBinding = maybeFor.isForStatement({ init: maybeDecl.node }) || maybeFor.isForXStatement({ left: maybeDecl.node });
if (isForLoopBinding) {
var fnParent = maybeFor.getFunctionParent();
if (fnParent.isFunction({ body: maybeFor.parent })) {
var parentFunctionBinding = this.bindings.get(fnParent.scope).get(next);
if (parentFunctionBinding) {
var parentFunctionHasParamBinding = parentFunctionBinding.kind === "param";
if (parentFunctionHasParamBinding) {
return false;
}
}
}
}
}
for (var i = 0; i < binding.constantViolations.length; i++) {

@@ -144,0 +168,0 @@ var violation = binding.constantViolations[i];

5

package.json
{
"name": "babel-plugin-minify-mangle-names",
"version": "0.1.2",
"version": "0.1.3",
"description": "",

@@ -16,4 +16,3 @@ "homepage": "https://github.com/babel/babili#readme",

"babel-helper-mark-eval-scopes": "^0.1.1"
},
"devDependencies": {}
}
}
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