terser 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0df4df7d398c0f92a7764fe0dbc8727d57c81df483ce0971d70fcbab762d4ebe
4
- data.tar.gz: a11aba6fb280518f7aedf86cc8b66ea2745679fb4e019c8911e4af053fa569b4
3
+ metadata.gz: d79d0688a70b6f77b0e45737ae90c958734d11080febb1f80887ed9a535ede05
4
+ data.tar.gz: 733c3240a15b13ca63b4761bd275cd8e223712fee89f2c3b0713221414e92d6f
5
5
  SHA512:
6
- metadata.gz: 60aca4d535adb3a1d86396e06013657f1db73a1074849ee1a6ac0caf2bc093846abe8f49575a2ce4a2c694e05011814914099e655b702e51a988dcd21b983f78
7
- data.tar.gz: 41ba3d478eacb5128bf45d86975567570209369e609016ecc8b2e8ead21488ce826ef3ab89f3f53916cd6325512935ad78fd0a1b64ec42579de400419efeb7a5
6
+ metadata.gz: 2d1c473588c4428de591ad2fd0aa59e39dfcf2fd7d98ab935ce9055393abf386940e49f65e39c8b0a1f07151302c80e6b7ae9245c139ffc1f0843d240c928dc2
7
+ data.tar.gz: 8aabca2f15a1127158edc010b51b7514531ce66364ba0d610e19163e1810644fe1b39114dae86b5642cd68578759a74d1705531420021095d3b406d12783ef9b
@@ -1,9 +1,9 @@
1
1
  AllCops:
2
2
  DisplayCopNames: true
3
- TargetRubyVersion: 2.3
3
+ TargetRubyVersion: 2.5
4
4
  Exclude:
5
- - uglifier.gemspec
6
- - lib/uglifier/version.rb
5
+ - terser.gemspec
6
+ - lib/terser/version.rb
7
7
  - "vendor/**/*"
8
8
  - "benchmark/*"
9
9
  - "gemfiles/vendor/**/*"
@@ -18,55 +18,130 @@ Metrics/BlockLength:
18
18
 
19
19
  Metrics/ClassLength:
20
20
  Enabled: false
21
-
22
21
  Layout/LineLength:
23
22
  Max: 150
24
-
25
23
  Metrics/MethodLength:
26
24
  Max: 20
27
-
28
25
  Style/Encoding:
29
26
  Enabled: false
30
-
31
27
  Style/HashSyntax:
32
28
  EnforcedStyle: hash_rockets
33
-
34
29
  Style/PercentLiteralDelimiters:
35
30
  Enabled: false
36
-
37
31
  Style/PreferredHashMethods:
38
32
  Enabled: false
39
-
40
33
  Style/SignalException:
41
34
  Enabled: false
42
-
43
35
  Style/StringLiterals:
44
36
  Enabled: false
45
-
46
37
  Style/SymbolArray:
47
38
  Enabled: false
48
-
49
39
  Style/Alias:
50
40
  Enabled: false
51
-
52
41
  Style/MutableConstant:
53
42
  Enabled: false
54
-
55
43
  Style/ExpandPathArguments:
56
44
  Enabled: false
57
-
58
45
  Lint/RaiseException:
59
46
  Enabled: true
60
-
61
47
  Lint/StructNewOverride:
62
48
  Enabled: true
63
-
64
49
  Style/HashEachMethods:
65
50
  Enabled: true
66
-
67
51
  Style/HashTransformKeys:
68
52
  Enabled: true
69
-
70
53
  Style/HashTransformValues:
71
54
  Enabled: true
55
+ Layout/BeginEndAlignment:
56
+ Enabled: true
57
+ Layout/EmptyLinesAroundAttributeAccessor:
58
+ Enabled: true
59
+ Layout/SpaceAroundMethodCallOperator:
60
+ Enabled: true
61
+ Lint/BinaryOperatorWithIdenticalOperands:
62
+ Enabled: true
63
+ Lint/ConstantDefinitionInBlock:
64
+ Enabled: true
65
+ Lint/DeprecatedOpenSSLConstant:
66
+ Enabled: true
67
+ Lint/DuplicateElsifCondition:
68
+ Enabled: true
69
+ Lint/DuplicateRequire:
70
+ Enabled: true
71
+ Lint/DuplicateRescueException:
72
+ Enabled: true
73
+ Lint/EmptyConditionalBody:
74
+ Enabled: true
75
+ Lint/EmptyFile:
76
+ Enabled: true
77
+ Lint/FloatComparison:
78
+ Enabled: true
79
+ Lint/HashCompareByIdentity:
80
+ Enabled: true
81
+ Lint/IdentityComparison:
82
+ Enabled: true
83
+ Lint/MissingSuper:
84
+ Enabled: true
85
+ Lint/MixedRegexpCaptureTypes:
86
+ Enabled: true
87
+ Lint/OutOfRangeRegexpRef:
88
+ Enabled: true
89
+ Lint/RedundantSafeNavigation:
90
+ Enabled: true
91
+ Lint/SelfAssignment:
92
+ Enabled: true
93
+ Lint/TopLevelReturnWithArgument:
94
+ Enabled: true
95
+ Lint/TrailingCommaInAttributeDeclaration:
96
+ Enabled: true
97
+ Lint/UnreachableLoop:
98
+ Enabled: true
99
+ Lint/UselessMethodDefinition:
100
+ Enabled: true
101
+ Lint/UselessTimes:
102
+ Enabled: true
103
+ Style/AccessorGrouping:
104
+ Enabled: true
105
+ Style/BisectedAttrAccessor:
106
+ Enabled: true
107
+ Style/CaseLikeIf:
108
+ Enabled: true
109
+ Style/ClassEqualityComparison:
110
+ Enabled: true
111
+ Style/CombinableLoops:
112
+ Enabled: true
113
+ Style/ExplicitBlockArgument:
114
+ Enabled: true
115
+ Style/ExponentialNotation:
116
+ Enabled: true
117
+ Style/GlobalStdStream:
118
+ Enabled: true
119
+ Style/HashAsLastArrayItem:
120
+ Enabled: true
121
+ Style/HashLikeCase:
122
+ Enabled: true
123
+ Style/KeywordParametersOrder:
124
+ Enabled: true
125
+ Style/OptionalBooleanParameter:
126
+ Enabled: true
127
+ Style/RedundantAssignment:
128
+ Enabled: true
129
+ Style/RedundantFetchBlock:
130
+ Enabled: true
131
+ Style/RedundantFileExtensionInRequire:
132
+ Enabled: true
133
+ Style/RedundantRegexpCharacterClass:
134
+ Enabled: true
135
+ Style/RedundantRegexpEscape:
136
+ Enabled: true
137
+ Style/RedundantSelfAssignment:
138
+ Enabled: true
139
+ Style/SingleArgumentDig:
140
+ Enabled: true
141
+ Style/SlicingWithRange:
142
+ Enabled: true
143
+ Style/SoleNestedConditional:
144
+ Enabled: true
145
+ Style/StringConcatenation:
146
+ Enabled: true
72
147
 
@@ -9,6 +9,7 @@ rvm:
9
9
  - jruby-head
10
10
  - jruby-9.2.12.0
11
11
  - truffleruby
12
+ - truffleruby-head
12
13
  before_install:
13
14
  - gem install bundler -v 1.17.3
14
15
  git:
@@ -23,4 +24,5 @@ matrix:
23
24
  - rvm: ruby-head
24
25
  - rvm: truffleruby
25
26
  - rvm: jruby-head
27
+ - rvm: truffleruby-head
26
28
  fast_finish: true
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.0.2 (13 October 2020)
4
+ - LICENSE.txt encoding fix
5
+ - update rubocop to 0.93.1
6
+
3
7
  ## 1.0.1 (02 August 2020)
4
8
  - share the context in order to speedup sprockets compilation
5
9
 
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'rubocop', '~> 0.81.0', :group => [:development]
7
+ gem 'rubocop', '~> 0.93.1', :group => [:development] unless RUBY_VERSION < '2.5'
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Pavel Rosick�
3
+ Copyright (c) 2020 Pavel Rosický
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -77,7 +77,7 @@ https://github.com/mishoo/UglifyJS
77
77
  disclaimer in the documentation and/or other materials
78
78
  provided with the distribution.
79
79
 
80
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AS IS AND ANY
80
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
81
81
  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
82
82
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
83
83
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
@@ -90,4 +90,4 @@ https://github.com/mishoo/UglifyJS
90
90
  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
91
91
  SUCH DAMAGE.
92
92
 
93
- ***********************************************************************/
93
+ ***********************************************************************/
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ def changelog_tail
19
19
  if changelog.start_with?(HEADER)
20
20
  changelog[HEADER.length + 2..-1]
21
21
  else
22
- "\n" + changelog
22
+ "\n#{changelog}"
23
23
  end
24
24
  end
25
25
 
@@ -143,9 +143,9 @@ class Terser
143
143
  #
144
144
  # @param options [Hash] optional overrides to +Terser::DEFAULTS+
145
145
  def initialize(options = {})
146
- (options.keys - DEFAULTS.keys - EXTRA_OPTIONS)[0..1].each do |missing|
147
- raise ArgumentError, "Invalid option: #{missing}"
148
- end
146
+ missing = options.keys - DEFAULTS.keys - EXTRA_OPTIONS
147
+ raise ArgumentError, "Invalid option: #{missing.first}" if missing.any?
148
+
149
149
  @options = options
150
150
  end
151
151
 
@@ -195,8 +195,8 @@ class Terser
195
195
  return '' unless source_map_options[:source_map].respond_to?(:[])
196
196
 
197
197
  suffix = ''
198
- suffix += "\n//# sourceMappingURL=" + source_map_options[:source_map][:map_url] if source_map_options[:source_map][:map_url]
199
- suffix += "\n//# sourceURL=" + source_map_options[:source_map][:url] if source_map_options[:source_map][:url]
198
+ suffix += "\n//# sourceMappingURL=#{source_map_options[:source_map][:map_url]}" if source_map_options[:source_map][:map_url]
199
+ suffix += "\n//# sourceURL=#{source_map_options[:source_map][:url]}" if source_map_options[:source_map][:url]
200
200
  suffix
201
201
  end
202
202
 
@@ -432,7 +432,7 @@ class Terser
432
432
  def enclose_options
433
433
  if @options[:enclose]
434
434
  @options[:enclose].map do |pair|
435
- pair.first + ':' + pair.last
435
+ "#{pair.first}:#{pair.last}"
436
436
  end
437
437
  else
438
438
  false
@@ -2,5 +2,5 @@
2
2
 
3
3
  class Terser
4
4
  # Current version of Terser.
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  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.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Rosicky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-02 00:00:00.000000000 Z
11
+ date: 2020-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs