Skip to content

Add examples type-checking to CI#76

Merged
LewieJ08 merged 1 commit into
mainfrom
dev
Jul 7, 2026
Merged

Add examples type-checking to CI#76
LewieJ08 merged 1 commit into
mainfrom
dev

Conversation

@LewieJ08

@LewieJ08 LewieJ08 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

examples/ was never type-checked anywhere — not by npm run build (only src/ and tests/ are in tsconfig.json's include), and not by CI. This is exactly how the user.login typo in basic-usage.ts (fixed earlier this session) slipped through the #56 docs/examples audit undetected.

  • Added tsconfig.examples.json, which type-checks examples/**/* against the real SDK source via a paths mapping (@lujax/github-sdk → ./src/index.ts), since the package isn't installed from npm during local dev and the bare import needs somewhere to resolve to
  • New typecheck:examples script, wired into ci.yml between build and test
  • Verified it actually catches the bug it's meant to: temporarily reintroduced user.login, confirmed tsc fails with Property 'login' does not exist on type 'User', then reverted
  • npm run build, npm run typecheck:examples, npm test (188/188), and format:check all clean

Not tied to a tracked GitHub issue — found and closed during the pre-publish audit.

examples/ was never type-checked anywhere - not by npm run build
(only src/ and tests/ are in tsconfig.json's include) and not by CI.
This is exactly how the user.login typo in basic-usage.ts (fixed in
ae1c0dc) went undetected through the #56 docs/examples audit.

Added tsconfig.examples.json, which type-checks examples/ against the
real SDK source via a path mapping for the @lujax/github-sdk import
(the package isn't installed from npm during local dev, so bare
imports need to resolve to src/index.ts instead). Wired a new
typecheck:examples script into ci.yml, between build and test.

Verified it actually catches the class of bug it's meant to: temporarily
reintroduced user.login and confirmed tsc fails with
"Property 'login' does not exist on type 'User'", then reverted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@LewieJ08
LewieJ08 merged commit 837129e into main Jul 7, 2026
4 checks passed
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