Skip to content

fix: point types field to existing dist/runtime/nitro.d.mts#4348

Closed
khoirulr099 wants to merge 1 commit into
nitrojs:mainfrom
khoirulr099:main
Closed

fix: point types field to existing dist/runtime/nitro.d.mts#4348
khoirulr099 wants to merge 1 commit into
nitrojs:mainfrom
khoirulr099:main

Conversation

@khoirulr099

Copy link
Copy Markdown

🔗 Linked issue

#4346

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The published nitro@3.0.260610-beta package declares "types": "./lib/index.d.mts", but this file does not exist in the npm tarball. This breaks TypeScript projects using legacy moduleResolution: "node".

The tarball actually contains dist/runtime/nitro.d.mts, so the types field should point there instead.

This fix aligns with the upstream PR nitrojs/nitro#4347.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Fixes charles-openclaw/charles-microbounties#1414

@khoirulr099 khoirulr099 requested a review from pi0 as a code owner June 13, 2026 20:12
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@khoirulr099 is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9018062b-25b3-416d-ae94-b37a75125f5c

📥 Commits

Reviewing files that changed from the base of the PR and between 7765bcb and 2ba5cdd.

📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

This PR updates the TypeScript declaration entry point in package.json, redirecting the types field from the non-existent ./lib/index.d.mts to the actual generated declarations at ./dist/runtime/nitro.d.mts.

Changes

TypeScript Declaration Path Resolution

Layer / File(s) Summary
Package configuration update
package.json
The types field is updated to point to the correct TypeScript declarations file at ./dist/runtime/nitro.d.mts instead of ./lib/index.d.mts, with EOF formatting adjustment.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly Related Issues

  • #4346: Directly addresses the package.json types entry misconfiguration by pointing to the correct existing declaration file location.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: point types field to existing dist/runtime/nitro.d.mts' follows conventional commits format with a 'fix:' prefix and clearly describes the main change.
Description check ✅ Passed The description directly relates to the changeset, explaining the packaging issue and why the types field needs to point to dist/runtime/nitro.d.mts instead of lib/index.d.mts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pi0

pi0 commented Jun 15, 2026

Copy link
Copy Markdown
Member

dup of #4347

@pi0 pi0 closed this Jun 15, 2026
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.

[bounty] nitro 3 beta types field points to missing lib/index.d.mts

2 participants