Skip to content

v5.1.5

Choose a tag to compare

@Ahoo-Wang Ahoo-Wang released this 25 Sep 04:11
c8006e6

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 .mts and a .cts consumer of every published package in one tsc run under node16 and nodenext, which catches declaration clashes that per-entry checks cannot.