Skip to content

feat(colors-to-util-styletext): add migration recipe#475

Open
Herrtian wants to merge 5 commits into
nodejs:mainfrom
Herrtian:colors-to-util-styletext-474
Open

feat(colors-to-util-styletext): add migration recipe#475
Herrtian wants to merge 5 commits into
nodejs:mainfrom
Herrtian:colors-to-util-styletext-474

Conversation

@Herrtian

Copy link
Copy Markdown

Fixes #474

Adds a colors-to-util.styleText recipe for compatible colors usage:

  • string prototype colors and chained modifiers
  • colors/safe namespace and destructured calls
  • package.json dependency removal

Unsupported extras are left unchanged with a warning for manual review.

Checks:

  • npm test --workspace=recipes/colors-to-util-styletext
  • npm run type-check
  • npm run lint
  • git diff --check

@Herrtian Herrtian changed the title feat(colors-to-util.styleText): add migration recipe feat(colors-to-util-styletext): add migration recipe May 27, 2026

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not too bad few comment. But also add jsdocs on all function because they look great but need more docs

Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
@AugustinMauroy AugustinMauroy added the awaiting author Reviewer has requested something from the author label May 27, 2026
@Herrtian

Copy link
Copy Markdown
Author

Updated with JSDoc on the workflow helpers, applied the guard/style cleanups, and added a no-op fixture for unrelated safe namespace calls.

Checked with:

  • npm test --workspace=recipes/colors-to-util-styletext
  • npm run type-check
  • npm run lint
  • git diff --check

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

noice !

Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Comment thread recipes/colors-to-util-styletext/src/workflow.ts Outdated
Herrtian added 2 commits May 28, 2026 21:28
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
@Herrtian

Copy link
Copy Markdown
Author

Updated the remaining review follow-up:

  • createImportReplacement now uses a switch
  • extractNamespaceStyles caches objectKind before the checks
  • added await import and then() dynamic import fixtures

Checked:

  • npm run test -w @nodejs/colors-to-util-styletext
  • npm run type-check
  • npx biome check recipes/colors-to-util-styletext/src/workflow.ts
  • git diff --check

Comment thread recipes/colors-to-util-styletext/tests/side-effect-import/input.mjs
Comment thread recipes/colors-to-util-styletext/codemod.yaml
Comment thread recipes/colors-to-util-styletext/README.md Outdated

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGMT !

@AugustinMauroy AugustinMauroy added awaiting reviewer Author has responded and needs action from the reviewer and removed awaiting author Reviewer has requested something from the author labels May 29, 2026
@AugustinMauroy AugustinMauroy requested a review from a team May 29, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewer Author has responded and needs action from the reviewer ⚠️ fully-AI-generated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(colors-to-util.styleText): handle migration

2 participants