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

babel-plugin-minify-dead-code-elimination

Package Overview
Dependencies
Maintainers
5
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-dead-code-elimination - npm Package Compare versions

Comparing version 0.3.0-alpha.9a74dfd1 to 0.3.0-alpha.a351eeed

18

lib/index.js

@@ -275,2 +275,8 @@ "use strict";

return "continue";
} else if (
// ClassDeclaration has binding in two scopes
// 1. The scope in which it is declared
// 2. The class's own scope
binding.path.isClassDeclaration() && binding.path === scope.path) {
return "continue";
}

@@ -427,3 +433,8 @@

if (replacementPath.isIdentifier()) {
_bail = refPath.scope.getBinding(replacement.name) !== scope.getBinding(replacement.name);
var _binding2 = scope.getBinding(replacement.name);
// the reference should be in the same scope
// and the replacement should be a constant - this is to
// ensure that the duplication of replacement is not affected
// https://github.com/babel/minify/issues/685
_bail = !(_binding2 && refPath.scope.getBinding(replacement.name) === _binding2 && _binding2.constantViolations.length === 0);
} else {

@@ -441,3 +452,6 @@ replacementPath.traverse({

}
_bail = refPath.scope.getBinding(node.name) !== scope.getBinding(node.name);
var binding = scope.getBinding(node.name);
if (binding && refPath.scope.getBinding(node.name) === binding) {
_bail = binding.constantViolations.length > 0;
}
}

@@ -444,0 +458,0 @@ });

8

package.json
{
"name": "babel-plugin-minify-dead-code-elimination",
"version": "0.3.0-alpha.9a74dfd1",
"version": "0.3.0-alpha.a351eeed",
"description": "",

@@ -15,7 +15,7 @@ "keywords": [

"dependencies": {
"babel-helper-evaluate-path": "^0.3.0-alpha.9a74dfd1",
"babel-helper-mark-eval-scopes": "^0.3.0-alpha.9a74dfd1",
"babel-helper-remove-or-void": "^0.3.0-alpha.9a74dfd1",
"babel-helper-evaluate-path": "^0.3.0-alpha.a351eeed",
"babel-helper-mark-eval-scopes": "^0.3.0-alpha.a351eeed",
"babel-helper-remove-or-void": "^0.3.0-alpha.a351eeed",
"lodash.some": "^4.6.0"
}
}
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