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

fix(codemods): Use .cjs extension for CommonJS files #7333

Merged
merged 4 commits into from Apr 25, 2024

Conversation

ontanj
Copy link
Contributor

@ontanj ontanj commented Apr 24, 2024

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.

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
Copy link

vercel bot commented Apr 24, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2024 7:01am

Copy link

codesandbox-ci bot commented Apr 24, 2024

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:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@lachlancollins lachlancollins self-requested a review April 24, 2024 21:48
Copy link

nx-cloud bot commented Apr 24, 2024

☁️ Nx Cloud Report

CI 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 targets

Sent with 💌 from NxCloud.

@lachlancollins lachlancollins changed the title bug(codemods): rename CommonJS files to .cjs fix(codemods): Use .cjs extension for CommonJS files Apr 25, 2024
@ontanj ontanj marked this pull request as draft April 25, 2024 06:16
Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

LGTM!

@ontanj ontanj marked this pull request as ready for review April 25, 2024 06:59
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 25, 2024
@ontanj
Copy link
Contributor Author

ontanj commented Apr 25, 2024

Another solution to #7154 would of course be to rewrite codemods as ES modules. Is there a reason it is using CommonJS?

@lachlancollins lachlancollins merged commit 2aca521 into TanStack:main Apr 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation package: query-codemods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants