Skip to main content

Crate aube_resolver

Crate aube_resolver 

Source

Re-exports§

pub use platform::SupportedArchitectures;
pub use platform::is_supported;

Modules§

override_rule
Parsing and matching for pnpm/yarn override selector keys.
platform
Platform filtering for os / cpu / libc package metadata.

Structs§

AgeGateDetails
AgeGatedUpdate
CatalogDetails
DependencyPolicy
DirectDepInfo
Subset of packument facts the install summary printer wants to render next to a direct-dependency line. Returned only for direct deps where at least one signal is set — the printer skips the badge column when Resolver::direct_dep_info’s map has no entry.
ExoticSubdepDetails
MinimumReleaseAge
Supply-chain mitigation: forbid versions younger than min_age unless the package (or specific version) is exempted by exclude. Mirrors pnpm’s minimumReleaseAge / minimumReleaseAgeExclude / minimumReleaseAgeStrict triplet. Constructed by the install command, threaded into [Resolver::with_minimum_release_age].
MissingTrustTimeDetails
NoMatchDetails
Context attached to a NoMatch error so the miette help() output can show importer path, parent chain, and what versions the packument actually contains. Boxed into the enum variant to keep Error’s size under clippy::result_large_err.
PackageExtension
PeerContextOptions
Walk the resolved graph top-down from each importer and compute a peer-dependency context for every package, producing a new graph whose dep_paths carry pnpm-style (peer@ver) suffixes.
PrimerPruneStats
PriorTrustEvidence
The strongest trust evidence carried by a version published before the selected release.
ResolvedPackage
A resolved package emitted during resolution, allowing the caller to start fetching tarballs before resolution is fully complete.
Resolver
BFS dependency resolver.
TrustDowngradeDetails
TrustExcludeRules
UnmetPeer
A peer dependency whose declared range doesn’t match the version the tree actually ends up providing. Emitted as a warning by aube install.

Enums§

Error
PickResult
Outcome of [pick_version]. Distinguishes “nothing in the range at all” from “the cutoff filtered every otherwise-satisfying version” so the caller can surface a meaningful strict-mode error instead of pretending the range itself was wrong.
ResolutionMode
Which version-picking strategy the resolver uses for a workspace. Mirrors pnpm’s resolution-mode setting.
TrustCheckError
TrustEvidence
Trust-evidence ranks. Higher is stronger. Variants intentionally do not derive Ord — the variant declaration order does not match the rank order, so callers must go through Self::rank.
TrustExcludeParseError
TrustPolicy
Default is NoDowngrade to match the user-facing default in crates/aube-settings/settings.toml. The install command overrides this from the resolved settings anyway, but library consumers constructing a Resolver via [Resolver::new] inherit the documented default behavior without extra plumbing.

Constants§

YARN_EXEC_WRAPPER

Traits§

ReadPackageHook
Hook invoked once per resolved package, right after its version has been picked from the packument and before its dependency set is enqueued. Implementations may mutate dependencies, optionalDependencies, peerDependencies, and peerDependenciesMeta; every other field is ignored on the way back, matching how pnpm’s readPackage hook is used in the wild.

Functions§

apply_peer_contexts
Compute peer-context suffixes over an already-resolved graph.
check_no_downgrade
Run the trust-downgrade check. Returns Ok(()) when the picked version is acceptable (excluded, missing-evidence-everywhere, older than ignore_after_minutes, or carrying evidence at least as strong as the strongest prior version’s). Errors otherwise.
detect_unmet_peers
Scan the resolved graph and return every declared required peer whose resolved version doesn’t satisfy its declared range. Optional peers (peerDependenciesMeta.optional = true) are skipped — pnpm treats those as “warn suppressed” with auto-install-peers=true. The result is purely informational; aube never fails an install on unmet peers, matching pnpm.
evidence_for
Strongest trust evidence carried by a single version’s metadata. approver outranks _npmUser.trustedPublisher, which outranks dist.attestations.provenance.
hoist_auto_installed_peers
Promote direct dependencies’ unmet peers to importer direct deps.
is_deprecation_allowed
Honor allowedDeprecatedVersions: does the pinned range (keyed by package name) mute the deprecation warning for this specific version? Used by the resolver’s fresh-resolve path and by aube deprecations.
pick_version_for_add
Single-package version pick for aube add’s manifest step, honoring minimumReleaseAge with the same dist-tag preference, exemption, and strict/lenient fallback semantics [pick_version] applies inside full resolution. Without it, add writes the freshly published version into the manifest as a pinned spec, which the resolver’s lenient fallback then honors — bypassing the very gate minimumReleaseAge exists to provide.
popular_package_names
Ranked public npm package names used as typo/squatting reference data.
prune_primer_cache
resolve_exec_script_path
Resolve an exec: generator path and reject scripts outside the project root.
strongest_prior_evidence
Find the strongest trust evidence on a release published before picked_version.

Type Aliases§

PackageVersionPolicy
A parsed package-version policy: a set of <name>[@<semver-range>…] rules with * name globs. pnpm backs both trustPolicyExclude and minimumReleaseAgeExclude with the same createPackageVersionPolicy engine, so we do too — TrustExcludeRules is the neutral PackageVersionPolicy type seeded with the trust defaults, while minimumReleaseAgeExclude builds an empty one from user rules only.