-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Conversation
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
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 toworkflow.yaml
but the transform is implemented insrc/workflow.ts
; update the reference or provide a matching YAML file.
workflow: "workflow.yaml"
Co-Authored-By: Aviv Keller <[email protected]>
Co-Authored-By: Aviv Keller <[email protected]>
Related issue
Important
It's use
@next
codemod CLIClose #95