Package-level declarations

Types

Link copied to clipboard
data class Crossing(val key: String, val from: String?, val to: String, val was: List<String>, val now: List<String>)

was and now are the rule's conditions on key before and after the move.

Link copied to clipboard

The range syntax a lockfile writes a runtime constraint in.

Link copied to clipboard
data class Finding(val rule: Rule, val group: Group, val basis: Basis, val crossings: List<Crossing>, val missing: List<String>, val evidence: List<String> = emptyList())

missing lists the attributes the rule reads that the capture or a scanner does not give; evidence lists the non-target attributes a matched clause read.

Link copied to clipboard
enum Group : Enum<Group>
Link copied to clipboard
data class PackageBreak(val ecosystem: String, val name: String, val version: String?, val runtime: String, val constraint: String, val from: String, val to: String, val file: String)

A locked package whose recorded runtime excludes the target (to) and allows the version the capture has (from); file is the lockfile that records it.

Link copied to clipboard

A version constraint as lockfiles write it (^7.2 || ~8.0, <8.1, >=6.9.0, >=3.8,<4.0). || and | separate alternatives; commas and spaces join bounds. A pre-release tag in a bound is read only after >=, >, <, <=, != and ==; the stability flags of Composer are dropped.

Link copied to clipboard
data class Target(val name: String, val key: String, val value: String)

One version to move to: name as written, the attribute key it sets, and the value.

Link copied to clipboard
class TargetException(message: String) : Exception
Link copied to clipboard
object Targets
Link copied to clipboard
data class Unchecked(val file: String, val runtime: String, val reason: String, val packages: List<String> = emptyList())

Package constraints that could not be checked: packages names them, or is empty for all.

Link copied to clipboard

Evaluates every rule with the capture as side a and the capture plus the Targets as side b. Probe results and run facts describe today's environment, so side b has none: a rule that reads one is unknown. A pending-scanner rule reads keys no scanner emits, so a key missing from the capture counts as unknown there, not as absent. The groups follow Detect's three-valued logic:

Link copied to clipboard
data class UpgradeReport(val label: String, val targets: List<UpgradeReport.Row>, val rules: Int, val touched: Int, val findings: List<Finding>, val packages: List<PackageBreak> = emptyList(), val unchecked: List<Unchecked> = emptyList())

rules is the rule count; touched counts the rules that read a target key. packages are the locked packages that will break and unchecked the constraints that could not be read.