Comparing version 5.16.8 to 5.16.9
# 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` |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2076493
59089
1385
7
41