Skip to content

perf: bundle yaml from its ES module build - #324

Merged
LadyBluenotes merged 1 commit into
mainfrom
perf/bundle-yaml-esm
Oct 4, 2026
Merged

LadyBluenotes merged 1 commit into
mainfrom
perf/bundle-yaml-esm

Conversation

@LadyBluenotes

@LadyBluenotes LadyBluenotes commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🎯 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.

@changeset-bot

changeset-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 079b577

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

Reviewing files that changed from the base of the PR and between 5a0ec60 and 079b577.

📒 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.

@nx-cloud

nx-cloud Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 079b577

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 41s View ↗
nx run-many --targets=build ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-04 22:28:37 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@324

commit: 079b577

@LadyBluenotes
LadyBluenotes merged commit 755bd33 into main Oct 4, 2026
8 of 9 checks passed
@LadyBluenotes
LadyBluenotes deleted the perf/bundle-yaml-esm branch October 4, 2026 22:29
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026
@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 12.94%

⚠️ 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

Benchmark BASE HEAD Efficiency
⚡ reports workspace drift 97.6 ms 85.9 ms +13.59%
⚡ checks a shipped skills tree 154.4 ms 136.6 ms +13.05%
⚡ reports workspace drift with shared artifacts 99.5 ms 88.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 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