Skip to content

fix(http-client-csharp): declare @azure-tools/typespec-azure-core as peer dependency#10823

Merged
jorgerangel-msft merged 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/fix-csharp-azure-core-peer-dep
May 28, 2026
Merged

fix(http-client-csharp): declare @azure-tools/typespec-azure-core as peer dependency#10823
jorgerangel-msft merged 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/fix-csharp-azure-core-peer-dep

Conversation

@JoshLove-msft
Copy link
Copy Markdown
Contributor

Fixes #10802

The C# emitter imports from @azure-tools/typespec-azure-core at runtime (in emitter/src/type/operation-final-state-via.ts), but it was only listed under devDependencies. npm's flat hoisting let this resolve "by accident" in standard installs, but pnpm with enableGlobalVirtualStore: true (and other strict resolvers like Yarn PnP) correctly fail to resolve it.

This PR declares @azure-tools/typespec-azure-core as a peerDependency alongside @azure-tools/typespec-client-generator-core, using a matching version range.

Note: the companion issue in #10802 about @azure-tools/typespec-azure-core missing @typespec/versioning lives in the azure/typespec-azure repo and needs a separate PR there.

…peer dependency

The emitter imports from @azure-tools/typespec-azure-core at runtime but

previously relied on npm's flat hoisting. Under pnpm (especially with

enableGlobalVirtualStore: true) and other strict resolvers the import

fails. Declare it as a peerDependency alongside typespec-client-generator-core.

Fixes microsoft#10802

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label May 28, 2026
JoshLove-msft and others added 2 commits May 27, 2026 18:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	packages/http-client-csharp/package.json
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10823

commit: 948652e

@github-actions
Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@jorgerangel-msft jorgerangel-msft added this pull request to the merge queue May 28, 2026
Merged via the queue into microsoft:main with commit 9a52313 May 28, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: http-client-csharp relies on NPM hoisting behavior

2 participants