Upgrade @microsoft/vscode-azext-utils from v3 to v4
Context
Dependabot PR #608 attempted to bump @microsoft/vscode-azext-utils from ~3.3.1 to ~4.0.7 in the api/ sub-project only. This was closed because upgrading only api/ creates a version split — the main extension still depends on ~3.3.1, and other extensions consume our API package. A coordinated upgrade across both api/ and the root extension is needed.
Breaking changes in v4.0.0
The major version bump (v3 → v4) introduces:
- CJS → CJS+ESM dual build: The package now ships both CommonJS and ESM via a
package.json exports map. v3 only had "main": "out/src/index.js" with no exports map. v4 uses dist/esm/ and dist/cjs/ paths resolved through exports.
- Adopted finalized auth challenges API: Internal API surface for auth challenges was finalized.
- Removed
escape-string-regexp dependency: Regex escaping in masking.ts was rewritten.
- Dev/test classes moved: Some classes from
@microsoft/vscode-azext-dev moved into @microsoft/vscode-azext-utils@4.0.1.
- Duplicate type declaration removed (v4.0.2): Could affect consumers relying on the duplicate.
- Telemetry package changes (v4.0.3–4.0.4): Moves to new engineering package, telemetry bundled separately.
Scope of work
1. Upgrade in both locations
api/package.json: ~3.3.1 → ~4.0.7
- Root
package.json: ~3.3.1 → ~4.0.7
2. Verify type compatibility
The extension uses the following APIs extensively (~25+ files):
Runtime APIs:
callWithTelemetryAndErrorHandling
registerCommand / registerCommandWithTreeNodeUnwrapping
AzureWizard / AzureWizardPromptStep
UserCancelledError / GoBackError
DialogResponses
parseError / appendExtensionUserAgent
createApiProvider / apiUtils
createAzExtLogOutputChannel
registerErrorHandler / registerUIExtensionVariables
TreeElementStateManager / createContextValue / createGenericElement
AzExtTreeFileSystem
createSubscriptionContext
Sub-path imports:
@microsoft/vscode-azext-utils/activity → AzureResourcesExtensionApiWithActivity
@microsoft/vscode-azext-utils/hostapi → AzureHostExtensionApi
3. Required integration testing
Azure Resources integration
Migration extension integration
General regression
References
Upgrade
@microsoft/vscode-azext-utilsfrom v3 to v4Context
Dependabot PR #608 attempted to bump
@microsoft/vscode-azext-utilsfrom~3.3.1to~4.0.7in theapi/sub-project only. This was closed because upgrading onlyapi/creates a version split — the main extension still depends on~3.3.1, and other extensions consume our API package. A coordinated upgrade across bothapi/and the root extension is needed.Breaking changes in v4.0.0
The major version bump (v3 → v4) introduces:
package.jsonexportsmap. v3 only had"main": "out/src/index.js"with no exports map. v4 usesdist/esm/anddist/cjs/paths resolved throughexports.escape-string-regexpdependency: Regex escaping inmasking.tswas rewritten.@microsoft/vscode-azext-devmoved into@microsoft/vscode-azext-utils@4.0.1.Scope of work
1. Upgrade in both locations
api/package.json:~3.3.1→~4.0.7package.json:~3.3.1→~4.0.72. Verify type compatibility
The extension uses the following APIs extensively (~25+ files):
Runtime APIs:
callWithTelemetryAndErrorHandlingregisterCommand/registerCommandWithTreeNodeUnwrappingAzureWizard/AzureWizardPromptStepUserCancelledError/GoBackErrorDialogResponsesparseError/appendExtensionUserAgentcreateApiProvider/apiUtilscreateAzExtLogOutputChannelregisterErrorHandler/registerUIExtensionVariablesTreeElementStateManager/createContextValue/createGenericElementAzExtTreeFileSystemcreateSubscriptionContextSub-path imports:
@microsoft/vscode-azext-utils/activity→AzureResourcesExtensionApiWithActivity@microsoft/vscode-azext-utils/hostapi→AzureHostExtensionApi3. Required integration testing
Azure Resources integration
AzureResourcesExtensionApiWithActivityactivity reporting worksMigration extension integration
package.json→x-documentdbApi.registeredClients) can activate and callgetDocumentDBExtensionApi()apiUtils.AzureExtensionApiProvider.getApi()returns a valid API objectGeneral regression
npm run buildpassesnpx jest --no-coveragepassesReferences