Skip to main content

Module upstream

Module upstream 

Source
Expand description

Upstream docs: many packages ship no documentation (Next.js, Django, FastAPI…). Their repositories do, under the exact version’s git tag. This module finds the repository from the package’s own metadata, finds the tag for the pinned version, and downloads only the docs folders (Markdown, MDX, reStructuredText) from GitHub into the cache, once. First-use queries fetch public docs at an immutable release commit. Explicit fetch also supports major-version docs sites and optional GitHub credentials.

Structs§

Manifest
Repo

Constants§

FORMAT
Bump when what fetch downloads changes, so lockdocs fetch refreshes older copies (a stale copy is still used until then).

Functions§

cached
A previous fetch (with or without files). Never touches the network.
dir
downloaded_bytes
Compressed archive bytes downloaded by this process so far.
fetch
Download the docs folders of dep’s repository at the pinned version’s tag.
fetch_automatic
Anonymous, bounded first-use enrichment; never substitutes a major docs site.
needs_refresh
A prior explicit enrichment is also usable by automatic and offline queries.
parse_github
Parse a GitHub URL or shorthand into owner/name.
repo_of
The package’s source repository, from its own metadata.
stale
Was this copy made by an older lockdocs that downloaded less?
tag_candidates
Tag names projects use for a release.