From a6ead3fb1bdf4aec8282cd766f78dd7ba11c4de3 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 23 Jan 2025 15:14:22 -0500 Subject: [PATCH 1/8] ci: trigger on pushes to v*-stable branches --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3889c27c..05739def 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - v*-stable tags: - v*.*.* pull_request: From 1f694adb4d7cd616f1e71804c70bcf65f0b7541a Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 23 Jan 2025 15:12:19 -0500 Subject: [PATCH 2/8] dep: pin tailwindcss-ruby to `~> 3.0` to avoid unintentional upgrades to Tailwind v4 --- tailwindcss-rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailwindcss-rails.gemspec b/tailwindcss-rails.gemspec index 8d893029..0077df2a 100644 --- a/tailwindcss-rails.gemspec +++ b/tailwindcss-rails.gemspec @@ -19,5 +19,5 @@ Gem::Specification.new do |spec| spec.files = Dir["{app,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] spec.add_dependency "railties", ">= 7.0.0" - spec.add_dependency "tailwindcss-ruby" + spec.add_dependency "tailwindcss-ruby", "~> 3.0" end From c2dfc6df95126a619ce4f9658806caca715fcea9 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 23 Jan 2025 15:17:40 -0500 Subject: [PATCH 3/8] ci: drop the tailwind v4 compatibility tests --- .github/workflows/ci.yml | 2 +- .github/workflows/upstream.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05739def..04d5060e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: fail-fast: false matrix: plat: ["ubuntu", "windows", "macos"] - tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"] + tailwind: ["--version=~>3.4.14"] runs-on: ${{matrix.plat}}-latest env: TAILWINDCSSOPTS: ${{ matrix.tailwind }} diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 5c213e6e..a1bae4ca 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -42,7 +42,7 @@ jobs: matrix: plat: ["ubuntu"] ref: ["7-2-stable", "8-0-stable", "main"] - tailwind: ["--version=~>3.4.14", "--version=~>4.0.0.alpha.27"] + tailwind: ["--version=~>3.4.14"] env: RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }} TAILWINDCSSOPTS: ${{ matrix.tailwind }} From 8828ea7cb980d1e715a1d5f5649388a75f5604f6 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 23 Jan 2025 15:33:30 -0500 Subject: [PATCH 4/8] version bump to v3.3.1 --- CHANGELOG.md | 7 +++++++ lib/tailwindcss/version.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f9bc25..47965781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## next / unreleased +## v3.3.1 / 2025-01-23 + +* Pin the dependency on `tailwindcss-ruby` to `~> 3.0` to avoid users from upgrading Tailwind while still on v3 of this gem. + + While it was useful during the Tailwind v4 beta period to allow users to float this dependency to try upgrading, we know (now that v4.0.0.rc1 of this gem is out) that not everything will work well if combining Tailwind v4 with `tailwindcss-rails` v3. Pinning this dependency should protect developers against unexpected issues. + + ## v3.3.0 / 2025-01-19 * Add support for using the puma plugin in a standalone puma process (outside of `rails server`). (#458) @flavorjones diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb index 5c301936..df5e8b53 100644 --- a/lib/tailwindcss/version.rb +++ b/lib/tailwindcss/version.rb @@ -1,3 +1,3 @@ module Tailwindcss - VERSION = "3.3.0" + VERSION = "3.3.1" end From 02a4fcbbd1cb62e93665bf861d0d51a6842dc590 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 23 Jan 2025 15:36:15 -0500 Subject: [PATCH 5/8] doc: tweak CHANGELOG and bump the Gemfile.lock version [skip ci] --- CHANGELOG.md | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47965781..a4c26ef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v3.3.1 / 2025-01-23 -* Pin the dependency on `tailwindcss-ruby` to `~> 3.0` to avoid users from upgrading Tailwind while still on v3 of this gem. +* Pin the dependency on `tailwindcss-ruby` to `~> 3.0` to prevent users from upgrading Tailwind while still on v3 of this gem. While it was useful during the Tailwind v4 beta period to allow users to float this dependency to try upgrading, we know (now that v4.0.0.rc1 of this gem is out) that not everything will work well if combining Tailwind v4 with `tailwindcss-rails` v3. Pinning this dependency should protect developers against unexpected issues. diff --git a/Gemfile.lock b/Gemfile.lock index 8c603c6d..e3205188 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ PATH remote: . specs: - tailwindcss-rails (3.2.0) + tailwindcss-rails (3.3.1) railties (>= 7.0.0) - tailwindcss-ruby + tailwindcss-ruby (~> 3.0) GEM remote: https://rubygems.org/ From 2354e8374c48bf9ed37dec8d7daf649d989c91fe Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 21 Apr 2025 13:13:39 -0400 Subject: [PATCH 6/8] dep: update Gemfile.lock for net-protocol --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e3205188..eae16b37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -87,7 +87,8 @@ GEM net-protocol net-protocol (0.2.2) timeout - net-smtp (0.5.0) + net-smtp (0.5.1) + net-protocol nokogiri (1.18.1) mini_portile2 (~> 2.8.2) racc (~> 1.4) From 06f5d456d0f336a5d1ada95b56665cdc23b85d08 Mon Sep 17 00:00:00 2001 From: wlipa Date: Sat, 12 Apr 2025 15:29:42 -0700 Subject: [PATCH 7/8] suppress caniuse-lite is outdated warning Co-authored-by: Mike Dalessio --- lib/puma/plugin/tailwindcss.rb | 2 +- lib/tailwindcss/commands.rb | 2 ++ lib/tasks/build.rake | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/puma/plugin/tailwindcss.rb b/lib/puma/plugin/tailwindcss.rb index 4624d7e8..f5f914b9 100644 --- a/lib/puma/plugin/tailwindcss.rb +++ b/lib/puma/plugin/tailwindcss.rb @@ -13,7 +13,7 @@ def start(launcher) # If we use system(*command) instead, IRB and Debug can't read from $stdin # correctly bacause some keystrokes will be taken by watch_command. begin - IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io| + IO.popen(Tailwindcss::Commands::ENV, Tailwindcss::Commands.watch_command, 'r+') do |io| IO.copy_stream(io, $stdout) end rescue Interrupt diff --git a/lib/tailwindcss/commands.rb b/lib/tailwindcss/commands.rb index 40d983a6..27764107 100644 --- a/lib/tailwindcss/commands.rb +++ b/lib/tailwindcss/commands.rb @@ -2,6 +2,8 @@ module Tailwindcss module Commands + ENV = {'BROWSERSLIST_IGNORE_OLD_DATA' => '1'} + class << self def compile_command(debug: false, **kwargs) rails_root = defined?(Rails) ? Rails.root : Pathname.new(Dir.pwd) diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake index 3044ff05..d4e845e3 100644 --- a/lib/tasks/build.rake +++ b/lib/tasks/build.rake @@ -4,7 +4,7 @@ namespace :tailwindcss do debug = args.extras.include?("debug") command = Tailwindcss::Commands.compile_command(debug: debug) puts command.inspect if args.extras.include?("verbose") - system(*command, exception: true) + system(Tailwindcss::Commands::ENV, *command, exception: true) end desc "Watch and build your Tailwind CSS on file changes" @@ -14,7 +14,7 @@ namespace :tailwindcss do always = args.extras.include?("always") command = Tailwindcss::Commands.watch_command(always: always, debug: debug, poll: poll) puts command.inspect if args.extras.include?("verbose") - system(*command) + system(Tailwindcss::Commands::ENV, *command) rescue Interrupt puts "Received interrupt, exiting tailwindcss:watch" if args.extras.include?("verbose") end From 37385557e5702b78ac861802d6a51405128a5449 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 21 Apr 2025 13:22:16 -0400 Subject: [PATCH 8/8] version bump to v3.3.2 --- CHANGELOG.md | 5 +++++ lib/tailwindcss/version.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4c26ef9..f4d55543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## next / unreleased +## v3.3.2 / 2025-04-21 + +* Quash the "caniuse-lite is outdated" warning message from the `tailwindcss` CLI. #536 @wlipa + + ## v3.3.1 / 2025-01-23 * Pin the dependency on `tailwindcss-ruby` to `~> 3.0` to prevent users from upgrading Tailwind while still on v3 of this gem. diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb index df5e8b53..f9567764 100644 --- a/lib/tailwindcss/version.rb +++ b/lib/tailwindcss/version.rb @@ -1,3 +1,3 @@ module Tailwindcss - VERSION = "3.3.1" + VERSION = "3.3.2" end