- This is a pnpm
11.0.0workspace; install withpnpm install --frozen-lockfileto match CI. Node must be>=22; CI currently uses Node24.8and a pinned Foundry nightly. - Workspace packages are
packages/*,docs,examples/**,simulation-test, andbenchmark. packages/corepublishes thepondernpm package. Public exports start inpackages/core/src/index.ts; the CLI bin starts inpackages/core/src/bin/ponder.ts.packages/coreandpackages/reactbuild with custombuild.tsscripts.packages/client,packages/utils, andpackages/create-ponderbuild with tsup.- Core source uses
@/*path aliases. The core build rewrites these aliases indist/esmanddist/types, so do not replace source aliases just to satisfy package output.
- Build publishable packages:
pnpm build. - Lint and format use Biome:
pnpm lint,pnpm format,pnpm lint:fix. - Root typecheck covers
packages/**only:pnpm typecheck. - Focused package checks:
pnpm --filter ponder typecheck,pnpm --filter @ponder/client typecheck,pnpm --filter @ponder/utils typecheck,pnpm --filter create-ponder typecheck. - Focused tests:
CI=1 pnpm --filter ponder test src/path.test.ts,CI=1 pnpm --filter @ponder/client test src/index.test.ts,pnpm --filter create-ponder test. - Type-level Vitest suites use separate scripts where present:
pnpm --filter ponder test:typecheck,pnpm --filter @ponder/client test:typecheck,pnpm --filter @ponder/react test:typecheck. pnpm testruns all workspace test scripts in parallel with--no-bail; several package scripts are plainvitest, so setCI=1for one-shot local runs and prefer--filterto avoid unrelated network-heavy suites.
- Core Vitest setup (
packages/core/vite.config.ts) caps threads at 4, loadspackages/core/src/_test/setup.ts, and runspackages/core/src/_test/globalSetup.ts. - Core global setup generates
packages/core/src/_test/generated.tswithpnpm wagmi generateif missing, then starts an Anvil proxy. Foundry/Anvil must be installed for core tests. - Core database tests default to in-memory PGlite. Set
DATABASE_URLinpackages/core/.env.localonly when intentionally testing Postgres; tests create and dropvitest_*databases/roles. packages/utils/src/_test/*contains live RPC-provider tests that requireRPC_URL_*values frompackages/utils/.env.example; avoid broad utils/root test runs unless those env vars and network access are intended.simulation-testandbenchmarkuse Bun scripts and external Postgres/RPC env from their.env.examplefiles. TheirDATABASE_URLshould omit a database name; scripts append app-specific database names.
packages/core/src/_test/generated.tsis generated by Wagmi from Foundry contracts underpackages/core/src/_test/contracts/and is ignored by Biome.packages/create-ponderbuild copies rootexamples/intopackages/create-ponder/templates, excludes multi-app examples (with-nextjs,with-foundry,with-trpc,with-client,with-offchain), renames dotfiles, and blanks RPC URLs in generated_dot_env.localfiles.- Biome intentionally ignores
docs/,dist/, generated folders,.ponder, cache/out directories, Solidity files, andpnpm-lock.yaml.
- Docs are a Vocs app in
docs; usepnpm --filter ponder-docs devorpnpm --filter ponder-docs build. - CI separately verifies the Next.js frontend example with
pnpm --filter ponder-examples-with-nextjs-frontend buildafterpnpm build.
- Changesets are fixed for
ponder,create-ponder,eslint-config-ponder,@ponder/client, and@ponder/react; docs/examples are ignored. Create changesets withpnpm changeset. Public API or bug-fix PRs normally need a patch changeset. - Changesets has a bug for fixed packages at pre-
1.0.0versions with a minor component of10or greater: aminorchangeset incorrectly produces1.0.0. Manually correct the generated release PR to the next0.xminor version (for example,0.16.10to0.17.0) before merging. - Write changesets in the same voice as
packages/core/CHANGELOG.md: concise, user-facing, past tense, and focused on observable behavior. - Start with the outcome, not the implementation. Prefer phrasing like "Fixed a bug that caused...", "Fixed a regression introduced in
v0.16.0that caused...", "Improved...", "Added...", "Updated...", or "Removed...". - Include concrete symptoms when helpful, especially exact error messages in backticks. Use patterns like "Fixed the error
..." or "that caused...". - Name affected APIs, config fields, commands, packages, and options with backticks, such as
ponder.config.ts,context.client,context.db,@ponder/client,p.bytes(),ordering: "omnichain", andponder db list. - Use repository vocabulary consistently: Ponder, GraphQL, JSON-RPC, RPC, Postgres, PGlite, backfill, live, crash recovery, factory, and rpc cache.
- Avoid implementation details, internal refactors, PR narration, and vague language unless the detail explains user impact. Do not write "this PR", "we", "users may notice", "various fixes", or "some improvements".
- Keep each changeset entry narrow. If a PR includes unrelated user-facing changes, use multiple changesets or multiple short paragraphs so each changelog bullet is easy to scan.
- For dependency-only updates, only write a custom changeset if there is a user-facing reason, such as a security patch or a fixed runtime error.