terser 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/terser/version.rb +1 -1
- data/lib/terser.js +746 -170
- data/lib/terser.rb +4 -1
- metadata +2 -2
data/lib/terser.rb
CHANGED
|
@@ -87,7 +87,10 @@ class Terser
|
|
|
87
87
|
:keep_infinity => false, # Prevent compression of Infinity to 1/0
|
|
88
88
|
:lhs_constants => true, # Moves constant values to the left-hand side of binary nodes. `foo == 42 → 42 == foo`
|
|
89
89
|
:side_effects => true, # Pass false to disable potentially dropping functions marked as "pure" using pure comment annotation. See TerserJS documentation for details.
|
|
90
|
-
:switches => true # de-duplicate and remove unreachable switch branches
|
|
90
|
+
:switches => true, # de-duplicate and remove unreachable switch branches
|
|
91
|
+
:ecma => 5, # Pass `2015` or greater to enable `compress` options that will transform ES5 code into smaller ES6+ equivalent forms.
|
|
92
|
+
:builtins_ecma => 5, # An ES version number (like `ecma`). Tells Terser which well-known functions, constants, methods and classes are available in the global object. Does nothing by itself, but is used by `builtins_pure` and `unsafe`.
|
|
93
|
+
:builtins_pure => false # Pass `true` to assume that functions matched by the `builtins_ecma` option (such as `Math.sin` or `unescape`) are pure and calls to them can be removed.
|
|
91
94
|
}, # Apply transformations to code, set to false to skip
|
|
92
95
|
:parse => {
|
|
93
96
|
:bare_returns => false, # Allow top-level return statements.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: terser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Rosicky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: execjs
|