-
fix(testing): keep ts-jest resolving exports-only libs on typescript < 6 (#36089)
发布于
2026-06-24 17:19:16 +00:00 Current Behavior
The jest-30 path of
@nx/jestbumps ts-jest to 29.4.x. On the CommonJS
jest path, ts-jest 29.2+ falls back tomoduleResolution: node10when
bundleris invalid alongside the forcedmodule: commonjs(TypeScript
< 6).node10ignores packageexportsmaps, so workspace libraries
that expose types only viaexportsfail with TS2307 during the ts-jest
type check.Expected Behavior
A new migration sets
isolatedModules: trueintsconfig.spec.jsonfor
ts-jest projects on TypeScript < 6 ts-solution workspaces (that do not
already enable it), so ts-jest transpiles per file and the cross-file
type resolution no longer runs. TypeScript >= 6 (wherebundleris
valid withcommonjsand resolvesexports) is unaffected.Related Issue(s)
NXC-4591
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
下载附件