Skip to main content

Crate aube_lockfile

Crate aube_lockfile 

Source

Re-exports§

pub use merge::MergeReport;
pub use merge::merge_branch_lockfiles;

Modules§

bun
Parser for bun’s bun.lock (text JSONC format, bun 1.1+).
dep_path_filename
Bounded, filename-safe encoding of pnpm dep paths.
graph_hash
Content-addressed virtual store path computation.
merge
Branch-lockfile merge.
npm
Reader and writer for npm’s package-lock.json (v2/v3) and npm-shrinkwrap.json.
pnpm
yarn
Parser for yarn.lock, covering both classic (v1) and berry (v2+).

Structs§

CatalogEntry
One entry in a lockfile catalog: the workspace-declared range and the resolved version. Mirrors pnpm v9’s catalogs: block exactly.
DirectDep
A direct dependency of a workspace importer.
GitSource
A git dependency spec. See LocalSource::Git.
HostedGit
A git URL that maps to one of the three “hosted” providers npm / pnpm both special-case (github / gitlab / bitbucket). For these hosts a public read can be served as a flat HTTPS tarball over codeload.github.com (or each host’s equivalent), bypassing git entirely. The lockfile’s stored URL is canonical-identity only — pnpm and npm both re-derive the fetch URL from (host, owner, repo) on every install rather than dialing whatever scheme happens to be in resolved:.
LockedPackage
A single resolved package in the lockfile.
LockfileGraph
Represents a resolved dependency graph from any lockfile format.
LockfileSettings
Per-graph settings that mirror pnpm v9’s settings: header. Extend as more knobs become round-trip-aware.
PeerDepMeta
Metadata about a single declared peer dependency. Matches the shape of peerDependenciesMeta in package.json.
RemoteTarballSource
A remote tarball dependency spec. See LocalSource::RemoteTarball.
RuntimePin
A pinned runtime (Node.js) recorded in the lockfile. Mirrors pnpm 10.14+’s devEngines.runtime encoding: the manifest’s requested range plus the exact resolved version, and one downloadable artifact per supported platform so any machine reading the lockfile can fetch the same release without re-resolving.
RuntimeTarget
One (os, cpu, libc) triple a runtime variant targets. Values use Node’s process.platform / process.arch vocabulary (win32, darwin, linux; x64, arm64), with libc: Some("musl") only on musl builds.
RuntimeVariant
One platform-specific artifact inside a runtime pin’s variations resolution. Field set mirrors pnpm’s BinaryResolution + PlatformAssetResolution pair.

Enums§

DepType
DriftStatus
Result of comparing a lockfile against a manifest.
Error
HostedGitHost
LocalSource
Non-registry source for a locked package.
LockfileKind
Which source lockfile format was parsed.

Functions§

active_lockfile_has_conflict_markers
Return true when the active lockfile contains Git conflict markers.
aube_lock_filename
Resolve the canonical lockfile filename for project_dir (aube’s own).
build_canonical_map
Collapse peer-context variants from graph into a single map keyed by "name@version", pointing at the first-seen package. Several writers (npm, yarn, …) share this shape: one canonical entry per (name, version) pair regardless of how many peer suffixes the full graph emits.
dep_type_label
Render a DepType as the matching package.json field name (dependencies / devDependencies / optionalDependencies). Single source of truth so drift diagnostics, install summaries, the outdated / why / deprecations renderers, and the outdated --json shape all agree on the spelling.
detect_existing_lockfile_kind
Return the LockfileKind of the lockfile already on disk in project_dir, if any. Follows the same precedence as parse_lockfile_with_kind (aube > pnpm > bun > yarn > npm-shrinkwrap > npm). Used by install to preserve a project’s existing lockfile format when rewriting after a re-resolve — a user with only pnpm-lock.yaml, package-lock.json, or another supported lockfile gets that file written back, not a surprise aube-lock.yaml alongside it.
git_commits_match
parse_for_import
Variant of parse_lockfile_with_kind used by aube import.
parse_git_spec
Parse a git dependency specifier into (clone_url, committish).
parse_hosted_git
Parse a clone URL — in any form parse_git_spec accepts as input or produces as output — into its (host, owner, repo) components, when the host is one of the three providers npm / pnpm route through HTTPS tarballs. Returns None for any other host (including self-hosted GitLab / Gitea / Bitbucket Data Center): those still need a real git clone because no codeload-style HTTP archive is available.
parse_json
Parse a JSON lockfile document, attaching a miette source span on failure so the fancy handler can point at the offending byte.
parse_lockfile
Detect and parse the lockfile in the given project directory.
parse_lockfile_with_kind
Like parse_lockfile but also returns which format was read.
pnpm_lock_filename
Resolve the pnpm lockfile filename for project_dir.
read_lockfile
Read a lockfile from disk, mapping I/O errors to Error::Io.
resolve_dep_edge
Resolve a dependency edge (name, tail) to the graph key of the child package node, honoring every reader’s storage convention. Returns the first candidate that satisfies contains (the caller’s “is this a real package key?” predicate), or None when the edge points outside the graph (a pruned optional, an unresolved peer, a link: target, …).
shared_local_dep_path
Resolve a transitive dependency’s recorded spec value to the same dep_path key the lockfile parser assigns the target package, for the two content-pinned source kinds that get shared globally (git and remote tarball).
write_lockfile
Write a lockfile to the given project directory using aube’s default filename (aube-lock.yaml, or aube-lock.<branch>.yaml when branch lockfiles are enabled).
write_lockfile_as
Write graph in the requested lockfile format into project_dir.
write_lockfile_preserving_existing
Write a lockfile using the existing project lockfile kind, or aube-lock.yaml when the project does not have one yet.

Type Aliases§

PlatformList
Most npm packages declare zero or one entry in os, cpu, libc. Two inline SmallVec slots cover empty on construction (zero heap alloc) and one-entry push (still zero heap) for ~99% of lockfile entries.