diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3889c27c..04d5060e 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: @@ -37,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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f9bc25..f4d55543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ ## 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. + + 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/Gemfile.lock b/Gemfile.lock index 8c603c6d..eae16b37 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/ @@ -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) 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/tailwindcss/version.rb b/lib/tailwindcss/version.rb index 5c301936..f9567764 100644 --- a/lib/tailwindcss/version.rb +++ b/lib/tailwindcss/version.rb @@ -1,3 +1,3 @@ module Tailwindcss - VERSION = "3.3.0" + VERSION = "3.3.2" end 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 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