CodeVetter · Repo Unpack · Contributor handoff
unjs/ofetch
Start with the public factory and raw pipeline, then follow the helper or type implicated by the task. Preserve option precedence and lifecycle ordering, which affect every client call. Tests and CI were inspected, not executed; their existence supplies investigation targets rather than passing evidence. The report inspected 17 source/example/test files plus documentation and configuration, but remains bounded rather than exhaustive.
- Read index.ts, base.ts, fetch.ts, and types.ts first to distinguish exported client aliases, runtime factories, and generic response contracts.
- Preserve explicit header replacement and query precedence when editing resolution; the defaults test exercises specialized merging rather than arbitrary recursive deep merging.
- Treat fetch.ts as a broad-impact edit boundary: onRequest precedes normalization, decoding precedes onResponse, and onResponse precedes status failure handling.
- Use local URL helper behavior as authority despite README's ufo references; query array append/delete rules and base prefix logic deserve explicit regression cases.
- Keep .ts import extensions and explicit public declarations consistent with strict NodeNext, isolatedDeclarations, and noEmit configuration.
- Preserve pnpm and repository lint conventions: ESLint extends unjs, Prettier specifies es5 trailing commas, and Renovate extends the shared unjs configuration.
- Tests and CI were inspected, not executed. In a future execution-authorized task, use focused Vitest cases first, then pnpm test/build as appropriate; account for the suite's external jsonplaceholder calls.
- Avoid running examples or release as routine validation: headers.mjs reads GH_TOKEN and posts a public gist, playground contacts httpstat.us, and release publishes an alpha package and pushes.