Skip to content

Commit ed0cd5f

Browse files
committed
chore(release): 0.12.1 — fix exports map so consumers get built JS (B-2026-05-22-1)
The 0.12.0 exports map had: ".": { "import": "./ts/index.ts", "default": "./js/index.js" } When consumers do `import x from 'hds-lib'`, Node resolves the `import` condition first → falls on the TS source under node_modules. Node 24 refuses type-stripping for node_modules paths and crashes: ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING: Stripping types is currently unsupported for files under node_modules, for "file:///app/node_modules/hds-lib/ts/index.ts" This blocked bridge-mira (and any other Node-runtime consumer) from deploying. Frontends were unaffected because Vite resolves the package through its own bundler that doesn't honor the node-resolution-only "import" condition. Fix: remove the `"import": "./ts/index.ts"` line. The `default` (which points at the built `./js/index.js`) now wins for both ESM-import and CJS-require consumers. TypeScript projects continue to get `js/index.d.ts` via the `types` condition. The explicit subpaths `./ts/*` and `./js/*` stay (some consumers import specific files directly). Verified: 513/513 unit tests pass.
1 parent 6987e66 commit ed0cd5f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hds-lib",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"description": "Health Data Safe - Library",
55
"type": "module",
66
"engines": {
@@ -29,7 +29,6 @@
2929
"exports": {
3030
".": {
3131
"types": "./js/index.d.ts",
32-
"import": "./ts/index.ts",
3332
"default": "./js/index.js"
3433
},
3534
"./ts/*": "./ts/*",

0 commit comments

Comments
 (0)