-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: add migration guide for chalk to util styletext codemod #8430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a migration guide for developers transitioning from the Chalk library to Node.js's native util.styleText functionality. The guide documents a new codemod that automates this migration process.
- Introduces comprehensive documentation for the
chalk-to-util-styletextcodemod - Documents compatible and non-compatible features between Chalk and Node.js util.styleText
- Provides practical before/after code examples demonstrating the migration
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8430 +/- ##
==========================================
+ Coverage 73.64% 73.68% +0.03%
==========================================
Files 107 107
Lines 9161 9161
Branches 312 311 -1
==========================================
+ Hits 6747 6750 +3
+ Misses 2412 2409 -3
Partials 2 2 ☔ View full report in Codecov by Sentry. |
mikeesto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
AugustinMauroy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay nice ! but few things:
- you have to add you as authors on blog https://github.com/nodejs/nodejs.org/blob/main/apps/site/authors.json
- a mention of when styleText became stable and if you are on app verify that you are on the right version (on prod). And if you are using it on package the user have to check their nodejs version support and reming them that changing node.js version support is a major bump on their package
- last but no least a paragraph to thanks the maintainer. because without npm ecosystem node can't exist.
Description
This PR addresses the comment here by adding a new Codemod migration guide for the new recipe:
chalk-to-util-styletext.Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.