Skip to content

perf: emit type declarations for exported entries only - #325

Merged
LadyBluenotes merged 1 commit into
mainfrom
perf/dts-exported-entries
Oct 4, 2026
Merged

LadyBluenotes merged 1 commit into
mainfrom
perf/dts-exported-entries

Conversation

@LadyBluenotes

@LadyBluenotes LadyBluenotes commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

  • The build emitted a type declaration file for each of its three entries. package.json exports types for . and ./core only, and bin points at dist/cli.mjs, so nothing could import dist/cli.d.mts.
  • Declaration output is now limited to src/index.ts and src/core.ts with the dts.entry option.
  • 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.entry patterns are matched relative to the directory the build starts in. Every build path in this repository (pnpm run build, prepack, the nx target) starts in packages/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 (run pnpm build:all first).

🚀 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/intent package, reducing its size by about 2.6 KB.
    • Types for @tanstack/intent and @tanstack/intent/core are unchanged.

@changeset-bot

changeset-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1f289d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/intent Patch

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

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 755bd33 and 1f289d3.

📒 Files selected for processing (2)
  • .changeset/dts-exported-entries.md
  • packages/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.

❤️ Share

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

@nx-cloud

nx-cloud Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1f289d3

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:59 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@325

commit: 1f289d3

@LadyBluenotes
LadyBluenotes merged commit 594fd9d into main Oct 4, 2026
8 of 9 checks passed
@LadyBluenotes
LadyBluenotes deleted the perf/dts-exported-entries branch October 4, 2026 22:38
@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing perf/dts-exported-entries (1f289d3) with main (755bd33)

Open in CodSpeed

@github-actions github-actions Bot mentioned this pull request Oct 4, 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.

1 participant