dev module exports
Analyze module export surfaces for pass-through re-exports
- Command version
0.0.0- Command configuration
dev-tool:dev.module.exports@0.0.0
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--validate, --no-validate | boolean | No | false | Validate module exports and flag pass-through re-exports as violations |
--recurse, --no-recurse | boolean | No | false | Validate every repository this one pins as well, each in its own checkout by its own manifest -- what its own gate reads standing alone -- and the adapter checkout a tracked adapter catalog pins among them. A run from a tree's root otherwise reads the root's manifest, whose modules are the pinned repositories and hold no export surface of their own. Refused without --validate |
It also takes the global arguments.
Output
It answers with a exports.moduleExportsResult.
Types
exports.moduleExportsResult
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
moduleCount | integer | Yes | How many modules the manifest declares | |
parentModulesWithSubmodulesCount | integer | Yes | How many of those modules declare submodules | |
exportSurfaceCheckCount | integer | Yes | How many parent modules were taken up for analysis, one per module that declares submodules; one with no export surface is counted all the same | |
passThroughReexportIssues | list[exports.PassThroughReexportIssue] | No | [] | Each symbol a parent module's export surface imports from another module and exports unchanged |
validated | boolean | No | false | Whether --validate was given, under which any issue fails the run as PARENT_EXPORT_VALIDATION_FAILED |
isValid | boolean | No | false | Whether --validate was given and found no issue; false where it was not given |
exports.PassThroughReexportIssue
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
parentModule | string | Yes | The module whose export surface holds the re-export | |
exportFile | string | Yes | The file name of that export surface, without its directory | |
importedSymbol | string | Yes | The name the symbol is imported under | |
symbolSource | string | Yes | Where the symbol is imported from: the module that owns the imported package, by name or coordinate, or the import path as written where no module is known to own it | |
reexportedSymbol | string | Yes | The name the symbol is exported under, which is the name it was imported under | |
lineNumber | integer | No | 0 | The line of exportFile the import is on, counted from 1 |