From bcb300dccbfd3e909a4ec89efb636f69b36ead6c Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Mon, 28 Jun 2021 00:48:56 -0400 Subject: [PATCH] Replace uglifier with terser in dummy applications Terser is more up to date with modern javascript features, and the uglifier gem repository recommends using it for minifying ES6+. Followup for 955041b --- Gemfile | 2 +- Gemfile.lock | 6 +++--- actionmailbox/test/dummy/config/environments/production.rb | 2 +- actiontext/test/dummy/config/environments/production.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index b956c7e85e4d2..6ac22a81c1bab 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem "bcrypt", "~> 3.1.11", require: false # This needs to be with require false to avoid it being automatically loaded by # sprockets. -gem "uglifier", ">= 1.3.0", require: false +gem "terser", ">= 1.1.4", require: false # Explicitly avoid 1.x that doesn't support Ruby 2.4+ gem "json", ">= 2.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index d3b10b59b3711..b13e4d162bd13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -479,6 +479,8 @@ GEM stackprof (0.2.17) sucker_punch (3.0.1) concurrent-ruby (~> 1.0) + terser (1.1.4) + execjs (>= 0.3.0, < 3) thin (1.8.1) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) @@ -492,8 +494,6 @@ GEM tzinfo (2.0.4) concurrent-ruby (~> 1.0) uber (0.1.0) - uglifier (4.2.0) - execjs (>= 0.3.0, < 3) unicode-display_width (2.0.0) useragent (0.16.10) vegas (0.1.11) @@ -590,9 +590,9 @@ DEPENDENCIES sqlite3 (~> 1.4) stackprof sucker_punch + terser (>= 1.1.4) turbolinks (~> 5) tzinfo-data - uglifier (>= 1.3.0) w3c_validators (~> 1.3.6) wdm (>= 0.1.0) webdrivers diff --git a/actionmailbox/test/dummy/config/environments/production.rb b/actionmailbox/test/dummy/config/environments/production.rb index 80cec7f779d40..9fb44990d200d 100644 --- a/actionmailbox/test/dummy/config/environments/production.rb +++ b/actionmailbox/test/dummy/config/environments/production.rb @@ -23,7 +23,7 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = :terser # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. diff --git a/actiontext/test/dummy/config/environments/production.rb b/actiontext/test/dummy/config/environments/production.rb index ea36f546a86d0..dbcc3d0c6755d 100644 --- a/actiontext/test/dummy/config/environments/production.rb +++ b/actiontext/test/dummy/config/environments/production.rb @@ -25,7 +25,7 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = :terser # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed.