-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Remove @azure/core-http-compat dependency from keyvault packages #36921
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
Draft
Copilot
wants to merge
5
commits into
main
Choose a base branch
from
copilot/remove-core-http-compat-dependency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Defined KeepAliveOptions, RedirectOptions, and ExtendedCommonClientOptions inline in keysModels.ts, secretsModels.ts, and certificatesModels.ts - Removed import of ExtendedCommonClientOptions from @azure/core-http-compat - Added import of CommonClientOptions from @azure/core-client - Removed @azure/core-http-compat dependency from package.json files - Added @azure/core-client dependency to package.json files Co-authored-by: jeremymeng <[email protected]>
- Created extendedClientOptions.ts in keyvault-common with KeepAliveOptions, RedirectOptions, and ExtendedCommonClientOptions types - Updated keyvault-common index.ts to export the new types - Updated keyvault-keys, keyvault-secrets, and keyvault-certificates to import ExtendedCommonClientOptions from @azure/keyvault-common - Removed inline type definitions from the three keyvault packages - No new dependencies added to package.json files Co-authored-by: jeremymeng <[email protected]>
- Defined CommonClientOptions and AdditionalPolicyConfig inline in extendedClientOptions.ts - Updated to import PipelineOptions, HttpClient, and PipelinePolicy from @azure/core-rest-pipeline - Removed @azure/core-client dependency from keyvault-common/package.json - All needed types are now self-contained within keyvault-common Co-authored-by: jeremymeng <[email protected]>
- Updated keyvault-common API review to export new types: AdditionalPolicyConfig, CommonClientOptions, ExtendedCommonClientOptions, KeepAliveOptions, RedirectOptions - Updated keyvault-keys API review to import ExtendedCommonClientOptions from @azure/keyvault-common - Updated keyvault-secrets API review to import ExtendedCommonClientOptions from @azure/keyvault-common - Updated keyvault-certificates API review to import ExtendedCommonClientOptions from @azure/keyvault-common - All packages successfully built with no errors Co-authored-by: jeremymeng <[email protected]>
Copilot
AI
changed the title
[WIP] Remove dependency on @azure/core-http-compat from keyvault
Remove @azure/core-http-compat dependency from keyvault packages
Dec 20, 2025
jeremymeng
reviewed
Dec 20, 2025
| "dependencies": { | ||
| "@azure/abort-controller": "^2.0.0", | ||
| "@azure/core-auth": "^1.3.0", | ||
| "@azure/core-client": "^1.5.0", |
Member
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.
reason for removal: keyvault packages moved to depend on @azure-rest/core-client. It makes sense to not depend on @azure/core-client anymore even just for types.
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.
Packages impacted by this PR
Issues associated with this PR
Addresses issue requesting removal of
@azure/core-http-compatdependency from keyvault packages as they only used a single type import.Describe the problem that is addressed by this PR
The keyvault packages depended on
@azure/core-http-compatsolely for theExtendedCommonClientOptionstype, creating an unnecessary runtime dependency.What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Chosen approach: Define required types in
@azure/keyvault-commonand export them for use by all keyvault client packages.@azure/keyvault-common/src/extendedClientOptions.tscontaining:CommonClientOptions- extendsPipelineOptionsfrom existing@azure/core-rest-pipelinedependencyAdditionalPolicyConfig,KeepAliveOptions,RedirectOptionsExtendedCommonClientOptions- combines the aboveAlternative considered: Add
@azure/core-clientdependency to each package. Rejected to avoid introducing new dependencies.Removed dependencies:
@azure/core-http-compatfrom keyvault-keys, keyvault-secrets, keyvault-certificates@azure/core-clientfrom keyvault-common (previously unused at runtime)Are there test cases added in this PR? (If not, why?)
No new tests added. This is a refactoring that maintains identical type signatures and behavior. Existing tests validate functionality.
Provide a list of related PRs (if any)
None
Command used to generate this PR:**(Applicable only to SDK release request PRs)
N/A
Checklists
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.