You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Dependency Mgmt] deps-catalog-check workflow should run formatters before opening PR #852
The deps-catalog-check workflow bumps pinned versions in pnpm-workspace.yaml and opens a chore(deps): update catalog dependencies PR, but doesn't run the project's formatters against the workspace before pushing. When a bumped tool ships a new formatter rule, the resulting PR fails the format check step in CI and requires a manual follow-up commit to land.
#839 hit this: @typespec/compiler ^1.11.0 → ^1.12.0 introduced a rule that breaks long union return types across multiple lines, which re-formatted two .tsp files in lib/core/lib/core/routes/ (applications.tsp, competitions.tsp). CI caught it via tsp format --check in validate-workspace; the fix was a one-shot tsp format + commit on the branch.
The catalog workflow bumps a stack of related packages at once, which is where formatter-rule changes most often sneak in — Dependabot's one-package-at-a-time PRs rarely cross that boundary.
Proposed change
In .github/workflows/deps-catalog-check.yml, add a step after Run catalog update script and before Create pull request that runs the project's formatters across the workspace (Prettier, tsp format, plus any others). Any resulting changes get committed into the same PR by peter-evans/create-pull-request.
Worth noting in the PR body template: a formatter-rule change will now show up silently as extra files in the diff rather than as a red CI check, so reviewers should skim the non-lockfile part of the diff. For a chore(deps): PR this is almost always net-positive since the formatter output is mechanical.
Acceptance criteria
Workflow runs formatters on the working tree after the catalog bump and before opening the PR
PR opened by the workflow passes validate-workspace (including tsp format --check) on its first CI run, even when a bumped dep ships a new formatter rule
PR body or commit message notes that mechanical formatter output may be included in the diff
Two PR-body fixes worth bundling into this scope while you're editing the template:
pnpm run typespec doesn't work from the root. The If TypeSpec packages updated: verify pnpm run typespec output is sensible checkbox errors with ERR_PNPM_NO_SCRIPT — typespec is defined per-package in lib/core, lib/cli, lib/ts-sdk, website, and the two templates, not at the workspace root. Replacing it with pnpm -r run typespec runs it across every workspace that defines it.
The changeset checkbox is narrower than the actual rule. It currently says "Add changeset if peerDep ranges changed for @common-grants/core", but @common-grants/cli has @typespec/compiler as a runtime dependency, so any TypeSpec bump should add a changeset entry for cli too — which is what chore(deps): update catalog dependencies #822 did and what we just added to chore(deps): update catalog dependencies #839. Could broaden to: "Add changeset for @common-grants/core and @common-grants/cli if @typespec/* ranges changed".
And a third item, more in the spirit of the original proposed change than the PR-body tweaks above:
Workflow should regenerate committed build artifacts, not just run formatters. Same root cause as the formatter issue — the catalog workflow only edits pnpm-workspace.yaml, so any emitter-level changes silently drift the committed snapshots until someone happens to run tsp compile locally. #839 just hit this: @typespec/openapi3 1.12 shipped a discriminator-mapping fix (microsoft/typespec#10268) that changed output for six committed OpenAPI YAMLs under lib/cli/lib/openapi/ and website/public/openapi/. CI didn't catch it because no check diffs committed snapshots against fresh tsp compile output. Surfaced manually during review; fix landed in 8646416 on the PR. A pnpm -r run typespec step alongside the formatter pass would close this gap by the same mechanism.
changed the title [-]deps-catalog-check workflow should run formatters before opening PR[/-][+][Dependency Mgmt] deps-catalog-check workflow should run formatters before opening PR[/+]on Aug 4, 2026
Activity
SnowboardTechie commentedon May 21, 2026
Two PR-body fixes worth bundling into this scope while you're editing the template:
pnpm run typespecdoesn't work from the root. TheIf TypeSpec packages updated: verify pnpm run typespec output is sensiblecheckbox errors withERR_PNPM_NO_SCRIPT—typespecis defined per-package inlib/core,lib/cli,lib/ts-sdk,website, and the two templates, not at the workspace root. Replacing it withpnpm -r run typespecruns it across every workspace that defines it.The changeset checkbox is narrower than the actual rule. It currently says "Add changeset if peerDep ranges changed for
@common-grants/core", but@common-grants/clihas@typespec/compileras a runtime dependency, so any TypeSpec bump should add a changeset entry for cli too — which is what chore(deps): update catalog dependencies #822 did and what we just added to chore(deps): update catalog dependencies #839. Could broaden to: "Add changeset for@common-grants/coreand@common-grants/cliif@typespec/*ranges changed".SnowboardTechie commentedon May 21, 2026
And a third item, more in the spirit of the original proposed change than the PR-body tweaks above:
Workflow should regenerate committed build artifacts, not just run formatters. Same root cause as the formatter issue — the catalog workflow only edits
pnpm-workspace.yaml, so any emitter-level changes silently drift the committed snapshots until someone happens to runtsp compilelocally. #839 just hit this:@typespec/openapi3 1.12shipped a discriminator-mapping fix (microsoft/typespec#10268) that changed output for six committed OpenAPI YAMLs underlib/cli/lib/openapi/andwebsite/public/openapi/. CI didn't catch it because no check diffs committed snapshots against freshtsp compileoutput. Surfaced manually during review; fix landed in 8646416 on the PR. Apnpm -r run typespecstep alongside the formatter pass would close this gap by the same mechanism.[-]deps-catalog-check workflow should run formatters before opening PR[/-][+][Dependency Mgmt] deps-catalog-check workflow should run formatters before opening PR[/+]