mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-14 17:52:44 -04:00
Model every addressable registry origin in pnpr as a registry mount at /~<mount>/: a pnpr-hosted organization registry, a single-origin upstream, and a router mapping package-name patterns to one concrete source. Provenance is declared, never inferred — no configuration can express a cross-origin fall-through. Full replacement of the legacy Verdaccio-shaped model. New `mount` module: a decidable PackagePattern language with a covers() superset relation; first-match authoritative resolution; and Mounts::validate, which rejects shadowed/unreachable routes (including a non-last catch-all), duplicate patterns, and unknown/self/non-concrete sources at config load. mounts:/defaultTarget: is the only routing surface; uplinks:, packages: proxy: fallback chains, hosted-first serving, and multi-uplink tarball fallback are removed. Path-less and write requests route through the mount graph; a router no-route is a 404 with no fall-through and a down source errors rather than 404s. Served tarball URLs stay canonical for the client's base. Per-package ACLs apply on every mount-served read. Each hosted-org mount has its own storage namespace (local dir and S3/R2) so two orgs hosting the same name@version cannot collide; the org is threaded through staging, commit, and the publish journal so crash recovery lands in the right org. Public upstream mounts use a stable, secret-free cache namespace. The bundled config.yaml and the integrated-benchmark mock config are converted to the mount model; registry-mock keeps working with no task or seed changes. Implements the pnpr side of RFC pnpm/rfcs#13 only; lockfile registry-identity changes for the TypeScript CLI and pacquet are out of scope.