File: override-uglifier-version-check.patch

package info (click to toggle)
ruby-sprockets 4.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,964 kB
  • sloc: ruby: 13,014; javascript: 157; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Joe Nahmias <jello@debian.org>
Date: Sat, 11 Oct 2025 23:04:48 -0400
Subject: override uglifier version check

---
 lib/sprockets/uglifier_compressor.rb | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/lib/sprockets/uglifier_compressor.rb b/lib/sprockets/uglifier_compressor.rb
index e8df01e..ead0366 100644
--- a/lib/sprockets/uglifier_compressor.rb
+++ b/lib/sprockets/uglifier_compressor.rb
@@ -44,14 +44,17 @@ module Sprockets
     end
 
     def call(input)
-      case Autoload::Uglifier::VERSION.to_i
-      when 1
-        raise "uglifier 1.x is no longer supported, please upgrade to 2.x or newer"
-      when 2
-        input_options = { source_filename: input[:filename] }
-      else
-        input_options = { source_map: { filename: input[:filename] } }
+      if false  # Debian patches sprockets to use terser when uglifier is requested
+        case Autoload::Uglifier::VERSION.to_i
+        when 1
+          raise "uglifier 1.x is no longer supported, please upgrade to 2.x or newer"
+        when 2
+          input_options = { source_filename: input[:filename] }
+        else
+          input_options = { source_map: { filename: input[:filename] } }
+        end
       end
+      input_options = { source_map: { filename: input[:filename] } }
 
       uglifier = Autoload::Uglifier.new(@options.merge(input_options))