Skip to content

fix(checks): run check:generated from checks:prepare - #8

Merged
Upd4ting merged 1 commit into
mainfrom
fix/restore-check-generated
Nov 11, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
fix/restore-check-generated

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Why

pnpm run checks must fail when sdk/src/generated/cloud-api.ts is stale against sdk/openapi/cloud.openapi.yaml. Onboarding (#5) replaced the checks script with antelopejs-checks, which does not run check:generated, so a stale client passed locally (ANT-2004). tooling-configs#304 now reports such dropped steps, but this repository was migrated before it.

What changes

  • package.json adds checks:prepare, which runs check:generated. antelopejs-checks runs checks:prepare before its other steps and stops if it fails. Generation rewrites a file that typecheck and lint read, so it runs first instead of beside them.
  • .github/workflows/ci.yml drops pnpm run check:generated from extra-commands. CI's checks job runs pnpm run checks, which now runs it.

Proof

The spec gets one new optional field, hint on Error, and the generated client is not regenerated. Then pnpm run checks runs from the repository root. Both files are restored afterwards.

Before (main):

> cloud-sdk-workspace@ checks
> antelopejs-checks

Checks: 11 passed, 0 failed.
exit: 0

After (this branch):

> cloud-sdk-workspace@ checks
> antelopejs-checks

[checks:prepare]
> @antelopejs/cloud-sdk@0.1.2 check:generated
> pnpm run generate && git diff --exit-code -- src/generated/cloud-api.ts

🚀 openapi/cloud.openapi.yaml → src/generated/cloud-api.ts [72.4ms]
diff --git a/sdk/src/generated/cloud-api.ts b/sdk/src/generated/cloud-api.ts
@@ -442,6 +442,7 @@ export interface components {
             code?: string;
             error?: string;
             message?: string;
+            hint?: string;
         } | unknown | unknown | unknown);
 ELIFECYCLE  Command failed with exit code 1.
Checks: 0 passed, 1 failed.
exit: 1

On a clean tree, this branch prints Checks: 11 passed, 0 failed., sync:check included.

Attention

  • A stale generated client now stops checks before the other steps run. Rerun after pnpm --dir sdk run generate.

@Upd4ting
Upd4ting merged commit 6484aee into main Nov 11, 2026
8 checks passed
@Upd4ting
Upd4ting deleted the fix/restore-check-generated branch November 11, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant