Skip to main content

Module source_discovery

Module source_discovery 

Source
Expand description

Deterministic first-party JavaScript/TypeScript source discovery.

Discovery defines the coverage denominator. The walker never follows links and turns unclassified first-party files into explicit blockers.

Structs§

DiscoveredSourceScope
ExplicitSourceRoots
Explicit source roots resolved against a project root. Each is an existing directory or a single file, so a flat layout can name the modules it keeps at the root one by one. A root that does not exist names nothing to measure and is skipped; one that is neither a file nor a directory is refused, since a symlink root would reach outside what the project owns.
SourceLimitation
SourceScope
SourceScopeEntry

Enums§

SourceDiscoveryError
SourceScopeMode
SourceScopeStatus

Constants§

BUILT_ASSET_REASON
Scope reason for a bundler’s output found in the tree (see built_asset).
OUTSIDE_EXPLICIT_ROOTS
Why a file a frontend would otherwise measure was left out.
SOURCE_ROOTS_VARIABLE
The variable that names first-party source roots, for every frontend.

Functions§

configured_source_roots
The first-party source roots named in SUPERCOV_SOURCE_ROOTS: comma-separated, trimmed, empties dropped. None when the variable is unset or names nothing, which leaves discovery automatic.
discover_source_scope
fold_roots_into_configuration
Fold the roots a run was measured under into its execution configuration, the part of a run’s identity that records how it was asked to run. Two runs over different roots measure different denominators and are not the same run; nothing is appended when no roots were named, so every existing fingerprint stays as it was.
target_is_build_output
Whether a directory called target is a build tool’s output rather than a project’s own code.