CodeVetter · Repo Unpack · Contributor handoff
istanbuljs/nyc
Begin with the CLI/core boundary and the generated self-coverage test setup before making changes. Keep configuration, argument routing, source selection, subprocess ancestry, and report remapping consistent. Tests and CI were inspected, not executed, and this brief is a bounded source investigation rather than exhaustive verification. Future checks should use existing npm/TAP machinery only when execution is authorized, with particular care around cleanup and source-mutating fixtures.
- Read package.json, bin/nyc.js, index.js, and lib/config-util.js first: they define publication, orchestration, state ownership, and configuration dispatch. This handoff is based on inspected source and CI, with no tests executed.
- Follow Standard JavaScript style and two-space, LF, UTF-8 EditorConfig settings; the lint script excludes snapshots, fixtures, and generated test build paths.
- Before running a targeted TAP file after authorized edits, refresh self-coverage through the existing instrument script: tests resolve generated runtime copies, and build-self-coverage copies package.json for generated hash-version lookup.
- Select tests by boundary: argument routing uses test/process-args.js, offline filesystem behavior uses test/instrument.js, and subprocess CLI behavior uses test/nyc-integration.js; npm test invokes the broader configured lifecycle.
- Treat cleanup and tests as mutating operations: npm-run-clean.js recursively removes artifact/cache paths, instrument tests temporarily chmod fixtures, and add-all-files tests create and remove source fixtures.
- Keep command names synchronized across parsing and dispatch, and preserve the distinction between nyc arguments and child arguments, including Node execArgv passed after --.
- For cache/source-map edits, inspect Hash.salt(), filename hash tracking, contentHash persistence, and cached map reloading together; report filtering occurs after remapping only when excludeAfterRemap is enabled.
- Account for platform limits when reporting verification: inspected CI covers Ubuntu Node 20/24 and Windows lts/*, signal tests bypass Windows, and configured 100% coverage checks are disabled there; none of these definitions proves a passing run.