CodeVetter · Repo Unpack · Feature catalog
istanbuljs/nyc
The primary interface wraps an existing executable or test runner to collect coverage. Users can control file selection, account for unloaded files, preload transpilers, and choose reports or threshold enforcement. Separate commands instrument source trees, regenerate reports, check stored coverage, and merge raw results. Source maps and documented external uploader workflows connect coverage to transpiled projects and hosted reporting services.
- Normal CLI execution accepts a child command and preserves its arguments; --silent suppresses reporting, and --no-clean retains stored results across runs.
- File selection supports include/exclude patterns, additional extensions, and optional node_modules inclusion; --all adds initial coverage for eligible unloaded files, including an explicit ESM reading branch.
- --require loads additional modules for transpilation or other setup; configurable require and VM hooks support ordinary modules, RequireJS/AMD, and vm.runInContext workloads.
- nyc instrument accepts a file or directory and writes transformed source to an output tree or stdout; options include complete-copy, explicit in-place operation, deletion, and exit-on-error.
- nyc report invokes each configured reporter with watermarks, skipEmpty, skipFull, projectRoot, and terminal width; show-process-tree additionally renders stored process ancestry.
- Coverage checks support lines, functions, branches, and statements globally or per file; a percentage below its threshold sets process.exitCode to 1 and prints a diagnostic.
- nyc merge validates an input directory and writes combined Istanbul coverage to an output file defaulting to coverage.json; its builder defaults exclude-after-remap to false.
- Source-map handling accepts inline maps or referenced .map files and optionally emits instrumented-code maps; Codecov and Coveralls integration docs invoke external uploaders on nyc report output.