-
Notifications
You must be signed in to change notification settings - Fork 270
Update VSIX to register version. #1050
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?
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 adds version tracking to the Azure MCP Server by passing the package version from package.json to the McpStdioServerDefinition constructor. This enables better versioning and tracking of the MCP server instance.
- Added
packageJsonconstant at module level to read version from package.json - Updated
McpStdioServerDefinitionconstructor call to include the version parameter
Comments suppressed due to low confidence (1)
servers/Azure.Mcp.Server/vscode/src/extension.ts:1
- The test mock for
MockMcpStdioServerDefinitiondoesn't include the newversionparameter in its constructor signature. This mock should be updated to accept a version parameter (even if unused) to match the actual API being called, ensuring tests accurately reflect the production code.
// Copyright (c) Microsoft Corporation. All rights reserved.
| import * as path from 'path'; | ||
| import * as fs from 'fs'; | ||
|
|
||
| const packageJson = require('../../package.json'); |
Copilot
AI
Nov 4, 2025
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.
Using require() for JSON imports is not AOT-safe and uses CommonJS syntax. Replace with an ES module import using import packageJson from '../../package.json' assert { type: 'json' }; or use import packageJson from '../../package.json'; if the TypeScript configuration supports JSON module resolution.
|
Let's backport this to 1.x 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.
Please update changelog - make it REALLY clear that this is an important fix
|
You may ping owners of other MCP servers to check this as well. Or you can check it for them. |
|
Should we have a common module for use by the servers' extension.ts files? I feel like there's going to be a large amount of code that's just copy-pasted between servers. |
Updates VSIX to register version, to prompt refresh of tools in VS code iDE.