Skip to main content

Module fetch

Module fetch 

Source
Expand description

Opt-in network fetch of one exact package version from its registry (npm tarball, PyPI wheel or sdist, crates.io .crate, Go module proxy zip), unpacked into the disk cache. Nothing here runs unless fetching is enabled.

Functions§

cached_for
A previously fetched copy, if any (never touches the network). root lets the lookup see the project’s configured source, so a cached public copy is never returned for a package whose lockfile pins a private registry.
fetch
fetch_for
fetch, reading the project’s private-source configuration when root is given. Without private (lockdocs Pro), a package that needs a private source fails with private::PrivateRequired and nothing is sent anywhere.
fetched_dir
Directory for a fetched package, for the public default source. Callers that resolved a private source use fetched_dir_for.
fetched_dir_for
Directory for a fetched dep read from root’s resolved source.
is_git
Download and unpack dep if it is not cached yet.
require_registry_origin
Shared guard: a git checkout is not interchangeable with a registry release tag.