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
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.
fetch_private
Explicit fetch. With private (lockdocs Pro) it also reads repositories on other git hosts and private repositories, with the user’s own credentials.
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 on github.com, from its own metadata.
repo_of_with
Like repo_of; with any_host a repository on another git host qualifies too.
stale
Was this copy made by an older lockdocs that downloaded less?
tag_candidates
Tag names projects use for a release.