chore: [PRODUCT-523] replace usages of chalk with @std/fmt/colors, lock chalk to ^5.6.2 #193
Conversation
|
Cursor Agent can help with this pull request. Just |
Changed Files
|
chalk with @std/fmt/colors, lock chalk to ^5.6.2
Co-authored-by: danieltaox <danieltaox@gmail.com>
0de0b50 to
c85b4d0
Compare
There was a problem hiding this comment.
Greptile Summary
This PR systematically replaces the chalk npm package with Deno's standard library @std/fmt/colors module across the entire CLI codebase. The changes affect 7 TypeScript files and 2 configuration files, migrating all color formatting functionality from the external chalk dependency to Deno's native color utilities.
The migration is comprehensive and consistent:
- Import statements change from
import chalk from "chalk"to importing specific color functions likeimport { cyan, gray, yellow } from "jsr:@std/fmt/colors" - Function calls change from
chalk.yellow(text)toyellow(text) - All color functions (cyan, gray, yellow, red, white, green, magenta) are replaced with their Deno standard library equivalents
The changes span multiple CLI features including version checking, app banners, token management, buy commands, scaling operations, and development utilities. In deno.json, the chalk dependency is removed from the imports map, while package.json removes chalk from dependencies but adds a resolution to lock it at ^5.6.2 - likely to maintain compatibility with any transitive dependencies that still rely on chalk.
This refactoring aligns with the project's Deno-first approach, as evidenced by the existing CLI guidelines that emphasize using Deno standard library modules over external dependencies. The change reduces the external dependency footprint while maintaining identical visual functionality across all terminal color formatting.
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it's a straightforward dependency swap with identical functionality
- Score reflects the mechanical nature of the changes and the fact that Deno's color module provides equivalent functionality to chalk
- No files require special attention as all changes follow the same consistent pattern
8 files reviewed, no comments
chalk with @std/fmt/colors, lock chalk to ^5.6.2 chalk with @std/fmt/colors, lock chalk to ^5.6.2
Replace all usages of
chalkwith Deno's standard librarycolorsmodule to improve consistency in Deno environments.Slack Thread