Skip to content

Conversation

@AugustinMauroy
Copy link
Member

No description provided.

@AugustinMauroy AugustinMauroy requested review from a team and Copilot July 1, 2025 12:24
Copy link
Contributor

Copilot AI left a 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 introduces a configurable codemod name for log output, enabling dynamic updates to logger prefixes.

  • Adds a new exported function setCodemodName to update the codemod name.
  • Updates log statements and test snapshots to reflect the codemod name change.
  • Updates the workflow file to set the codemod name as needed.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
utils/src/logger.ts Added codemodName variable and exported setCodemodName function.
utils/src/logger.test.ts Updated tests to use setCodemodName and validate log output changes.
utils/src/logger.test.snap.cjs Updated snapshot values to reflect the new codemod name usage.
recipes/correct-ts-specifiers/src/workflow.ts Imported and applied setCodemodName for setting the codemod name.
Comments suppressed due to low confidence (1)

utils/src/logger.ts:8

  • The default codemod name 'nodjs-codemod' appears to have a potential typo. If it is meant to be 'nodejs-codemod', consider updating the default value for clarity.
let codemodName = 'nodjs-codemod';

Copy link
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

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

Multiple codemods could be running at the same time as part of a multi-part migration. In that case, the module-level "name" will get clobbered.

@AugustinMauroy
Copy link
Member Author

🤦🏼 you have right

@AugustinMauroy
Copy link
Member Author

BTW codemod don't support styleText api

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Note that it's Codemod, not Codemode

@AugustinMauroy AugustinMauroy changed the title feat(logger): add codemode name feat(logger): add codemod name Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

4 participants