Skip to content
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

feat(packages/codemod-utils): add tsup and CJS for require support in codemod-utils #1474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amirabbas-gh
Copy link
Collaborator

📚 Description

This PR adds tsup as a build tool and includes CommonJS (.cjs) support in codemod-utils.
With this change, the package can now be used with both import and require, improving compatibility.

🧪 Test Plan

  • Built the package using tsup and verified that both ESM (.js) and CommonJS (.cjs) outputs were generated correctly.
  • Tested importing the package in both import and require environments to ensure compatibility.

Copy link

vercel bot commented Feb 4, 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) Visit Preview Feb 4, 2025 8:00pm

Copy link

pkg-pr-new bot commented Feb 4, 2025

Open in Stackblitz

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

commit: 9334c81

@amirabbas-gh amirabbas-gh force-pushed the fix_codemod-utils_problem branch from 6d1135e to 9334c81 Compare February 4, 2025 19:59
format: ["esm", "cjs"],
dts: {
compilerOptions: {
incremental: false, // Fix for incremental error
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mohebifar From my searches, I understand that we need a tsup.config for this package, and "incremental" on line 8 is for handling some errors.

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.

3 participants