-
-
Notifications
You must be signed in to change notification settings - Fork 37
refactor: fix CI, use zod v4, and latest method in mcp
#332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
refactor: fix CI, use zod v4, and latest method in mcp
#332
Conversation
registerToolregisterTool in MCP
|
The CI failure appears to be a regression in I've opened an issue about it in |
registerTool in MCPtool with registerTool in @eslint/mcp
tool with registerTool in @eslint/mcpzod v4, v10_config_lookup_from_file and latest method in mcp
This comment was marked as resolved.
This comment was marked as resolved.
zod v4, v10_config_lookup_from_file and latest method in mcpzod v4, v10 flag and latest method in mcp
zod v4, v10 flag and latest method in mcpzod v4, and latest method in mcp
| $schema: "http://json-schema.org/draft-07/schema#", | ||
| additionalProperties: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't add these two lines, the tests fail, so I've added them.
However, I'm not sure whether this is considered a user-facing change.
zod v4, and latest method in mcpzod v4, and latest method in mcp
Prerequisites checklist
What is the purpose of this pull request?
In this PR, I've made several updates, particularly for
@eslint/mcp.Unfortunately, some of the problems have recently arisen in the
rewriterepository, so this PR includes a bit of changes especially for@eslint/mcp.This PR includes the following fixes:
1. Upgrade
@modelcontextprotocol/sdktov1.23.0andzodtov4Two days ago,
@modelcontextprotocol/[email protected]was released.https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.23.0
Shortly after that release, our CI began failing with the
TS2589: Type instantiation is excessively deep and possibly infiniteerror.I tried to resolve it myself but couldn't find a suitable solution, so I opened an issue in
@modelcontextprotocol/sdk: modelcontextprotocol/typescript-sdk#1180The issue was traced to the newly introduced Zod v4 support in
@modelcontextprotocol/[email protected].This only affected the
eslint/rewriterepository because the dev-dependencyknipuses Zod v4 internally, while@eslint/mcpdepends on Zod v3, causing a version conflict. The SDK team provided a clear explanation here: modelcontextprotocol/typescript-sdk#1180 (comment)To avoid the conflict, I've bumped Zod to v4. Zod v4 offers v3 compatibility via
zod/v3, so no code changes were necessary.2. Replace deprecated
mcpServer.toolusage withmcpServer.registerToolPer the JSDoc comments in
@modelcontextprotocol/sdk,mcpServer.toolis deprecated, so I've replaced it with the recommendedmcpServer.registerTool.3. The recently released
[email protected]has caused formatting errors:Yesterday,
[email protected]was released and caused formatting errors, particularly in.tsfiles.I've updated it accordingly, which introduced some additional code diffs.
What changes did you make? (Give an overview)
In this PR, I've fixed CI and use
zodv4, and latest method inmcpRelated Issues
Ref: modelcontextprotocol/typescript-sdk#1180 (comment)
Is there anything you'd like reviewers to focus on?
The behavior of MCP has not changed, so I've marked the prefix as
refactor, though I'm not sure about that.