-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow latest server.json schema in assisted NuGet MCP install flow #1268
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
Conversation
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.
Pull Request Overview
This PR updates the NuGet MCP server installation flow to support multiple versions of the server.json schema format. The changes allow the extension to handle both legacy and current schema versions when processing NuGet package manifests.
- Refactored package reference fixing logic to support multiple schema formats
- Added comprehensive test coverage for different schema versions
- Improved error handling and validation for server.json parsing
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/extension/mcp/vscode-node/nuget.ts | Refactored readServerManifest method to extract package reference fixing logic and support multiple schema formats (registry_name, registry_type, registryType) |
| src/extension/mcp/test/vscode-node/nuget.stub.spec.ts | Added unit tests to verify handling of different schema versions (2025-07-29 original, latest, and 2025-09-29) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| } | ||
|
|
||
| const json = await fs.readFile(serverJsonPath, 'utf8'); | ||
| const manifest = JSON.parse(json); |
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.
JSON.parse will throw if it's invalid, we should probably catch that here too
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.
mm
…/new-schema # Conflicts: # src/extension/mcp/vscode-node/nuget.ts
|
knkl |
…1268) * Align to latest schema * Handle more schema differences * Add tests * Update src/extension/mcp/vscode-node/nuget.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Prepare the manifest for VS Code integration --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Connor Peet <connor@peet.io>
Resolve microsoft/vscode#266097