perf: emit type declarations for exported entries only #325
Merged
LadyBluenotes(GitHub profile, opens in a new tab)merged 1 commit into
main fromrefs/pull/325/head·merged by LadyBluenotes(GitHub profile, opens in a new tab) 🎯 Changes#
- The build emitted a type declaration file for each of its three entries.
package.jsonexports types for.and./coreonly, andbinpoints atdist/cli.mjs, so nothing could importdist/cli.d.mts. - Declaration output is now limited to
src/index.tsandsrc/core.tswith thedts.entryoption. - The package is 2,655 bytes smaller (861 bytes gzipped). Every JavaScript file and the three remaining declaration files are byte-identical, so runtime behavior and speed do not change.
- The packed package still contains
dist/index.d.mts,dist/core.d.mts, and their shared declaration chunk. - One limit: the
dts.entrypatterns are matched relative to the directory the build starts in. Every build path in this repository (pnpm run build,prepack, the nx target) starts inpackages/intent. - Adds a patch changeset.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr(runpnpm build:allfirst).
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
Summary by CodeRabbit#
- Package Updates
- The CLI type declaration is no longer included in the
@tanstack/intentpackage, reducing its size by about 2.6 KB. - Types for
@tanstack/intentand@tanstack/intent/coreare unchanged.
- The CLI type declaration is no longer included in the
- 1
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
Note
Currently processing new changes in this PR. This may take a few minutes, please wait...
⚙️ Run configuration
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1bf23d20-c33e-44be-8e4d-c95317bb5626
📥 Commits
Reviewing files that changed from the base of the PR and between 755bd33ef3b1b050a026c393a63fce850ade6206 and 1f289d3e87e0a97ee4781281d5a88c2fed6d9233.
📒 Files selected for processing (2)
.changeset/dts-exported-entries.mdpackages/intent/tsdown.config.ts
_________________________________ < Never fear, CodeRabbit is here! > --------------------------------- \ \ (\__/) (•ㅅ•) / づ✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment `@coderabbitai help` to get the list of available commands.View your CI Pipeline Execution ↗ for commit 1f289d3e87e0a97ee4781281d5a88c2fed6d9233
Command Status Duration Result nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded 1m 5s View ↗ nx run-many --targets=build✅ Succeeded 3s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-04 22:38:59UTCMerging this PR will not alter performance#
✅ 12untouched benchmarks
Comparingperf/dts-exported-entries(1f289d3) withmain(755bd33)
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 1f289d3e87e0a97ee4781281d5a88c2fed6d9233
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR