diff --git a/.github/skills/http-client-python-bump-and-release/SKILL.md b/.github/skills/http-client-python-bump-and-release/SKILL.md index 1026d0c6bb5..32d14d7721d 100644 --- a/.github/skills/http-client-python-bump-and-release/SKILL.md +++ b/.github/skills/http-client-python-bump-and-release/SKILL.md @@ -25,24 +25,30 @@ npm install -g npm-check-updates ## Workflow +Before starting or resuming, inspect the working tree, current branch, remotes, and existing release commits. Preserve existing task work. If the branch already contains the prepared release, continue from the first incomplete step instead of repeating dependency updates or incrementing the version again. + 1. Navigate to the package directory: ```bash cd {REPO}/packages/http-client-python ``` -2. Reset and sync with main: +2. For a new release, fetch `main` from the remote whose URL points to `microsoft/typespec`: ```bash - git reset HEAD && git checkout . && git checkout origin/main && git pull origin main + git fetch main ``` -3. Create release branch (use current date in MM-DD format): + Do not reset or discard existing changes to prepare a release. + +3. Create release branch (use current date in MM-DD format), unless the environment already supplied the task branch: ```bash - git checkout -b publish/python-release-{MM-DD} + git switch --create publish/python-release-{MM-DD} /main ``` + If the name belongs to unrelated work, choose an unused suffix; never overwrite it. Record the actual task branch with `git branch --show-current` for publishing and PR verification. + 4. Update dependencies: ```bash @@ -70,7 +76,7 @@ npm install -g npm-check-updates npm run change:version ``` - Verify that the script updated both the emitter version in `package.json` and `CHANGELOG.md`. If neither file was updated: + Check the command's exit status and investigate partial changes on failure. Verify that the script updated both the emitter version in `package.json` and `CHANGELOG.md`. If neither file was updated: - Increment the third component of the emitter version in `package.json` (for example, `a.b.c` to `a.b.(c+1)`). - Add this entry near the top of `CHANGELOG.md`, immediately after the changelog title: @@ -87,17 +93,33 @@ npm install -g npm-check-updates 8. Build and commit: ```bash - npm install && npm run build && git add -u && git commit -m "bump version" + npm install && npm run build ``` -9. Push and create PR: + Complete the repository's applicable validation before committing. Stage only the release files and any explicitly requested skill update; do not stage unrelated work. Use a conventional commit message and the required co-author trailer. Preserve existing release commits when resuming. + +9. Publish the actual task branch: + - Identify the push remote by URL, following the repository's personal-fork rules; do not assume it is `origin`. + - Prefer authenticated Git and `gh`. If GitHub CLI is unavailable or unauthenticated, discover and try an available authenticated GitHub/VS Code publishing integration before asking the user to log in. + - Git authentication is independent of `gh`: check it with `git push --dry-run HEAD`. Public fetch access and read-only API access do not establish push permission. + - Publish with Git, or let a publishing-capable PR integration publish the branch: ```bash - cd {REPO} - git push origin HEAD + git push --set-upstream HEAD ``` -10. Create PR with title `[python] release new version` and no description. +10. Create and verify the PR: + - Target `microsoft/typespec`, base `main`, from the actual published branch, with the exact title `[python] release new version` and an empty body. Reuse an existing matching open PR rather than creating a duplicate. + - Use an available authenticated integration; GitHub CLI is optional. With authenticated CLI access: + + ```bash + gh pr create --repo microsoft/typespec --base main --head : --title "[python] release new version" --body "" + ``` + + - Verify the created PR's repository, base and head branches, head commit, exact title, empty body, and release files. If the user requested skill changes in this PR, verify they are included too. + - Inspect publishing errors before retrying. For example, `Callback URL is required` indicates the VS Code integration is unavailable; fall back to another authorized publishing route, not another identical tool call. + - If Git and all available publishing integrations are blocked, report the errors and request authentication, such as `gh auth login` and `gh auth setup-git`, or integration repair. Never ask for a token in chat. Resume at publishing once access is restored. + - A local commit or branch push is not completion: return a verified PR URL, or explicitly report that PR creation is blocked. Do not publish to npm or merge the PR. ## Post-Process Review @@ -108,6 +130,6 @@ npm install -g npm-check-updates - A step was ambiguous enough to create a real risk or delay. - A command was unnecessary or could be replaced by a demonstrably safer or more reliable command. 3. Do not change the skill based on preference, speculation, or an unobserved edge case. For every update, record the observed evidence and explain why the edit improves future releases. -4. Keep any skill update minimal, validate its formatting and frontmatter, and keep it separate from the completed release PR unless the user explicitly asks to include it there. +4. Keep any skill update focused and validate its formatting and frontmatter. Keep it separate from the release PR unless the user explicitly asks to include it there; in that case commit it on the release branch, publish it, and verify the PR contains it. 5. If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted. -6. Return the branch name, released package version, `@typespec/http-client-python` version, commit hash, pull request URL, review findings, and any skill update to the user. +6. Return the actual branch, prepared `@typespec/http-client-python` version, commit hash, verified PR URL, validation results and limitations, review findings, and any skill update. Distinguish a prepared release PR from an npm publication. diff --git a/packages/http-client-python/CHANGELOG.md b/packages/http-client-python/CHANGELOG.md index 0e31d6dd18b..6ef06a27868 100644 --- a/packages/http-client-python/CHANGELOG.md +++ b/packages/http-client-python/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log - @typespec/http-client-python +## 0.39.1 + +### Bump dependencies + +- Bump dependencies of `@typespec/*` and `@azure-tools/*` to latest versions + ## 0.39.0 ### Features diff --git a/packages/http-client-python/package-lock.json b/packages/http-client-python/package-lock.json index 52142076ede..77312bf4945 100644 --- a/packages/http-client-python/package-lock.json +++ b/packages/http-client-python/package-lock.json @@ -1,12 +1,12 @@ { "name": "@typespec/http-client-python", - "version": "0.39.0", + "version": "0.39.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@typespec/http-client-python", - "version": "0.39.0", + "version": "0.39.1", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -18,7 +18,7 @@ }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.46", - "@azure-tools/typespec-autorest": "~0.73.0", + "@azure-tools/typespec-autorest": "~0.73.1", "@azure-tools/typespec-azure-core": "~0.73.0", "@azure-tools/typespec-azure-resource-manager": "~0.73.0", "@azure-tools/typespec-azure-rulesets": "~0.73.0", @@ -50,7 +50,7 @@ "node": ">=22.0.0" }, "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.73.0 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.73.1 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.73.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.73.0 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.73.0 <1.0.0", @@ -89,13 +89,13 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.73.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-autorest/-/typespec-autorest-0.73.0.tgz", - "integrity": "sha512-SvctS7ALld55xASlCNZ23KJJ2pfpSGIcnEhUzykS2p7QEMe9I2zCSNReQg/TklSVHsl303iO7LI6RoUqtQ/oOw==", + "version": "0.73.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.73.1.tgz", + "integrity": "sha512-CsHcF0tZC2JcNYJ6RqaSxISLDx4V4UtNufgPi1MGG0GePPNm4WcWMaQWyDlfvCgkVYXfFIdTgphRR3ZO6JzIfg==", "dev": true, "license": "MIT", "dependencies": { - "@azure-tools/typespec-azure-examples": "^0.2.0", + "@azure-tools/typespec-azure-examples": "^0.2.1", "yaml": "^2.9.0" }, "engines": { @@ -134,9 +134,9 @@ } }, "node_modules/@azure-tools/typespec-azure-examples": { - "version": "0.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-azure-examples/-/typespec-azure-examples-0.2.0.tgz", - "integrity": "sha512-omv0wP/9+v3PEGy1lP/TD49hblBRc2PsCyaFekquwrIjCFP0ZNYyFD1tnxIWZkJBn2b+7zoc86I2t/aYj8LFpA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-examples/-/typespec-azure-examples-0.2.1.tgz", + "integrity": "sha512-AAwLMg0/5KH8tj05sVKEAhqVBHZ0ccRTZ+zTMzCEgphRkrIx+yCjil+0U4WsKWws+H6bAcTELft9SOtNKSyatA==", "dev": true, "license": "MIT", "dependencies": { @@ -156,8 +156,8 @@ }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/cliui": { "version": "9.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha1-b3iQ84b28feZU63B943sRvzC0pE=", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "dev": true, "license": "ISC", "dependencies": { @@ -171,8 +171,8 @@ }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/cliui/node_modules/string-width": { "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -189,14 +189,14 @@ }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/emoji-regex": { "version": "10.6.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha1-vz1uj3+P0ipl2XA0dbwBRzV6aw0=", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/string-width": { "version": "8.3.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-8.3.0.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", "dev": true, "license": "MIT", @@ -213,7 +213,7 @@ }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/yargs": { "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs/-/yargs-18.2.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", "dev": true, "license": "MIT", @@ -231,8 +231,8 @@ }, "node_modules/@azure-tools/typespec-azure-examples/node_modules/yargs-parser": { "version": "22.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha1-h7gglAUbBWdxc0bs0A/RSASzV8g=", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "dev": true, "license": "ISC", "engines": { diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index 658262ab694..b118a2423e2 100644 --- a/packages/http-client-python/package.json +++ b/packages/http-client-python/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http-client-python", - "version": "0.39.0", + "version": "0.39.1", "author": "Microsoft Corporation", "description": "TypeSpec emitter for Python SDKs", "homepage": "https://typespec.io", @@ -66,7 +66,7 @@ "emitter" ], "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.73.0 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.73.1 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.73.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.73.0 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.73.0 <1.0.0", @@ -104,7 +104,7 @@ "tsx": "^4.23.13" }, "devDependencies": { - "@azure-tools/typespec-autorest": "~0.73.0", + "@azure-tools/typespec-autorest": "~0.73.1", "@azure-tools/typespec-azure-core": "~0.73.0", "@azure-tools/typespec-azure-resource-manager": "~0.73.0", "@azure-tools/typespec-azure-rulesets": "~0.73.0",