Repository navigation
chore(create-email): replace ora with picospinner - #3891
Conversation
|
@LuggaPugga is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 821b8ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Swap ora and log-symbols for picospinner, which react-email and @react-email/ui already use. The spinner only starts on a TTY because picospinner would otherwise write every frame to CI logs and pipes; non-TTY output now prints just the final success line.
00372dc to
821b8ef
Compare
dielduarte
left a comment
There was a problem hiding this comment.
Thanks a lot for this, @LuggaPugga! Going from 20 packages to 1 for everyone running npx create-email is a really nice win 🙏
Before merging, I rebased onto canary and pushed one small change. The spinner now uses the same check as the spinner in react-email: it only runs in a real terminal, and is skipped when CI is set or TERM=dumb. In those cases you just get the final ✔ React Email Starter files ready line, the same as in pipes.
Awesome, thanks a lot for merging :) |
Replaces
oraandlog-symbolsincreate-emailwithpicospinner, whichreact-emailand@react-email/uialready depend on.For people running
npx create-email, the spinner goes from 20 packages (~304 KB) to 1 package (~24 KB)Behaviour
In an interactive terminal the output looks the same: the same cyan braille spinner, the same green
✔ React Email Starter files ready, and the cursor is hidden while it spins. The spinner redraws a little faster (~50 ms per frame instead of ~80 ms).picospinner doesn't check for a TTY and would write every frame into CI logs and pipes, so the spinner only starts when
process.stdout.isTTYis true. Otherwise only the final line is printed:✔ React Email Starter files ready- Preparing files..., blank line, coloured✔ …✔ React Email Starter files readySummary by cubic
Replaces
oraandlog-symbolsincreate-emailwithpicospinner, whichreact-emailand@react-email/uialready depend on. Runningnpx create-emailnow pulls in 1 package (~24 KB) instead of 20 (~304 KB).Interactive output stays the same: the same cyan braille spinner, the same green
✔ React Email Starter files ready, and the cursor hides while spinning, with frames redrawn slightly faster (~50 ms per frame instead of ~80 ms).Since
picospinnerwrites every frame regardless of TTY, the spinner only starts on an interactive terminal. Whenprocess.stdout.isTTYis false,TERMisdumb, orCIis set, output changes from a blank line plus coloured success text to a plain✔ React Email Starter files readyline.Written for commit 821b8ef. Summary will update on new commits.