Repository navigation
ci: smoke-test that npm run openapi-ts still works on dependency bumps - #1368
Merged
Merged
Conversation
Nothing in CI actually exercises the openapi-ts codegen path today, so a dependency bump that breaks it (e.g. the typescript 6->7 migration in #1325, which broke @hey-api/openapi-ts's peer-dependency compatibility — see #1367) only surfaces when someone manually regenerates the client. Runs on any PR touching package.json/package-lock.json rather than just @hey-api/openapi-ts's own line, since the actual trigger can be any dependency in that graph. Only fails on a nonzero exit (the generator crashing) — deliberately does not diff the regenerated output against what's committed, since the production schema drifts independently of any given PR and a diff there isn't itself a failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report⚪ Coverage unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
Rationale belongs in the PR description, not a multi-line comment block. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
jordividaller
approved these changes
Sep 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CI job that runs
npm run openapi-tsagainst the production gateway whenever a PR touchespackage.json/package-lock.json, so a dependency bump that breaks the codegen path fails CI instead of silently landing.Why
Nothing in CI today actually exercises
npm run openapi-ts. #1325 (the TypeScript 6 → 7 / tsdown migration) silently broke it —@hey-api/openapi-tspeer-depends on TypeScript 6.x, so the pin to 7.0.2 made codegen crash for anyone who ran it locally, and nobody noticed until #1367 tried to regenerate the client for an unrelated dependency bump. Gating this on@hey-api/openapi-ts's own version line wouldn't have caught it, since the breaking change came from an unrelated dependency (typescript) — so this triggers on anypackage.json/package-lock.jsonchange instead.Deliberately not diffing the regenerated
src/clientoutput against what's committed: the production schema drifts independently of any given PR, so a diff by itself isn't a failure — it would just make unrelated dependency-bump PRs fail because the API happened to change upstream. Only a nonzero exit (the generator itself crashing) fails this job.What changed
Toggle details
.github/workflows/openapi-codegen-smoke-test.yml: checkout → setup Node 24.15.0 →npm ci→npm run openapi-ts. Path-filtered topackage.json/package-lock.json.main(pre-chore(deps-dev): update @hey-api/openapi-ts and regenerate client (TS7-compatible) #1367): the job's core step exits 1 with the sameTypeError: Cannot read properties of undefined (reading 'LineFeed')crashnpm run openapi-tscurrently produces there — confirms this would have caught chore(infra) - migrate to typescript v7 && tsdown #1325's regression.zizmor(npm run lint:workflows) clean.Sequencing note: until #1367 merges, any other PR that touches
package.json/package-lock.jsonwhilemainstill has the broken@hey-api/openapi-tspin will fail this new check too, even if unrelated to codegen. Worth merging #1367 first, or shortly after this one.Screenshots
N/A
Related Resources
Testing
Note
Low Risk
Adds read-only CI coverage only; no runtime or application code changes.
Overview
Adds a path-filtered GitHub Actions workflow that runs on PRs touching
package.jsonorpackage-lock.json.The job checks out the repo, installs with
npm ci, and runsnpm run openapi-tsagainst the production gateway. Only a nonzero exit fails CI—it does not compare regeneratedsrc/clientoutput to what is committed, so upstream schema drift does not block unrelated dependency bumps.This closes the gap where dependency changes (e.g. TypeScript 7 vs
@hey-api/openapi-tspeer expectations) could break codegen without any CI signal.Reviewed by Cursor Bugbot for commit 83a14f4. Bugbot is set up for automated code reviews on this repo. Configure here.