Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.7 KB

File metadata and controls

72 lines (53 loc) · 2.7 KB

AGENTS

This guide helps automated agents submit high-quality PRs for this repo.

Repo map

  • package/ is the published library (TypeScript + native code via Nitro).
  • example/ is an Expo app used for manual verification.
  • docs/ is the technical documentation (Docusaurus, English). User-facing docs live under docs/docs/ (API, setup, guides, troubleshooting, etc.). Run bun run docs:start or bun run docs:build from root.
  • Root package.json defines the workspace.

Local setup

bun install
cd package && bun install
cd example && bun install

Common workflows

  • Generate Nitro bindings: cd package && bun run specs
  • Typecheck: cd package && bun run typecheck
  • Lint: cd package && bun run lint
  • Test (all): cd package && bun run test
  • Test (single file): cd package && bun run test -- src/hooks/__tests__/usePaymentCheckout.integration.test.ts
  • Run example: cd example && npx expo prebuild && npx expo run:ios or npx expo run:android
  • Docs (dev): bun run docs:start. Docs (build): bun run docs:build

Nitro Modules notes

  • Specs and types are generated by Nitrogen.
  • If you change any *.nitro.ts specs or Hybrid Object types, run cd package && bun run specs.
  • Regenerating specs updates the native bindings and TypeScript outputs under package/.

Change guidelines

  • Keep PRs small and scoped to one objective.
  • If you change public APIs, update README.md and any types.
  • Docs (docs/): When you add, change, or remove public API, setup steps, or user-facing behavior, create, update, or delete the relevant pages under docs/docs/ so the Docusaurus docs stay in sync. Examples: new hook option → docs/docs/api/use-payment-checkout.md; plugin config change → docs/docs/setup/expo-plugin.md; new guide → add under docs/docs/guides/ and reference in docs/sidebars.ts. All docs content is in English.
  • If you touch native code, validate both iOS and Android paths.
  • Avoid drive-by refactors and formatting-only changes.

Agentic PR checklist

Include these sections in your PR description:

  • Summary: 2-5 bullets describing the intent and impact.
  • Test plan: checklist of commands run and outcomes. If untested, say why.
  • Risk: note compatibility, migration, or platform risk.
  • Notes: assumptions, edge cases, or follow-ups.

Example template:

## Summary
- ...

## Test plan
- [ ] `cd package && bun run typecheck` (not run)
- [ ] `cd package && bun run lint` (not run)
- [ ] `cd package && bun run test:ci` (not run)
- [ ] `cd example && bunx expo run:ios` (not run)
- [ ] `cd example && bunx expo run:android` (not run)
- [ ] `bun run docs:build` (if you changed `docs/` or public API/setup; not run)

## Risk
- ...

## Notes
- ...