-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(codemods): Use .cjs extension for CommonJS files #7333
Conversation
Rename CommonJS files in codemods to distinguish them from ES module files otherwise used in this project. Resolve an issue occuring since package.json in codemods is removed when publishing causing module type data to be lost. Fix issue TanStack#7154
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 32477e8:
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 32477e8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
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.
LGTM!
Another solution to #7154 would of course be to rewrite codemods as ES modules. Is there a reason it is using CommonJS? |
Rename CommonJS files in codemods to distinguish them from ES module files otherwise used in this project.
Fix issue #7154 which occurs since package.json in codemods is removed when publishing, causing module type data to be lost.
The issue can also be fixed by adding package.json to the published package. But since the project mainly uses ES modules it makes sense to use .cjs for the others.