Files
langgraphjs/internal
Christian Bromann 0558e472b7 fix(sdk): bundle pure-ESM deps into CJS build to fix ERR_REQUIRE_ESM (#2565)
## Summary
- Fix `ERR_REQUIRE_ESM` in `@langchain/langgraph-sdk` for CommonJS
consumers on Node < 20.19 / < 22.12: the CJS build no longer does a
top-level `require()` of the pure-ESM `p-retry`/`p-queue`. They (and
their transitive ESM-only deps) are now bundled and transpiled into
relative CJS chunks.
- Add per-package build overrides via an optional `tsdown.config.ts`,
mirroring the langchainjs convention. `internal/build` discovers and
merges it (`config: false` disables tsdown's own discovery so the
config's imports resolve from the package dir), and re-exports
`defineConfig` from `@langchain/build` so packages get type-safe configs
without depending on `tsdown` directly.
- Remove the leftover `libs/checkpoint-redis/langchain.config.js` (from
the old `@langchain/scripts` build) — it was the only package still
carrying one and the current tsdown build ignores it.

Fixes #2562
2026-06-22 14:56:09 -07:00
..