| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
🦋 Changeset detectedLatest commit: c269c39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
|
@modelcontextprotocol/client
npm i https://pkg.pr.new/@modelcontextprotocol/client@2431
npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2431
npm i https://pkg.pr.new/@modelcontextprotocol/core@2431
npm i https://pkg.pr.new/@modelcontextprotocol/server@2431
npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2431
npm i https://pkg.pr.new/@modelcontextprotocol/express@2431
npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2431
npm i https://pkg.pr.new/@modelcontextprotocol/hono@2431
npm i https://pkg.pr.new/@modelcontextprotocol/node@2431 commit: c269c39 |
Sorry, something went wrong.
|
Verified this locally against the reported CJS failure path. On current origin/main, after a focused server/client/core build, requiring both generated CJS validator subpaths still throws when reading Ajv: ./packages/server ReferenceError: import_ajv is not defined
./packages/client ReferenceError: import_ajv is not defined
On this PR head, the same focused build plus CJS probe succeeds for both packages: ./packages/server function function function true
./packages/client function function function true
I also ran the focused package tests that include the new CJS AJV coverage: pnpm --filter @modelcontextprotocol/server test -- test/server/barrelClean.test.ts
# 36 passed / 403 tests passed
pnpm --filter @modelcontextprotocol/client test -- test/client/barrelClean.test.ts
# 26 passed / 699 tests passed
So this matches the published/fresh-main reproduction from #2430 and fixes the runtime access path for both server and client. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for this :)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes the CommonJS validators/ajv subpath export for both @modelcontextprotocol/server and @modelcontextprotocol/client. In CommonJS consumers, reading Ajv from either AJV validator subpath currently throws ReferenceError: import_ajv is not defined.
The CJS build was preserving Ajv as a live getter but leaving it pointed at an ESM-only local alias (import_ajv). Exporting Ajv as a concrete local value from the provider makes the generated CJS subpath re-export require_ajvProvider.Ajv, matching the actual CJS provider module.
Adds regression coverage through the existing dist/barrel tests by requiring the built CJS validator subpath and constructing Ajv, addFormats, and AjvJsonSchemaValidator.
Fixes #2430.
Verification