Skip to content

fix: improve node codemod node modules resolution #1491

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

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

mohebifar
Copy link
Member

@mohebifar mohebifar commented Feb 18, 2025

Improvements to node modules resolution:

  • .changeset/gold-geckos-tap.md: Added a patch change for @codemod-com/runner and codemod to improve node modules resolution for the node codemod symlinking step.

Codebase simplification:

  • packages/runner/src/runner.ts: Modified the Runner class to use module.paths.find for locating the cli_node_modules directory and added error handling for cases where the directory is not found.

📚 Description

This pull request includes changes to improve the node modules resolution for the node codemod symlinking step and to handle cases where the cli_node_modules directory cannot be found. The most important changes include modifications to the Runner class in runner.ts and an update to the changeset file.

🔗 Linked Issue

🧪 Test Plan

📄 Documentation to Update

Copy link

vercel bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
codemod ⬜️ Ignored (Inspect) Feb 18, 2025 7:48pm

Copy link

pkg-pr-new bot commented Feb 18, 2025

Open in Stackblitz

npm i https://pkg.pr.new/codemod@1491

commit: 76b4ae4

@mohebifar mohebifar merged commit baea1b7 into main Feb 18, 2025
12 checks passed
@mohebifar mohebifar deleted the fix/improve-node-codemod-node-modules-resolution branch February 18, 2025 21:29
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.

1 participant