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