Skip to content

Contributing

  • Node.js v24 or later
  • pnpm v9
Terminal window
pnpm install
Terminal window
pnpm test
Terminal window
pnpm lint
Terminal window
pnpm lint:fix
Terminal window
pnpm snapshot
Terminal window
npm run build && pnpm --filter @7nohe/react-app generate:api && pnpm --filter @7nohe/react-app test:generated
Terminal window
pnpm --filter docs dev

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-ignore comments over known typing bugs in the bundled declaration files of @hey-api/openapi-ts and @hey-api/shared. No implementation code is modified.
  • src/vendor-typestubs.d.ts stubs modules referenced by @hey-api/openapi-ts type declarations but not installed here (framework-specific client plugins such as ky, ofetch, nuxt/app, @angular/*).

When upgrading @hey-api/openapi-ts, recreate the patches against the new version:

Terminal window
pnpm patch @hey-api/openapi-ts@<new-version>
# edit the printed directory, then
pnpm 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.