Contributing
Prerequisites
Section titled “Prerequisites”- Node.js v24 or later
- pnpm v9
Install dependencies
Section titled “Install dependencies”pnpm installRun tests
Section titled “Run tests”pnpm testRun linter
Section titled “Run linter”pnpm lintRun linter and fix
Section titled “Run linter and fix”pnpm lint:fixUpdate snapshots
Section titled “Update snapshots”pnpm snapshotBuild example and validate generated code
Section titled “Build example and validate generated code”npm run build && pnpm --filter @7nohe/react-app generate:api && pnpm --filter @7nohe/react-app test:generatedPreview the docs
Section titled “Preview the docs”pnpm --filter docs devType patches for dependencies
Section titled “Type patches for dependencies”This project compiles with skipLibCheck: false, so type errors inside dependency declaration files fail the build. Two mechanisms keep it green:
patches/contains pnpm patches that insert// @ts-ignorecomments over known typing bugs in the bundled declaration files of@hey-api/openapi-tsand@hey-api/shared. No implementation code is modified.src/vendor-typestubs.d.tsstubs modules referenced by@hey-api/openapi-tstype declarations but not installed here (framework-specific client plugins such asky,ofetch,nuxt/app,@angular/*).
When upgrading @hey-api/openapi-ts, recreate the patches against the new version:
pnpm patch @hey-api/openapi-ts@<new-version># edit the printed directory, thenpnpm patch-commit <printed-directory>Run pnpm build afterwards — any remaining declaration errors point to patches or stubs that need updating, and patches that no longer apply can be removed.