Skip to content

Conversation

@jeremymeng
Copy link
Member

We have seen issues where core-http-compat and its consumer (e.g., storage
packages) pull in different versions of core-client which cause unexpected
de-serialization issues. By moving these two dependencies into
peerDependencies we can depend on the runtime dependencies of
core-http-compat consumers and avoid pulling in another version.

…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.
@jeremymeng jeremymeng requested a review from a team as a code owner December 19, 2025 23:34
Copilot AI review requested due to automatic review settings December 19, 2025 23:34
@jeremymeng jeremymeng marked this pull request as draft December 19, 2025 23:34
Copy link
Contributor

Copilot AI left a 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-pipeline and @azure/core-client from dependencies to peerDependencies in 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.
Copy link

Copilot AI Dec 19, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

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.
Copy link

Copilot AI Dec 19, 2025

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".

Suggested change
- 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.

Copilot uses AI. Check for mistakes.
Comment on lines +73 to 76
"peerDependencies": {
"@azure/core-client": "^1.10.0",
"@azure/core-rest-pipeline": "^1.22.0"
},
Copy link

Copilot AI Dec 19, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant