# Extension points — istanbuljs/nyc

> Canonical page: https://codevetter.com/unpack/nyc/extension-points

# Extension points — istanbuljs/nyc

Scanned commit 908620475199fa7b9ea0ea8b21d6d8ad6921e3ae (2026-05-17). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Extensions enter through command modules, schema-derived options, configuration presets, preloaded modules, instrumenter factories, and reporter factories. NYC already centralizes the selection and transform pipeline, so additions should reuse those boundaries. Some extension contracts depend on external packages rather than a repository-local registry. Command dispatch and cache invalidation require coordinated changes across multiple files.
- A command module exports command, describe, builder, and handler; adding a command requires coordinating yargs registration, process-args' recognized command list, and bin/nyc.js' early-return list. — [lib/commands/report.js#L6-L18](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/commands/report.js#L6-L18) [lib/config-util.js#L51-L54](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/config-util.js#L51-L54) [lib/process-args.js#L4-L9](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/process-args.js#L4-L9) [bin/nyc.js#L20-L23](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/bin/nyc.js#L20-L23)
- CLI options are derived from schema.nyc.properties through setupOptions(); coverageVariable and global-scope options are explicitly blocked because they are not connected to the instrumenter. — [lib/commands/helpers.js#L6-L20](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/commands/helpers.js#L6-L20) [lib/commands/helpers.js#L23-L50](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/commands/helpers.js#L23-L50)
- Reusable configurations use extends and can be exported as JSON or JavaScript npm modules; processConfig() delegates configuration loading to @istanbuljs/load-nyc-config. — [README.md#L72-L80](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/README.md#L72-L80) [README.md#L132-L149](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/README.md#L132-L149) [lib/config-util.js#L40-L48](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/config-util.js#L40-L48)
- The instrumenter factory receives ignoreClassMethods, source-map production, compactness, comments, ESM parsing, and parser plugins; built-in adapters expose instrumentSync() and lastFileCoverage(). — [index.js#L135-L147](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L135-L147) [lib/instrumenters/istanbul.js#L19-L40](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/instrumenters/istanbul.js#L19-L40) [lib/instrumenters/noop.js#L6-L18](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/instrumenters/noop.js#L6-L18)
- Additional extensions receive entries in the transforms table and hook registration; addAllFiles() can obtain transpiled source through Module._extensions, falling back to the .js loader when an extension is unknown. — [index.js#L58-L61](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L58-L61) [index.js#L79-L82](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L79-L82) [index.js#L155-L165](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L155-L165) [index.js#L325-L328](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L325-L328)
- --require is the module-setup extension point, with resolution attempted relative to NYC.cwd before fallback; non-spawn-wrap startup places these modules before lib/wrap.js in the preload list. — [index.js#L122-L132](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L122-L132) [bin/nyc.js#L56-L65](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/bin/nyc.js#L56-L65)
- Reporter names are stored as an array and passed to istanbul-reports.create(); README documents built-in reporters and npm package reporters, with per-reporter presentation options passed at execution. — [index.js#L53-L53](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L53-L53) [index.js#L456-L462](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L456-L462) [README.md#L103-L113](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/README.md#L103-L113)
- Instrumentation cache behavior has explicit extension-sensitive hooks: _createTransform() chooses eager or lazy factories, records hashes by filename, and Hash.salt() includes package versions and selected configuration values. — [index.js#L96-L115](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/index.js#L96-L115) [lib/hash.js#L3-L28](https://github.com/istanbuljs/nyc/blob/908620475199fa7b9ea0ea8b21d6d8ad6921e3ae/lib/hash.js#L3-L28)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
