Skip to content

fix: JSON module should be marked as ESM type#1434

Merged
ghostdevv merged 1 commit intonpmx-dev:mainfrom
eryue0220:fix/issue-1420
Feb 12, 2026
Merged

fix: JSON module should be marked as ESM type#1434
ghostdevv merged 1 commit intonpmx-dev:mainfrom
eryue0220:fix/issue-1420

Conversation

@eryue0220
Copy link
Copy Markdown
Contributor

resolve #1420

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 12, 2026 3:08pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 12, 2026 3:08pm
npmx-lunaria Ignored Ignored Feb 12, 2026 3:08pm

Request Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
shared/utils/package-analysis.ts 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The analyzeExports function in shared/utils/package-analysis.ts has been modified to recognise .json file extensions as import-format based exports, alongside existing .mjs and .mts extensions. This expands the scope of export string detection to include JSON files when determining export types. The change consists of a single line modification with no alterations to the function's other handling logic for CommonJS-related extensions or type-related exports.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description 'resolve #1420' is minimal but directly references the linked issue and is related to the changeset.
Linked Issues check ✅ Passed The code change expands extension detection to include .json as an import hint, enabling JSON-only packages to be correctly identified as ESM-supporting, directly addressing issue #1420's objective.
Out of Scope Changes check ✅ Passed The single modification to shared/utils/package-analysis.ts is scoped to resolving issue #1420 and does not introduce unrelated changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

@ghostdevv ghostdevv added this pull request to the merge queue Feb 12, 2026
Merged via the queue into npmx-dev:main with commit 1c7a340 Feb 12, 2026
17 checks passed
@github-actions
Copy link
Copy Markdown

Thanks for your first contribution, @eryue0220! ✨

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

@nicolo-ribaudo
Copy link
Copy Markdown
Contributor

Thank you!

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.

JSON-only package should be marked as supporting ESM

3 participants