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.16.8 to 5.16.9

7

CHANGELOG.md
# Changelog
## v5.16.9
- Fix parentheses in output of optional chains (`a?.b`) (#1374)
- More documentation on source maps (#1368)
- New `lhs_constants` option, allowing to stop Terser from swapping comparison operands (#1361)
## v5.16.8

@@ -8,3 +13,3 @@

## v5.16.7
## v5.16.6

@@ -11,0 +16,0 @@ - Become less conservative with analyzing function definitions for `reduce_vars`

4

lib/compress/common.js

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

AST_Call,
AST_Chain,
AST_Class,

@@ -230,3 +231,4 @@ AST_Const,

&& (
val instanceof AST_PropAccess
val instanceof AST_Chain
|| val instanceof AST_PropAccess
|| val instanceof AST_SymbolRef && val.name == "eval"

@@ -233,0 +235,0 @@ )

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

"license": "BSD-2-Clause",
"version": "5.16.8",
"version": "5.16.9",
"engines": {

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

@@ -711,3 +711,4 @@ <h1><img src="https://terser.org/img/terser-banner-logo.png" alt="Terser" width="400"></h1>

e.g. `!(a <= b) → a > b` (only when `unsafe_comps`), attempts to negate binary
nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc.
nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. Note: `comparisons`
works best with `lhs_constants` enabled.

@@ -779,2 +780,5 @@ - `computed_props` (default: `true`) -- Transforms constant computed properties

- `lhs_constants` (default: `true`) -- Moves constant values to the left-hand side
of binary nodes. `foo == 42 → 42 == foo`
- `loops` (default: `true`) -- optimizations for `do`, `while` and `for` loops

@@ -1272,2 +1276,8 @@ when we can statically determine the condition.

When debugging, make sure you enable the **"map scopes"** feature to map mangled variable names back to their original names.
Without this, all variable values will be `undefined`. See https://github.com/terser/terser/issues/1367 for more details.
<br/><br/>
![image](https://user-images.githubusercontent.com/27283110/230441652-ac5cf6b0-5dc5-4ffc-9d8b-bd02875484f4.png)
### Compiler assumptions

@@ -1274,0 +1284,0 @@

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

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