CodeVetter · Repo Unpack · Contributor handoff
preactjs/preact
This brief is tied to the pinned commit and should be revalidated against any later checkout. Tests and CI were inspected, not executed; suggested commands below are future validation guidance, not completed checks. The investigation sampled source and tests extensively but does not establish exhaustive coverage or confirmed vulnerabilities. Keep edits localized to the relevant core/addon contract, then consider declarations, VNode factories, property mappings, and bundle behavior where those contracts cross boundaries.
- Read package.json, CONTRIBUTING.md, and workspace configuration first to establish package boundaries, pnpm/Node versions, scripts, and dependency policy; addon manifests are not separate workspace projects.
- For rendering changes, follow src/index.js → render.js → diff/index.js → diff/children.js; the root wrapper, previous tree, recursive diff, and commit queues form the central edit boundary.
- Keep the classic and automatic JSX VNode factories synchronized when changing internal shape or ref behavior, including the undefined constructor marker.
- Treat _children, _parent, _depth, _index, _dom, and _flags as coordinated renderer metadata; child matching temporarily uses _index before assigning the final position.
- Read component queue scheduling and hooks before changing batching; enqueueRender assumes asynchronous scheduling, and pending hook values are promoted by options._render.
- Read Suspense with core hydration and portal branches before editing async rendering; parked hook state, refs, DOM containers, and stream markers span multiple modules.
- Preserve previous options callbacks when extending addon hooks, and restore test scheduler overrides; setupRerender/act/teardown provide the established controls.
- Cross-bundle private-field changes require reviewing mangle.json and build warnings; minified test aliases and property-renaming transforms are intended to exercise that interoperability.
- When execution is authorized, use the relevant file-filtered test:vitest invocation first; declaration changes call for test:ts:core or test:ts:compat, and dist validation requires build before test:vitest:min. These scripts and CI were inspected, not executed here.
- Do not equate the tsc lint command with full runtime-JavaScript checking: jsconfig-lint.json sets checkJs=false and limits its included surfaces; separate strict configs check core and compat declaration fixtures.
- Follow formatting conventions of tabs, single quotes, semicolons, no trailing commas, and 80-column print width; use existing oxfmt/oxlint scripts.
- Read source when contributor prose drifts: CONTRIBUTING describes options.js as an empty object, but the inspected file initializes _catchError; compat/debug peer metadata also still targets preact ^10.0.0 despite the root 11.0.0 version.
- Review manual benchmark automation before using it: single-bench.yml calls ci.yml with an unsupported reusable-workflow interface and clears files after producing preact-local.tgz.
- Installation is not a passive read: prepare invokes Husky and Chromium installation, while workspace settings restrict dependency age, provenance trust, engines, and build scripts.