Fix Ajv import compatibility issue by downgrading to v6
Downgrade Ajv from v8.17.1 to v6.12.6 to resolve ESM/CJS module compatibility issues that were causing "does not provide an export named 'Ajv'" errors in projects using this SDK. This ensures consistent import patterns across different module systems. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3f429895fb
commit
4cc8ed43b4
1 changed files with 16 additions and 91 deletions
|
|
@ -43,7 +43,8 @@ import {
|
|||
ErrorCode,
|
||||
McpError,
|
||||
} from "../types.js";
|
||||
import { Ajv, type ValidateFunction } from "ajv";
|
||||
import Ajv from "ajv";
|
||||
import type { ValidateFunction } from "ajv";
|
||||
|
||||
export type ClientOptions = ProtocolOptions & {
|
||||
/**
|
||||
|
|
@ -102,7 +103,7 @@ export class Client<
|
|||
) {
|
||||
super(options);
|
||||
this._capabilities = options?.capabilities ?? {};
|
||||
this._ajv = new Ajv({ strict: false, validateFormats: true });
|
||||
this._ajv = new Ajv();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue