Repository navigation
auth: Convert from CJS to CJS+ESM, adopt finalized auth challenges API - #2092
Merged
Merged
Conversation
Brandon Waterloo (bwateratmsft)
requested a review
from a team
as a code owner
October 7, 2025 15:16
Brandon Waterloo (bwateratmsft)
enabled auto-merge (squash)
October 7, 2025 15:20
Contributor
There was a problem hiding this comment.
Pull Request Overview
Converts the auth package from CommonJS (CJS) to dual CJS+ESM module format and adopts the finalized auth challenges API from VS Code 1.105.0. This change enables the package to work in both CommonJS and ESM environments while updating to use the stable authentication challenges API.
Key changes:
- Migrated to dual build system supporting both ESM and CJS outputs
- Updated to use finalized VS Code authentication challenges API instead of deprecated version
- Refactored parameter naming for better clarity (e.g.,
scopes→scopeOrListOrRequest)
Reviewed Changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.base.new.json | New base TypeScript configuration for ESM builds |
| auth/tsconfig.json | Updated to use new base config and ESM output directory |
| auth/package.json | Added dual module support with separate ESM/CJS builds and updated VS Code engine requirement |
| auth/src/index.ts | Added temporary type declarations for VS Code 1.105.0 authentication API |
| auth/src/getSessionFromVSCode.ts | Refactored to use finalized auth challenges API and improved parameter handling |
| auth/src/VSCodeAzureSubscriptionProvider.ts | Updated parameter names to match new API |
| auth/src/AzureAuthentication.ts | Updated interface parameter name for consistency |
| auth/test/index.ts | Updated imports to use default imports for ESM compatibility |
| auth/test/runTest.ts | Fixed path resolution and reordered imports |
| auth/test/extension/extension.js | Simplified test extension by removing unused functionality |
| auth/.vscode/tasks.json | Updated build task to use new build script |
| auth/.vscode/launch.json | Updated paths to use CJS build output |
| auth/.npmignore | Modified to exclude source files properly |
| README.md | Updated development instructions and examples |
| .nvmrc | Updated Node.js version to 22.18 |
Files not reviewed (1)
- auth/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Megan Mott (motm32)
approved these changes
Oct 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See also #2091. Some files are the same since they haven't both been merged to main yet. Also note #2091 (comment).
In addition to the changes in the title I did a little light refactoring.