terser 1.1.13 → 1.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +96 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -3
- data/lib/terser/compressor.rb +1 -1
- data/lib/terser/version.rb +1 -1
- data/lib/terser.js +1 -1
- data/lib/terser.rb +5 -5
- data/terser.gemspec +1 -1
- metadata +4 -4
data/lib/terser.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
require "json"
|
5
5
|
require "base64"
|
6
6
|
require "execjs"
|
7
|
-
require "terser/railtie" if defined?(
|
7
|
+
require "terser/railtie" if defined?(Rails::Railtie)
|
8
8
|
require "terser/version"
|
9
9
|
|
10
10
|
# A wrapper around the Terser interface
|
@@ -405,8 +405,8 @@ class Terser
|
|
405
405
|
if @options[:keep_fnames] || DEFAULTS[:keep_fnames]
|
406
406
|
true
|
407
407
|
else
|
408
|
-
@options[type].respond_to?(:[]) && @options[type][:keep_fnames] ||
|
409
|
-
DEFAULTS[type].respond_to?(:[]) && DEFAULTS[type][:keep_fnames]
|
408
|
+
(@options[type].respond_to?(:[]) && @options[type][:keep_fnames]) ||
|
409
|
+
(DEFAULTS[type].respond_to?(:[]) && DEFAULTS[type][:keep_fnames])
|
410
410
|
end
|
411
411
|
end
|
412
412
|
|
@@ -414,8 +414,8 @@ class Terser
|
|
414
414
|
if @options[:keep_classnames] || DEFAULTS[:keep_classnames]
|
415
415
|
true
|
416
416
|
else
|
417
|
-
@options[type].respond_to?(:[]) && @options[type][:keep_classnames] ||
|
418
|
-
DEFAULTS[type].respond_to?(:[]) && DEFAULTS[type][:keep_classnames]
|
417
|
+
(@options[type].respond_to?(:[]) && @options[type][:keep_classnames]) ||
|
418
|
+
(DEFAULTS[type].respond_to?(:[]) && DEFAULTS[type][:keep_classnames])
|
419
419
|
end
|
420
420
|
end
|
421
421
|
|
data/terser.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
|
33
33
|
spec.add_runtime_dependency "execjs", [">= 0.3.0", "< 3"]
|
34
34
|
spec.add_development_dependency "bundler", ">= 1.3"
|
35
|
-
spec.add_development_dependency "rake", "~>
|
35
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
36
36
|
spec.add_development_dependency "rspec", "~> 3.0"
|
37
37
|
spec.add_development_dependency "sourcemap", "~> 0.1.1"
|
38
38
|
end
|
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.1.
|
4
|
+
version: 1.1.14
|
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: 2023-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '13.0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '13.0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|