terser 1.1.20 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +42 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +3 -3
- data/Rakefile +0 -2
- data/lib/terser/version.rb +1 -1
- data/lib/terser.js +1 -1
- data/lib/terser.rb +1 -0
- data/lib/terser_wrapper.js +1 -1
- metadata +3 -3
data/lib/terser.rb
CHANGED
@@ -79,6 +79,7 @@ class Terser
|
|
79
79
|
:negate_iife => true, # Negate immediately invoked function expressions to avoid extra parens
|
80
80
|
:pure_getters => false, # Assume that object property access does not have any side-effects
|
81
81
|
:pure_funcs => nil, # List of functions without side-effects. Can safely discard function calls when the result value is not used
|
82
|
+
:pure_new => false, # List of functions without side-effects. Can safely discard function calls when the result value is not used
|
82
83
|
:drop_console => false, # Drop calls to console.* functions
|
83
84
|
:keep_fargs => false, # Preserve unused function arguments
|
84
85
|
:keep_classnames => false, # Prevents discarding or mangling of class names. Pass a regular expression to only keep class names matching that regex.
|
data/lib/terser_wrapper.js
CHANGED
@@ -49,7 +49,7 @@ function terser_wrapper(options) {
|
|
49
49
|
inputs[inputFilename] = source;
|
50
50
|
|
51
51
|
try {
|
52
|
-
return Terser.
|
52
|
+
return Terser.minify_sync(inputs, options, null);
|
53
53
|
} catch (error) {
|
54
54
|
const { message, filename, line, col, pos } = error;
|
55
55
|
return {error: {message: message, filename: filename, line: line, col: col, pos: pos}}
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Rosicky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.6.0.dev
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Ruby wrapper for Terser JavaScript compressor
|