Skip to content

feat(create-require-from-path): introduce #111

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

AugustinMauroy
Copy link
Member

Related issue

Important

It's use @next codemod CLI

Close #95

@AugustinMauroy AugustinMauroy requested review from a team and Copilot July 17, 2025 11:27
Copy link

@Copilot 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

Adds a new codemod recipe to replace deprecated createRequireFromPath with createRequire by providing transformation logic, test fixtures, and configuration.

  • Introduce input/expected test fixtures for both .js and .mjs
  • Implement AST-based transform in workflow.ts
  • Add package metadata, codemod config, README, and update lint includes

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
recipes/create-require-from-path/tests/input/*.js/.mjs Add input fixtures demonstrating old API usage
recipes/create-require-from-path/tests/expected/*.js/.mjs Add expected fixtures with createRequire applied
recipes/create-require-from-path/src/workflow.ts Implement AST-grep transform for the deprecation fix
recipes/create-require-from-path/package.json Define package metadata and test script
recipes/create-require-from-path/codemod.yml Configure codemod registry and workflow reference
recipes/create-require-from-path/README.md Document recipe purpose and before/after examples
biome.jsonc Exclude test fixture directories from linting
Comments suppressed due to low confidence (1)

recipes/create-require-from-path/codemod.yml:7

  • The workflow entry points to workflow.yaml but the transform is implemented in src/workflow.ts; update the reference or provide a matching YAML file.
workflow: "workflow.yaml"

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.

feat: createRequireFromPath to createRequire
2 participants