Skip to main content

Module dependency

Module dependency 

Source
Expand description

Unified dependency domain taxonomy and package classification.

Provides a single DependencyDomain enum that classifies dependencies by their functional role, plus classify_domain — the single source of truth for mapping package names to domains. Both the scanner (manifest analysis) and the detectors (usage analysis) call this function.

Structs§

PathAlias
A single TypeScript compilerOptions.paths mapping, with each target already joined to baseUrl and normalised to forward slashes.

Enums§

DependencyDomain
Functional domain a dependency belongs to.

Functions§

classify_domain
Classify a package name into its functional domain for the given language.
is_python_stdlib_module
Check whether module is a Python standard-library top-level package.
matches_keyword_at_boundary
True when any of keywords appears in name at a word boundary.
resolve_path_alias
Resolve an import module against a set of path aliases, returning the substituted candidate target paths of the most specific matching alias (longest literal prefix wins, matching tsc‘s resolution order). The result is independent of the aliases’ declaration order.
top_level_module
Extract the top-level package/module name from an import path or callee, regardless of the source language’s separator.