tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.27k stars 4.22k forks source link

Improve robustness when upgrading #15038

Closed RobinMalfait closed 3 days ago

RobinMalfait commented 3 days ago

This PR improves the robustness when running the upgrade script.

Right now when you run it and if you run into issues, it could be that an error with stack trace is printed in the terminal. This PR improves most of the cases where this happens to ensure the output is easier to parse as a human.

Test plan:

Used SourceGraph to find some popular open source repositories that use Tailwind and tried to run the upgrade tool on those repositories. If a repository fails to upgrade, then that's a good candidate for this PR to showcase the improved error messages.

github.com/docker/docs

Before After
image image

github.com/parcel-bundler/parcel

Before After
image image

github.com/vercel/next.js

Before After
image image