Emitter Package Update
Bump @azure-tools/typespec-python to the latest version in emitter-package.json and create a PR.
Prerequisites
Before running this workflow, verify the following tools are installed:
# Check npm-check-updates npx npm-check-updates --version # Check tsp-client tsp-client --version # Check GitHub CLI gh --version
If any tool is missing:
- npm-check-updates: Install via
npm install -g npm-check-updates - tsp-client: Install via
npm install -g @azure-tools/typespec-client-generator-cli - GitHub CLI: Install from https://cli.github.com/ or via
winget install GitHub.cli
Workflow
1. Prepare Repository
Reset and sync the SDK repo to a clean state:
git reset HEAD && git checkout . && git clean -fd && git checkout origin/main && git pull origin main
2. Determine Latest Version
Run npm-check-updates to find the latest @azure-tools/typespec-python version:
npx npm-check-updates --packageFile eng/emitter-package.json
Extract the target version from the output (e.g., 0.46.4).
3. Create Feature Branch
git checkout -b bump-typespec-python-{version}
Replace {version} with the actual version number (e.g., bump-typespec-python-0.46.4).
4. Update Dependencies
Apply the version update:
npx npm-check-updates --packageFile eng/emitter-package.json -u
Align @azure-tools/openai-typespec with the version pinned in azure-rest-api-specs/package.json to ensure consistency between the emitter and the spec repo. Check the spec repo's version and update eng/emitter-package.json accordingly (e.g., set "@azure-tools/openai-typespec": "1.8.0" to match).
Regenerate the lock file:
tsp-client generate-lock-file
5. Commit Changes
git add eng/emitter-package.json eng/emitter-package-lock.json git commit -m "bump typespec-python {version}"
6. Create Pull Request
Push branch and create PR:
git push -u origin bump-typespec-python-{version} gh pr create --title "bump typespec-python {version}" --body "Bump @azure-tools/typespec-python to version {version}"