CodeVetter · Repo Unpack · Contributor handoff
immerjs/immer
Begin with public exports and the scope/proxy/finalization chain, then inspect the plugin and tests relevant to the requested behavior. Tests and CI were inspected, not executed, and this bounded inventory supplies no passing result or measured speedup. Future implementation work should preserve the existing Yarn, formatting, packaging, and lifecycle conventions, with execution performed only under separate authorization.
- For core changes, read src/immer.ts, Immer.produce, scope management, proxy traps, and processResult together before editing; exports and state lifecycle span those files.
- Follow Prettier's tabs, no semicolons, double quotes, no trailing commas, and 80-column code formatting; package hooks apply pretty-quick to staged files.
- When execution is authorized, start with the relevant suite through the existing test:src script and Vitest file filtering, then test:build for production CJS behavior; full test adds Flow checking. (inferred)
- Tests and CI were inspected only: configured source/build/Flow, coverage, and performance commands are verification plans, not evidence of passing tests, CI success, or benchmark improvements.
- Array edits must preserve no-op identity, drafting after reorder, inserted nested-draft cleanup, and patch round trips; targeted existing assertions cover these interacting invariants.
- For type changes, inspect compile-time assertion helpers and the actual compiler command; runtime assert returns its first argument, and inspected Vitest configuration does not establish TypeScript fixture checking.
- Treat underscore-suffixed internals and build aliases as packaging-sensitive: tsup mangles those properties, while base tests import src/internal and production tests alias public source imports to a built artifact.
- Before changing defaults or lifecycle semantics, reconcile comments with initialized values, preserve recipe exception revocation and listener timing, and account for documented tree, external-data, and nested-producer constraints.