Skip to content
Source
Sign inSign up
TanStack/intent

perf: emit type declarations for exported entries only #325

MergedLadyBluenotes(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/325/headmerged by LadyBluenotes(GitHub profile, opens in a new tab)

🎯 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.
    1. 🦋 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
      NameType
      @tanstack/intentPatch

      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

    2. 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 755bd33ef3b1b050a026c393a63fce850ade6206 and 1f289d3e87e0a97ee4781281d5a88c2fed6d9233.

      📒 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.
    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 1f289d3e87e0a97ee4781281d5a88c2fed6d9233

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded1m 5sView ↗
      nx run-many --targets=build✅ Succeeded3sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-10-04 22:38:59 UTC

    4. Open in StackBlitz

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

      commit: 1f289d3

    5. Merging this PR will not alter performance

      ✅ 12 untouched benchmarks


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

Sign in to join this conversation.