diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f90da..d662d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # `tailwindcss-rails` Changelog +## v4.2.3 / 2025-05-02 + +### Improved + +* The "tailwindcss:upgrade" task now pins to v4.1.4 of the `@tailwindcss/upgrade` tool. #544 @flavorjones + + ## v4.2.2 / 2025-04-05 ### Improved diff --git a/Gemfile.lock b/Gemfile.lock index 08ddee5..9b0500d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,11 +140,11 @@ GEM io-console (~> 0.5) securerandom (0.4.1) stringio (3.1.5) - tailwindcss-ruby (4.0.17) - tailwindcss-ruby (4.0.17-aarch64-linux-gnu) - tailwindcss-ruby (4.0.17-arm64-darwin) - tailwindcss-ruby (4.0.17-x86_64-darwin) - tailwindcss-ruby (4.0.17-x86_64-linux-gnu) + tailwindcss-ruby (4.1.7) + tailwindcss-ruby (4.1.7-aarch64-linux-gnu) + tailwindcss-ruby (4.1.7-arm64-darwin) + tailwindcss-ruby (4.1.7-x86_64-darwin) + tailwindcss-ruby (4.1.7-x86_64-linux-gnu) thor (1.3.2) timeout (0.4.3) tzinfo (2.0.6) diff --git a/README.md b/README.md index 7188adf..158b175 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Then, run `bin/rails tailwindcss:upgrade`. Among other things, this will try to - If present, moves `app/assets/stylesheets/application.tailwind.css` to `app/assets/tailwind/application.css`. - Removes unnecessary `stylesheet_link_tag "tailwindcss"` tags from the application layout. - Removes references to the Inter font from the application layout. -- Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended). +- Runs v4.1.4 of the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended). @@ -145,7 +145,7 @@ $ bin/rails tailwindcss:upgrade remove app/assets/stylesheets/application.tailwind.css 10.9.0 Running the upstream Tailwind CSS upgrader - run npx @tailwindcss/upgrade --force --config /home/user/myapp/config/tailwind.config.js from "." + run npx @tailwindcss/upgrade@4.1.4 --force --config /home/user/myapp/config/tailwind.config.js from "." ≈ tailwindcss v4.0.0 │ Searching for CSS files in the current directory and its subdirectories… │ ↳ Linked `./config/tailwind.config.js` to `./app/assets/tailwind/application.css` diff --git a/lib/install/upgrade_tailwindcss.rb b/lib/install/upgrade_tailwindcss.rb index 004d9a8..d6ecada 100644 --- a/lib/install/upgrade_tailwindcss.rb +++ b/lib/install/upgrade_tailwindcss.rb @@ -45,8 +45,14 @@ end if system("npx --version") + # We're pinning to v4.1.4 because v4.1.5 of the upgrade tool introduces a dependency version check + # on tailwind and I haven't been able to figure out how to get that to work reliably and I am + # extremely frustrated with the whole thing. See #544 + # + # At some point we will probably need to unpin this at which point I am sincerely hoping that + # someone else will do it. say "Running the upstream Tailwind CSS upgrader" - command = Shellwords.join(["npx", "@tailwindcss/upgrade", "--force", "--config", TAILWIND_CONFIG_PATH.to_s]) + command = Shellwords.join(["npx", "@tailwindcss/upgrade@4.1.4", "--force", "--config", TAILWIND_CONFIG_PATH.to_s]) success = run(command, abort_on_failure: false) unless success say "The upgrade tool failed!", :red diff --git a/lib/tailwindcss/version.rb b/lib/tailwindcss/version.rb index 8a0f50d..7ab2db8 100644 --- a/lib/tailwindcss/version.rb +++ b/lib/tailwindcss/version.rb @@ -1,3 +1,3 @@ module Tailwindcss - VERSION = "4.2.2" + VERSION = "4.2.3" end