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 5.17.2 to 5.17.3

4

CHANGELOG.md
# Changelog
## v5.17.3
- Fix issue with trimming a static class property's contents accessing the class as `this`.
## v5.17.2

@@ -4,0 +8,0 @@ - Be less conservative when detecting use-before-definition of `var` in hoisted functions.

@@ -168,2 +168,11 @@ /***********************************************************************

if (
prop instanceof AST_ClassProperty
&& prop.static
&& prop.value.has_side_effects(compressor)
&& prop.contains_this()
) {
return this;
}
const trimmed_prop = prop.drop_side_effect_free(compressor);

@@ -170,0 +179,0 @@ if (trimmed_prop)

@@ -87,2 +87,3 @@ /***********************************************************************

AST_Return,
AST_Scope,
AST_Sequence,

@@ -954,2 +955,15 @@ AST_SimpleStatement,

AST_Node.DEFMETHOD("contains_this", function() {
return walk(this, node => {
if (node instanceof AST_This) return walk_abort;
if (
node !== this
&& node instanceof AST_Scope
&& !(node instanceof AST_Arrow)
) {
return true;
}
});
});
export function is_modified(compressor, tw, node, value, level, immutable) {

@@ -956,0 +970,0 @@ var parent = tw.parent(level);

2

package.json

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

"license": "BSD-2-Clause",
"version": "5.17.2",
"version": "5.17.3",
"engines": {

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

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

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