Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bundle-yaml-esm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/intent': patch
---

Make the installed package 28 kB smaller by bundling `yaml` from its ES module build instead of its CommonJS build. A YAML warning, such as an unresolved tag in skill frontmatter, 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.
5 changes: 5 additions & 0 deletions packages/intent/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@ export default defineConfig({
'jsonc-parser': fileURLToPath(
new URL('./node_modules/jsonc-parser/lib/esm/main.js', import.meta.url),
),
// yaml's `node` export condition is a CommonJS build that rolldown cannot
// tree-shake; point at the ES module build its `default` condition serves.
yaml: fileURLToPath(
new URL('./node_modules/yaml/browser/index.js', import.meta.url),
),
},
})
Loading