Releases: bymaxone/nest-cache
Release list
v1.0.2
Fixed
-
The
./sharedsubpath now resolves undermoduleResolution: node. A
typesVersionsmap points the subpath at its.d.ctsdeclarations, which is
the only mechanism that resolution algorithm understands — it predates
exportsand ignores it entirely. Without this, a consumer whose tsconfig
setsmodule: commonjswithout an explicitmoduleResolution(the default
the Nest CLI scaffolds, which falls back tonode) got
error TS2307: Cannot find module '@bymax-one/nest-cache/shared'while the
root entrypoint resolved fine. Runtime was never affected: Node reads
exports, sorequire('@bymax-one/nest-cache/shared')always worked.This supersedes the note under 1.0.1 claiming the subpath was "not fixable
without a directory shim" — that was wrong,typesVersionsfixes it with no
extra files in the tarball.
Changed
check:exportsnow runs the strictattwprofile. The--profile node16
escape hatch existed only to ignore the failingnode10row, which no longer
fails, so every entrypoint is now verified in every resolution mode.
v1.0.1
Fixed
- CommonJS consumers no longer receive ESM type declarations. Both subpaths
now declaretypesper condition, sorequire()resolves to the.d.cts
declarations that match the.cjsruntime. Previously a singletypesentry
pointed at the.d.tsfiles, which — with"type": "module"— TypeScript
reads as ESM, so a project onmoduleResolution: node16/nodenext
importing from CommonJS got declarations for the wrong module format. - Added top-level
main,moduleandtypesso the root entrypoint also
resolves under the legacymoduleResolution: nodealgorithm. The./shared
subpath remains unresolvable in that mode, which is inherent to subpath
exports and not fixable without a directory shim. - Exposed
./package.jsonthrough theexportsmap. Reading it previously
failed withERR_PACKAGE_PATH_NOT_EXPORTED, which breaks tooling that
inspects an installed package's manifest.
Added
pnpm check:exports(@arethetypeswrong/cli) — packs the tarball and
resolves every entrypoint the way each module resolution mode would. Wired
into CI and into the release-shape gates, since the type-level API tests
compilesrcand therefore cannot catch a brokenexportsmap.