Bump the http-client-csharp base dependency versions in http-client-csharp-mgmt. Updates Azure and unbranded emitter (npm) dependencies and the Azure generator (NuGet) reference, rebuilds, and regenerates test projects.
65
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
—
The risk profile of this skill
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/bump-mgmt-base-version/SKILL.mdBump the base http-client-csharp dependencies used by the management-plane generator (http-client-csharp-mgmt). This updates the Azure and compatible unbranded npm emitter dependencies and the Azure NuGet generator dependency, then rebuilds and regenerates test projects.
Trigger phrases: "bump mgmt base version", "update http-client-csharp in mgmt", "bump generator version", "update mgmt dependency".
Read the latest version of @azure-typespec/http-client-csharp from:
eng/azure-typespec-http-client-csharp-emitter-package.jsonLook at the dependencies["@azure-typespec/http-client-csharp"] value. This is the Azure target version.
Determine the unbranded target version required by that exact Azure package version:
npm view "@azure-typespec/http-client-csharp@<azure-target-version>" dependencies --jsonUse the returned @typespec/http-client-csharp dependency version. The management emitter imports the unbranded package directly, so its pin must match the Azure package's dependency to avoid loading incompatible copies of the TypeSpec library.
Check the current versions in these two files:
| File | Field | Purpose |
|---|---|---|
eng/packages/http-client-csharp-mgmt/package.json | dependencies["@azure-typespec/http-client-csharp"] | Azure emitter npm dependency |
eng/packages/http-client-csharp-mgmt/package.json | dependencies["@typespec/http-client-csharp"] | Compatible unbranded emitter npm dependency |
eng/centralpackagemanagement/Directory.Generation.Packages.props | <AzureGeneratorVersion> | Generator NuGet dependency (used by Azure.Generator.Management.csproj via <PackageReference Include="Azure.Generator" />) |
If all three already match their respective target versions, no update is needed — inform the user and stop.
Update the version references:
eng/packages/http-client-csharp-mgmt/package.json:
@azure-typespec/http-client-csharp in dependencies to the Azure target version.@typespec/http-client-csharp in dependencies to the unbranded target version required by the Azure package.eng/centralpackagemanagement/Directory.Generation.Packages.props: Change <AzureGeneratorVersion> to the Azure target version.cd eng/packages/http-client-csharp-mgmt
npm installThis updates package-lock.json to resolve the new dependency version.
cd eng/packages/http-client-csharp-mgmt
npm run build:emitterIf TypeScript compilation fails, examine the errors — they likely indicate breaking API changes in the base @azure-typespec/http-client-csharp package. Fix the emitter source code under eng/packages/http-client-csharp-mgmt/emitter/ accordingly.
cd eng/packages/http-client-csharp-mgmt
npm run lint
npm run prettierIf lint or prettier checks fail, fix with:
npm run lint:fix
npm run prettier:fixThese checks are required to pass CI. Always run them after any emitter code changes.
cd eng/packages/http-client-csharp-mgmt
npm run build:generatorThis runs dotnet build ./generator. The Azure.Generator.Management project references the Azure.Generator NuGet package, whose version is controlled by AzureGeneratorVersion in eng/centralpackagemanagement/Directory.Generation.Packages.props.
If C# compilation fails, examine the errors — they likely indicate breaking API changes in the Azure.Generator package. Fix the generator source code under eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/ accordingly.
pwsh eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1This script:
Refresh-Mgmt-Build)Mgmt-TypeSpec test project under generator/TestProjects/Local/Mgmt-TypeSpec/If regeneration produces file changes, they must be included in the commit.
pwsh doc/GeneratorVersions/Emitter_Version_Dashboard.ps1This regenerates doc/GeneratorVersions/Emitter_Version_Dashboard.md so the documented dependency chain matches the updated package.json versions. The updated dashboard file must be included in the commit.
git status to see all modified filespackage.json match the Azure package's compatible dependency chainpackage.json, package-lock.json, Directory.Generation.Packages.props, Emitter_Version_Dashboard.md, and any regenerated test project files are included| File | Role |
|---|---|
eng/azure-typespec-http-client-csharp-emitter-package.json | Source of truth for latest base version |
eng/packages/http-client-csharp-mgmt/package.json | Mgmt emitter npm dependencies |
eng/packages/http-client-csharp-mgmt/package-lock.json | Resolved npm dependency tree |
eng/centralpackagemanagement/Directory.Generation.Packages.props | NuGet version properties (AzureGeneratorVersion) |
eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj | Generator project referencing Azure.Generator |
eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1 | Test project regeneration script |
eng/packages/http-client-csharp-mgmt/eng/scripts/Generation.psm1 | Build and generation helper functions |
doc/GeneratorVersions/Emitter_Version_Dashboard.ps1 | Script to regenerate the version dashboard |
doc/GeneratorVersions/Emitter_Version_Dashboard.md | Emitter dependency version dashboard |
b82d2f2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.