pnpm-format
Format the codebase with pnpm and recover from common formatting failures.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 5.9k
- Forks
- 423
01 前言 Front Matter
- name
- pnpm-format
- description
- Format the codebase with pnpm and recover from common formatting failures.
02 资源文件 3
- 参考文档release-runbook.md5.4 KB
- 脚本scripts/promote-dist.sh1.2 KB
- 脚本scripts/stage-assemblies.sh3.1 KB
03 SKILL.md 正文
Format code with pnpm
Use this skill any time formatting is required in the TypeSpec repo. Do not assume formatting happens automatically; always run pnpm format following this guidance.
Preconditions
- Command must run from the repository root (where
package.jsonandpnpm-workspace.yamllive). - Dependencies must be installed.
Steps
- Confirm you are at the repo root.
- If
node_modulesare missing orpnpmcomplains about missing packages, run:pnpm install - Run the formatter:
pnpm format - If the command fails with
ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND, you are not at the repo root.cdto the root and retry. - If
pnpm formatexits with a non-zero code but prints a list of changed files, re-runpnpm formatonce to ensure a clean exit.
Notes
- Do not cancel the command; formatting may take about a minute.
04 同仓库更多 Skills
test-unbranded-emitter
Build and test the @typespec/http-client-python emitter. Use this skill whenever the user wants to test their local changes to the emitter, run the generator test suite, check if their http-client-python changes are passing, or validate a fix. Triggers on phrases like "test the emitter", "run tests", "check if my changes pass", "run test:generator", "run CI", or any mention of testing/validating changes in the emitter package.
generate-from-typespec
Generate Python SDK code from a TypeSpec specification using the local emitter. Use this skill when the user wants to generate/regenerate a Python client from a TypeSpec spec, provides a GitHub URL or local path to a TypeSpec project, or says things like "generate from this spec", "emit Python from this tsp", "regenerate the SDK", or "compile this TypeSpec for Python".
diff-upstream
Regenerate the local emitter and diff the generated code against the upstream baseline checked into autorest.python. Use this skill when the user wants to see how their emitter changes affect generated code compared to what's currently in production, says things like "diff upstream", "compare to baseline", "what changed vs production", "show me the diff", "how does this affect generated code", or wants to validate their changes produce the expected output differences.
writing-python-sdk-spector-mock-api-tests
Writes TypeSpec http-client-python generator mock API tests (azure/unbranded/shared) from a Spector case. Use when given a Spector case link or a PR link that modifies Spector cases under http-specs/azure-http-specs.
minimal-repro
Help create a minimal reproduction for a TypeSpec compiler or emitter bug. Use when a user provides TypeSpec source (pasted code or a GitHub URL) and describes an issue. Reproduces locally and reduces to a single-file repro.
http-client-python-bump-and-release
Create a PR to bump TypeSpec/Azure Tools dependencies, update peer dependencies, or release a new version of the http-client-python package.