microsoft / microsoft/vscode-documentdb
Upgrade @microsoft/vscode-azext-utils from v3 to v4 (coordinated across api/ and extension)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
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.jsonexportsmap. v3 only had"main": "out/src/index.js"with no exports map. v4 usesdist/esm/anddist/cjs/paths resolved throughexports. - Adopted finalized auth challenges API: Internal API surface for auth challenges was finalized.
- Removed
escape-string-regexpdependency: Regex escaping inmasking.tswas rewritten. - Dev/test classes moved: Some classes from
@microsoft/vscode-azext-devmoved 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:
callWithTelemetryAndErrorHandlingregisterCommand/registerCommandWithTreeNodeUnwrappingAzureWizard/AzureWizardPromptStepUserCancelledError/GoBackErrorDialogResponsesparseError/appendExtensionUserAgentcreateApiProvider/apiUtilscreateAzExtLogOutputChannelregisterErrorHandler/registerUIExtensionVariablesTreeElementStateManager/createContextValue/createGenericElementAzExtTreeFileSystemcreateSubscriptionContext
Sub-path imports:
@microsoft/vscode-azext-utils/activity→AzureResourcesExtensionApiWithActivity@microsoft/vscode-azext-utils/hostapi→AzureHostExtensionApi
3. Required integration testing
Azure Resources integration
- Extension activates without errors
- Tree views load correctly (Connections view, Azure Discovery view)
- Azure subscription filtering works
- Resource creation wizards complete successfully
-
AzureResourcesExtensionApiWithActivityactivity reporting works
Migration extension integration
- Migration extension (registered client in
package.json→x-documentdbApi.registeredClients) can activate and callgetDocumentDBExtensionApi() -
apiUtils.AzureExtensionApiProvider.getApi()returns a valid API object - Migration provider registration works end-to-end
- Migration actions execute successfully
General regression
- All wizard flows (Connect, Create database, Create collection) work
- Shell/PTY operations work
- Document CRUD operations work
-
npm run buildpasses -
npx jest --no-coveragepasses - No runtime errors in Output channel
References
- Dependabot PR (closed): #608
- Upstream PR for v4.0.0: https://github.com/microsoft/vscode-azuretools/pull/2093
- v4.0.0 release: https://github.com/microsoft/vscode-azuretools/releases/tag/microsoft-vscode-azext-utils-v4.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Update the dependency in api/package.json and the root package.json, then inspect the listed runtime and sub-path imports for compatibility with v4. Start with the package changes and run npm run build and npx jest --no-coverage. Done means both projects use v4, the build and tests pass, and the listed Azure Resources, migration, wizard, CRUD, and shell flows work without runtime errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- desktop, developer-experience, devtools, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100