Skip to content

Commit 5b536ab

Browse files
authored
Merge pull request #729 from modelcontextprotocol/ochafik/spec-type-tests
Add type compatibility test between SDK and spec types
2 parents c6ac083 + cce168c commit 5b536ab

File tree

3 files changed

+710
-1
lines changed

3 files changed

+710
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ web_modules/
6969
# Output of 'npm pack'
7070
*.tgz
7171

72+
# Output of 'npm run fetch:spec-types'
73+
spec.types.ts
74+
7275
# Yarn Integrity file
7376
.yarn-integrity
7477

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"dist"
3636
],
3737
"scripts": {
38+
"fetch:spec-types": "curl -o spec.types.ts https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/draft/schema.ts",
3839
"build": "npm run build:esm && npm run build:cjs",
3940
"build:esm": "mkdir -p dist/esm && echo '{\"type\": \"module\"}' > dist/esm/package.json && tsc -p tsconfig.prod.json",
4041
"build:esm:w": "npm run build:esm -- -w",
@@ -43,7 +44,7 @@
4344
"examples:simple-server:w": "tsx --watch src/examples/server/simpleStreamableHttp.ts --oauth",
4445
"prepack": "npm run build:esm && npm run build:cjs",
4546
"lint": "eslint src/",
46-
"test": "jest",
47+
"test": "npm run fetch:spec-types && jest",
4748
"start": "npm run server",
4849
"server": "tsx watch --clear-screen=false src/cli.ts server",
4950
"client": "tsx src/cli.ts client"

0 commit comments

Comments
 (0)