fix(packages): add types/typesVersions for legacy moduleResolution: node (#1898)
This commit is contained in:
parent
5433f40597
commit
2a7611d46b
7 changed files with 46 additions and 0 deletions
10
.changeset/legacy-module-resolution-types.md
Normal file
10
.changeset/legacy-module-resolution-types.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
'@modelcontextprotocol/client': patch
|
||||
'@modelcontextprotocol/server': patch
|
||||
'@modelcontextprotocol/node': patch
|
||||
'@modelcontextprotocol/express': patch
|
||||
'@modelcontextprotocol/fastify': patch
|
||||
'@modelcontextprotocol/hono': patch
|
||||
---
|
||||
|
||||
Add top-level `types` field (and `typesVersions` on client/server for their subpath exports) so consumers on legacy `moduleResolution: "node"` can resolve type declarations. The `exports` map remains the source of truth for `nodenext`/`bundler` resolution. The `typesVersions` map includes entries for subpaths added by sibling PRs in this series (`zod-schemas`, `stdio`); those entries are no-ops until the corresponding `dist/*.d.mts` files exist.
|
||||
|
|
@ -47,6 +47,17 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"validators/cf-worker": [
|
||||
"dist/validators/cfWorker.d.mts"
|
||||
],
|
||||
"stdio": [
|
||||
"dist/stdio.d.mts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
"import": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
"import": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
"import": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@
|
|||
"import": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"sse": [
|
||||
"dist/sse.d.mts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -47,6 +47,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.mts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"validators/cf-worker": [
|
||||
"dist/validators/cfWorker.d.mts"
|
||||
],
|
||||
"zod-schemas": [
|
||||
"dist/zodSchemas.d.mts"
|
||||
],
|
||||
"stdio": [
|
||||
"dist/stdio.d.mts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue