Skip to content

better-content 0.9.1

Choose a tag to compare

@Invalid8 Invalid8 released this 19 Sep 18:02
· 3 commits to main since this release

Packaging only. No JavaScript changed.

CommonJS consumers were handed ESM type declarations. The build has always emitted a .d.cts beside each .d.ts and shipped both, but the exports map named one types file per entry and served it to require as well. TypeScript on moduleResolution: node16 or nodenext resolved an ESM declaration file for a CommonJS build and reported the import as an error. Each entry now carries its own types under import and under require.

Subpath exports resolved to no types under classic node resolution. moduleResolution: node does not read the exports map and there was no typesVersions fallback, so better-content/core, /react, /server and every other subpath came back untyped. Only the root entry worked.

Also fixes peerDependenciesMeta.vue.optional, a string where every sibling is a boolean.

Bundler and ESM consumers were unaffected, which is why this reached 0.9.0 unnoticed. @arethetypeswrong/cli now reports no problems across all sixteen entries in node10, node16 from CJS, node16 from ESM and bundler, verified against the published tarball.