-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core-http-compat] Move runtime dependencies "@azure/core-rest-pipeline" and "@azure/core-client" to peerDependencies
#36919
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
…ne" and "@azure/core-client" to `peerDependencies` We've seen issues where core-http-compat` and core-client pull in different versions of pipeline policies which cause unexpected deserialization issues. By moving these two dependencies into `peerDependencies` we can depend on the runtime dependencies of `core-http-compat` consumers, thus avoiding pulling in another version.
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 addresses version conflict issues by moving @azure/core-rest-pipeline and @azure/core-client from regular dependencies to peer dependencies in the @azure/core-http-compat package. This change ensures that the package uses the same versions of these dependencies as its consumers, preventing deserialization issues caused by multiple versions being present in the dependency tree.
Key Changes
- Moved
@azure/core-rest-pipelineand@azure/core-clientfromdependenciestopeerDependenciesin package.json - Added a changelog entry documenting the change
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk/core/core-http-compat/package.json | Restructured dependencies by moving core-rest-pipeline and core-client to peerDependencies section |
| sdk/core/core-http-compat/CHANGELOG.md | Added changelog entry documenting the dependency restructuring |
|
|
||
| ### Other Changes | ||
|
|
||
| - Move runtime dependencies "@azure/core-rest-pipeline" and "@azure/core-client" to `peerDependencies` and rely on the consumer of `core-http-compat` to pull in them. |
Copilot
AI
Dec 19, 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.
Moving dependencies to peerDependencies is a breaking change according to semver because it changes the installation behavior for consumers - they must now explicitly install these dependencies themselves. This change should be documented in the "Breaking Changes" section of the CHANGELOG, not in "Other Changes". Consider whether the version should be bumped to 3.0.0 to reflect this breaking change, or if this should be coordinated with the next major version release.
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.
dependents of core-http-compat are our own packages which already have direct deps on the two.
|
|
||
| ### Other Changes | ||
|
|
||
| - Move runtime dependencies "@azure/core-rest-pipeline" and "@azure/core-client" to `peerDependencies` and rely on the consumer of `core-http-compat` to pull in them. |
Copilot
AI
Dec 19, 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.
The wording "rely on the consumer of core-http-compat to pull in them" is grammatically incorrect. It should be "rely on the consumer of core-http-compat to pull them in" or "rely on the consumer of core-http-compat to provide them".
| - Move runtime dependencies "@azure/core-rest-pipeline" and "@azure/core-client" to `peerDependencies` and rely on the consumer of `core-http-compat` to pull in them. | |
| - Move runtime dependencies "@azure/core-rest-pipeline" and "@azure/core-client" to `peerDependencies` and rely on the consumer of `core-http-compat` to pull them in. |
| "peerDependencies": { | ||
| "@azure/core-client": "^1.10.0", | ||
| "@azure/core-rest-pipeline": "^1.22.0" | ||
| }, |
Copilot
AI
Dec 19, 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.
When moving dependencies to peerDependencies, they should also be added to devDependencies so that the package can be built and tested independently. Without these in devDependencies, the build and test commands will fail when running in isolation (e.g., during development or CI). Add "@azure/core-client" and "@azure/core-rest-pipeline" to the devDependencies section with the same version ranges or use "workspace:^" if they are workspace packages.
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.
@copilot address this feedback
We have seen issues where
core-http-compatand its consumer (e.g., storagepackages) pull in different versions of
core-clientwhich cause unexpectedde-serialization issues. By moving these two dependencies into
peerDependencieswe can depend on the runtime dependencies ofcore-http-compatconsumers and avoid pulling in another version.