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)

Showing 2 changed files with 10 additions and 0 deletions.

x
0 of 2 viewed, 2 left
5 additions and 0 deletions.changeset/bundle-yaml-esm.mdAdded
View file
@@ -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 additions and 0 deletionspackages/intent/tsdown.config.tsModified
View file
@@ -61,5 +61,10 @@
'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),
+ ),
},
})