Socket
Socket
Sign inDemoInstall

terser

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terser - npm Package Compare versions

Comparing version 3.10.13 to 3.11.0

18

lib/scope.js

@@ -63,2 +63,5 @@ /***********************************************************************

var MASK_EXPORT_DONT_MANGLE = 1 << 0;
var MASK_EXPORT_WANT_MANGLE = 1 << 1;
SymbolDef.prototype = {

@@ -69,3 +72,3 @@ unmangleable: function(options) {

return this.global && !options.toplevel
|| this.export
|| (this.export & MASK_EXPORT_DONT_MANGLE)
|| this.undeclared

@@ -257,3 +260,8 @@ || !options.eval && this.scope.pinned()

var node = tw.parent(level);
def.export = node instanceof AST_Export;
if (def.export = node instanceof AST_Export && MASK_EXPORT_DONT_MANGLE) {
var exported = node.exported_definition;
if ((exported instanceof AST_Defun || exported instanceof AST_DefClass) && node.is_default) {
def.export = MASK_EXPORT_WANT_MANGLE;
}
}
}

@@ -281,3 +289,3 @@ });

sym = self.def_global(node);
if (node instanceof AST_SymbolExport) sym.export = node.TYPE;
if (node instanceof AST_SymbolExport) sym.export = MASK_EXPORT_DONT_MANGLE;
} else if (sym.scope instanceof AST_Lambda && name == "arguments") {

@@ -578,3 +586,5 @@ sym.scope.uses_arguments = true;

if (!member(symbol.name, options.reserved)) {
if (!symbol.export) to_mangle.push(symbol);
if (!(symbol.export & MASK_EXPORT_DONT_MANGLE)) {
to_mangle.push(symbol);
}
}

@@ -581,0 +591,0 @@ }

@@ -7,3 +7,3 @@ {

"license": "BSD-2-Clause",
"version": "3.10.13",
"version": "3.11.0",
"engines": {

@@ -10,0 +10,0 @@ "node": ">=0.8.0"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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