terser
Advanced tools
Comparing version 5.24.0 to 5.25.0
# Changelog | ||
## v5.25.0 | ||
- Regex properties added to reserved property mangler (#1471) | ||
- `pure_new` option added to drop unused `new` expressions. | ||
## v5.24.0 | ||
@@ -4,0 +8,0 @@ - Improve formatting performance in V8 by keeping a small work string and a large output string |
@@ -831,2 +831,5 @@ /*********************************************************************** | ||
} | ||
if ((this instanceof AST_New) && compressor.option("pure_new")) { | ||
return true; | ||
} | ||
return !!has_annotation(this, _PURE) || !compressor.pure_funcs(this); | ||
@@ -833,0 +836,0 @@ }); |
@@ -7,3 +7,3 @@ { | ||
"license": "BSD-2-Clause", | ||
"version": "5.24.0", | ||
"version": "5.25.0", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=10" |
@@ -823,2 +823,5 @@ <h1><img src="https://terser.org/img/terser-banner-logo.png" alt="Terser" width="400"></h1> | ||
- `pure_new` (default: `false`) -- Set to `true` to assume `new X()` never has | ||
side effects. | ||
- `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and | ||
@@ -825,0 +828,0 @@ used as constant values. |
@@ -53,2 +53,3 @@ /// <reference lib="es2015" /> | ||
pure_funcs?: string[]; | ||
pure_new?: boolean; | ||
pure_getters?: boolean | 'strict'; | ||
@@ -55,0 +56,0 @@ reduce_funcs?: boolean; |
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
2120924
60320
1420