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:
Basil Hosmer 2025-05-19 13:05:21 -04:00
commit 4cc8ed43b4
No known key found for this signature in database

View file

@ -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();
}
/**