CodeVetter · Repo Unpack · Contributor handoff
gcanti/fp-ts
Begin with the affected public module, its shared helpers, runtime tests, and type assertions. Preserve inferred types, laziness, branch behavior, and compatibility aliases when making small changes. Tests and CI were inspected, not executed; any later validation must report actual commands and outcomes separately. This inventory is bounded and should guide targeted investigation rather than substitute for complete coverage.
- Read package.json, tsconfig.json, and vite.config.ts first: they distinguish source compilation, global test typing, runtime discovery, and the multi-stage npm test command.
- Consumer code is expected to enable strict TypeScript and import individual fp-ts/<module> paths; the README also requires a single installed fp-ts version.
- Follow established syntax and checks: no semicolons, single quotes, width 120, no trailing commas; ESLint requires sorted imports, rejects import cycles, and forbids spread arguments to Array.push.
- For combinator edits, distinguish data-last public functions from instance adapters and dual overloads; preserve W widening, K lifting, E effectful matching, and constrained C instance conventions.
- A new public source module needs barrel exposure: test/index.ts derives expected export names from source files, and scripts/build.ts derives module manifests from emitted JavaScript, with HKT handled specially.
- Keep @since/@category documentation and compatibility exports deliberate: TaskEither's deprecated taskEither/taskEitherSeq dictionaries remain exported, with guidance to prefer smaller instances; docs-ts excludes internal.ts.
- Tests and CI were inspected, not executed. For later authorized validation, the existing Vitest script can target the affected test file, dtslint checks signature inference, and npm test runs the full configured chain; coverage is a separate command.
- Execution traps include prebuild deleting dist, postbuild rewriting generated declarations, npm test generating docs, and release publishing to npm; read-only onboarding must inspect these definitions without invoking them.