CodeVetter · Repo Unpack · Contributor handoff
pmndrs/valtio
Start with the core runtime and the test that specifies the requested behavior, then inspect packaging or application adapters only when relevant. Preserve identity, version, listener, and snapshot contracts when editing the central proxy implementation. Tests and CI were inspected, not executed; commands below are future validation choices only when execution is authorized. The inventory and this investigation are bounded, and public documentation contains some version drift that must be checked against implementation.
- Read src/index.ts, src/vanilla.ts, and src/react.ts first for core changes: they establish exports, proxy/snapshot ownership, subscription timing, and React's access-tracked external-store adapter.
- For authorized future validation, start with pnpm run test:spec -- <relevant-test-file>, then test:types/test:lint; root test aggregates test:* scripts, and tests import valtio through aliases resolving to source rather than built artifacts.
- Tests and CI were inspected, not executed in this brief. Their configured discovery and commands describe intended validation; jsdom tests and renderToString assertions do not establish website/example end-to-end browser behavior.
- Preserve replacement and alias semantics: tests require replacement identity, unchanged previous objects, own-key order, retained shared members, and queued child operation delivery before parent replacement.
- Match strict TypeScript conventions, noUncheckedIndexedAccess/exactOptionalPropertyTypes, isolated declarations, explicit .ts source imports, single quotes, and no semicolons; declaration packaging rewrites source import extensions for published consumers.
- Use proxyMap/proxySet for reactive native-collection-like behavior, read snapshots and mutate live state, and account for globally marked refs and replaced child references; native Map/Set and Promise values are not recursively proxied by the default eligibility rule.
- For docs/example work, inspect that surface's manifest and runtime API usage instead of assuming the root version; maintain getDocsNav for new pages, verify v2 promise semantics against source, and recognize history as an external package.
- Packaging changes affect six entry builds and declaration patching; inspect the CJS/ESM workflow before selecting validation. CONTRIBUTING requests focused tests and discussion-led contributions, with maintainer-created PRs rather than direct contributor PRs.