Skip to content
Source
Sign inSign up
TanStack/intent

perf: bundle yaml from its ES module build #324

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

🎯 Changes

  • tsdown builds for the node platform, so yaml resolved to its CommonJS build, and rolldown bundled that build whole. This change aliases yaml to the ES module build that the package serves under its default export condition, the same way the config already handles jsonc-parser.
  • The built package goes from 810,204 to 782,245 bytes (27,959 fewer).
  • Commands that parse YAML get faster: the stale benchmarks by 11% to 12%, the validate benchmark by 9%, and the list scan by 4%. The load benchmarks and cold start are unchanged.
  • The two builds gave identical results for 678 YAML inputs taken from the repository and the test suite.
  • Two differences in edge cases. A YAML warning, such as an unresolved tag, is now written to stderr by console.warn with a stack trace; before, it went through process.emitWarning, and intent list and intent stale exited before Node printed it. The LOG_STREAM and LOG_TOKENS environment variables no longer make the YAML parser print its tokens to stdout.
  • 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

  • Improvements
    • The package bundle is smaller, which can reduce the amount of code included in applications.
    • YAML warning and token logging behavior has been adjusted.
    1. 🦋 Changeset detected

      Latest commit: 079b57701aaef870129eb49bf2519d994fe14129

      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: aec27fc0-a22f-4ac5-bcbc-db71437b1c89
      📥 Commits

      Reviewing files that changed from the base of the PR and between 5a0ec605b6b18bac367a9aa867f3277a3eabf34d and 079b57701aaef870129eb49bf2519d994fe14129.

      📒 Files selected for processing (2)
      • .changeset/bundle-yaml-esm.md
      • packages/intent/tsdown.config.ts
       ______________________________________________________________________________________________________
      < My code reviews are like a Tesla: fully electric, increasingly autonomous, and occasionally on fire. >
       ------------------------------------------------------------------------------------------------------
        \
         \   (\__/)
             (•ㅅ•)
             /   づ
      ✨ 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 079b57701aaef870129eb49bf2519d994fe14129

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

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

    4. Open in StackBlitz

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

      commit: 079b577

    5. Merging this PR will improve performance by 12.94%

      :warning: Different runtime environments detected

      Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.

      Open the report in CodSpeed to investigate

      ⚡ 3 improved benchmarks ✅ 9 untouched benchmarks

      Performance Changes

      BenchmarkBASEHEADEfficiency
      ⚡reports workspace drift97.6 ms85.9 ms+13.59%
      ⚡checks a shipped skills tree154.4 ms136.6 ms+13.05%
      ⚡reports workspace drift with shared artifacts99.5 ms88.7 ms+12.18%

      Tip

      Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


      Comparing perf/bundle-yaml-esm (079b577) with main (5a0ec60) Open in CodSpeed

Sign in to join this conversation.