Skip to content

Conversation

yoshi-taka
Copy link
Contributor

@yoshi-taka yoshi-taka commented Aug 29, 2025

https://github.com/es-tooling/module-replacements/blob/main/docs/modules/chalk.md

Chalk is no longer needed since Node.js provides sufficient native support.
This change simplifies the codebase and makes installation faster.


Summary by cubic

Replaced chalk with Node’s native util.styleText in the preview dev server, removing the chalk dependency. Keeps the same colored output while simplifying setup and speeding up installs.

@yoshi-taka yoshi-taka requested a review from a team as a code owner August 29, 2025 16:06
@yoshi-taka yoshi-taka requested review from vcapretz and removed request for a team August 29, 2025 16:06
Copy link

vercel bot commented Aug 29, 2025

@yoshi-taka is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Aug 29, 2025

🦋 Changeset detected

Latest commit: 9f2f637

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@react-email/preview-server Patch
react-email Patch

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

Copy link

pkg-pr-new bot commented Aug 29, 2025

Open in StackBlitz

@react-email/button

npm i https://pkg.pr.new/resend/react-email/@react-email/button@2430

@react-email/code-block

npm i https://pkg.pr.new/resend/react-email/@react-email/code-block@2430

@react-email/code-inline

npm i https://pkg.pr.new/resend/react-email/@react-email/code-inline@2430

@react-email/column

npm i https://pkg.pr.new/resend/react-email/@react-email/column@2430

@react-email/components

npm i https://pkg.pr.new/resend/react-email/@react-email/components@2430

@react-email/container

npm i https://pkg.pr.new/resend/react-email/@react-email/container@2430

create-email

npm i https://pkg.pr.new/resend/react-email/create-email@2430

@react-email/head

npm i https://pkg.pr.new/resend/react-email/@react-email/head@2430

@react-email/heading

npm i https://pkg.pr.new/resend/react-email/@react-email/heading@2430

@react-email/hr

npm i https://pkg.pr.new/resend/react-email/@react-email/hr@2430

@react-email/img

npm i https://pkg.pr.new/resend/react-email/@react-email/img@2430

@react-email/link

npm i https://pkg.pr.new/resend/react-email/@react-email/link@2430

@react-email/preview

npm i https://pkg.pr.new/resend/react-email/@react-email/preview@2430

@react-email/preview-server

npm i https://pkg.pr.new/resend/react-email/@react-email/preview-server@2430

react-email

npm i https://pkg.pr.new/resend/react-email@2430

@react-email/render

npm i https://pkg.pr.new/resend/react-email/@react-email/render@2430

@react-email/section

npm i https://pkg.pr.new/resend/react-email/@react-email/section@2430

@react-email/text

npm i https://pkg.pr.new/resend/react-email/@react-email/text@2430

commit: 3a97bb3

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@yoshi-taka yoshi-taka changed the title chore(preview): Replace chalk with Node.js native implementation chore(preview-server): Replace chalk with Node.js native implementation Aug 29, 2025
@gabrielmfern
Copy link
Member

really like this, but I don't think that's the only place we use chalk across the entire repo

@gabrielmfern gabrielmfern changed the title chore(preview-server): Replace chalk with Node.js native implementation feat(react-email, preview-server): use styleText from node:util instead of chalk Sep 8, 2025
@gabrielmfern gabrielmfern changed the base branch from canary to main September 8, 2025 18:25
@gabrielmfern gabrielmfern force-pushed the nativestyleText branch 2 times, most recently from e8d27f3 to 3a97bb3 Compare September 8, 2025 18:32
@gabrielmfern gabrielmfern merged commit 1e53b4c into resend:main Sep 8, 2025
3 of 7 checks passed
@gabrielmfern
Copy link
Member

gabrielmfern commented Sep 8, 2025

Thank you so much for this! Just released it under react-email@4.2.9 so we can avoid our users getting into security issues

@roderickhsiao
Copy link
Contributor

good timing of removing the package :)

@ethndotsh
Copy link

This has broken support for Bun, until Bun updates their node:util compat to include styleText. Reverting to react-email version 4.2.8 has fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants