dev selection

Report what a run of test, lint or type check would cover in each repository, without running it

Command version
0.0.0
Command configuration
dev-tool:dev.selection@0.0.0

Arguments

ArgumentTypeRequiredDefaultDescription
--ofstring one of test, lint, type checkYesThe command whose run is reported: test, lint or type check, the three that select by change. What is reported is what that command would cover given the same --select affected, --since, --changed-coordinates, --tier, --all-tiers and --recurse, worked out by the code that command runs
--selectstring one of all, affectedNo"all"Which run is reported, as --select names it on the command: all, the default, reports every repository as covered whole, and affected reports the run selected by change
--changed-coordinateslist[string]No[]Packages changed outside this repository, as namespace:name coordinates, read as --changed-coordinates is on the command named. Refused without --select affectedRepeatable
--sincestringNoA ref changes are read against instead of HEAD, as --since is on the command named: resolved in this repository alone under --recurse, each pinned repository reading its changes against the commit this one pinned it at there. Refused without --select affected
--tierlist[string]No[]The tiers of tests the run collects, as test --tier names them. Refused unless the command named is testRepeatable
--all-tiers, --no-all-tiersbooleanNofalseReport the run that collects every tier, as test --all-tiers does. Refused unless the command named is test
--module-depthintegerNo0Report each repository's selection module by module as well, this deep: at 1 every module this repository's manifest declares, a repository it pins being one of them and reported whole; at 2 the modules each of those declares, which for a pinned repository are its own; and so on down. Each module is reported with the paths that cover its part of the run and no other module's, and what the repository holds outside every module under the repository's own name, so a run of each entry's paths covers together what the repository's run would have. At 0, the default, no repository is split
--recurse, --no-recursebooleanNofalseReport every repository this one pins beside it, each asked for its own selection in its own checkout and told what the sweep would tell it: the packages changed across the tree, and the commit its own changes are read against. Without it the report holds this repository alone

It also takes the global arguments.

Output

It answers with a selection.selectionReport.

Types

selection.selectionReport

FieldTypeRequiredDefaultDescription
commandstringYesThe command whose run is reported, as it is invoked.
selectenum one of all, affectedNo"all"Which run is reported -- all, or affected for the one selected by change.
sincestringNoThe ref changes were read against in the repository the report was asked of. Absent for a run reading uncommitted work, and for one that does not select by change.
changedCoordinateslist[string]No[]The packages changed across the tree, as each repository was told them: what the report was given, and what the tree adds under --recurse.
repositorieslist[selection.repositorySelection]No[]The repository the report was asked of, then every repository it pins that has a command of its own to run, in the order the manifest declares them.

selection.repositorySelection

FieldTypeRequiredDefaultDescription
namestringYesThe repository, as its own manifest names its project.
pathstringYesWhere the repository is checked out, relative to the repository the report was asked of and written with forward slashes; . for that repository itself.
scopeenum one of whole, selected, nothingYesWhat the run covers there. whole is the unnarrowed run: the command did not select by change, or a change the dependency graph cannot place owes everything. selected is a run narrowed to paths. nothing is a run that starts nothing: no change reaches the repository, or no test in it is in a tier the run collects.
pathslist[string]No[]The paths a selected run is narrowed to, relative to the repository's own root. Empty for the other two scopes.
moduleslist[selection.moduleSelection]No[]The same selection module by module, where the report was asked for a depth that reaches into this repository: each module the run reaches there, with the paths that cover its part. Running the command once per entry, given --paths and that entry's paths, covers what one run of the repository would have. Empty where the repository was not split, or the run covers nothing in it.
argumentslist[string]No[]What the command is given, after its name and --repo-root, to cover exactly this in that repository's checkout: the flags a recursive run hands it. A caller running each repository as a job of its own passes these as they stand, and gets the result the single recursive run would have reported for that repository.

selection.moduleSelection

FieldTypeRequiredDefaultDescription
namestringYesThe module, as its coordinate -- namespace:name -- or the repository's own project name for what it holds outside every module.
pathslist[string]No[]The paths covering this module's part of the run and no other reported module's, relative to the repository's own root.