Repository navigation
v5.1.5
Highlights
- Declarations work when one project has both ESM and CommonJS consumers (#1921, #1922). No API changes.
Fixed
@ahoo-wang/fetcher-eventstream: TS2300 with both .d.ts and .d.cts in one compilation (#1921).
Since 5.1.4 every package ships ESM (.d.ts) and CommonJS (.d.cts) declarations. The package's global Response augmentation declared contentType and isEventStream as getters, and getters do not merge across declarations — a project with both .mts and .cts consumers (or a dual-mode dependency graph) failed with TS2300: Duplicate identifier under node16/nodenext. They are now readonly properties of the same types; the runtime getters are unchanged. @ahoo-wang/fetcher-openai, -react, -wow and -generator were affected through eventstream and are fixed with it.
@ahoo-wang/fetcher-viewer: declarations import antd types from the root (#1922).
The published declarations imported antd internals by deep path without an extension (e.g. antd/es/config-provider/SizeContext), which ESM consumers under node16/nodenext cannot resolve (TS2307). They now import from antd only.
Maintenance
- The package-types check now type-checks an
.mtsand a.ctsconsumer of every published package in onetscrun undernode16andnodenext, which catches declaration clashes that per-entry checks cannot.