Skip to content

docs: update pnpr docs for registries, ordered sources, and per-registry packages maps#834

Merged
zkochan merged 1 commit into
mainfrom
update-pnpr-dox2
Jul 3, 2026
Merged

docs: update pnpr docs for registries, ordered sources, and per-registry packages maps#834
zkochan merged 1 commit into
mainfrom
update-pnpr-dox2

Conversation

@zkochan

@zkochan zkochan commented Jul 3, 2026

Copy link
Copy Markdown
Member

Updates the pnpr docs for the redesigned configuration model shipped in pnpm/pnpm#12773, pnpm/pnpm#12778, and pnpm/pnpm#12787. pnpr is pre-1.0, so the docs describe the new design outright — no mention of the old keys and no migration notes.

  • configuration.mdmounts:/defaultTarget:registries:/defaultRegistry: throughout. New The packages map section: keys are the registry's declared namespace (same four-shape pattern language), values are per-package access/publish/unpublish rules, the most specific matching key wins and key order carries no meaning. Routers are documented as ordered sources: lists (first source whose packages claim the name wins; a map-less catch-all must be last) with the updated validation matrix. Hosted registries document the tiered denial shapes (404 mask vs loud 401/403); upstreams document the two map rules (per-package access allowed on public: true, write rules rejected). The top-level packages: ACL section and the registry: toggle are gone, replaced by The registry surface and resolver: the npm-registry surface is served iff at least one registry is declared, --disable-registry overrides per process, and a nothing-to-serve config is a startup error.
  • endpoints.md — registry-surface gating described as derived from registries:; the user/token endpoints are documented as always mounted on every tier (so pnpm login works against a resolver-only server); routing bullets updated for sources: dispatch and namespace enforcement on every path.
  • quick-start.md, storage.md — example configs rewritten to the new shape.
  • cli.md--disable-registry reworded.
  • install-acceleration.md — terminology/anchors updated; notes that login works even against a resolver-only server.
  • introduction.md — overview sentence updated.

Verified: the site builds cleanly and every new cross-reference anchor exists in the generated HTML; the '@corp/*': {} example shape matches the pnpr config test suite.

Summary by CodeRabbit

  • Documentation
    • Updated setup, configuration, and endpoint docs to use the new registry-based terminology and examples.
    • Clarified which endpoints are always available, which depend on registry/resolver settings, and how login/token access behaves.
    • Expanded guidance on package routing, private registries, and publish/read rules, including clearer behavior for undeclared packages and namespace handling.

…maps

Documents the redesigned model from pnpm/pnpm#12773, pnpm/pnpm#12778,
and pnpm/pnpm#12787:

- mounts:/defaultTarget: -> registries:/defaultRegistry:
- routers collapse to ordered sources: lists; a package resolves to the
  first listed source whose declared packages claim it
- the namespace and ACL merge into per-registry packages: maps, with
  most-specific-key selection and namespace enforcement on every path
- the registry: config toggle is gone; the npm-registry surface is
  served iff at least one registry is declared, minus --disable-registry
- the account (login/token) endpoints are always served on every tier
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pnpm-io Error Error Jul 3, 2026 10:44pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 30eba1ad-436b-4bfd-af86-f4454173f61d

📥 Commits

Reviewing files that changed from the base of the PR and between 2113b03 and 7ce2619.

📒 Files selected for processing (7)
  • pnpr-docs/cli.md
  • pnpr-docs/configuration.md
  • pnpr-docs/endpoints.md
  • pnpr-docs/install-acceleration.md
  • pnpr-docs/introduction.md
  • pnpr-docs/quick-start.md
  • pnpr-docs/storage.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Analyze (javascript-typescript)
⚠️ CI failures not shown inline (1)

Commit Status: Vercel: Vercel

Conclusion: failure

Deployment has failed — run this Vercel CLI command: npx vercel inspect dpl_BqvV5u5Pz1T3YkvfZQiy5MWHWBpN --logs
🧰 Additional context used
🪛 LanguageTool
pnpr-docs/endpoints.md

[grammar] ~149-~149: Ensure spelling is correct
Context: ...pnpm login` therefore works against any pnpr URL, including a resolver-only server t...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

pnpr-docs/quick-start.md

[style] ~51-~51: Consider an alternative for the overused word “exactly”.
Context: ...04, never a request to npmjs — which is exactly what closes dependency confusion. ## S...

(EXACTLY_PRECISELY)

pnpr-docs/configuration.md

[style] ~250-~250: This sentence construction might be considered wordy, consider shortening it.
Context: ...covered by earlier sources (including a catch-all that isn't last); - two sources claiming an identical p...

(A_VERY_ORDERED_SENTENCE)


[style] ~254-~254: You can shorten this phrase to improve clarity and avoid wordiness.
Context: ... either order); - a duplicate source; - a source that is undefined, the router itself, or another router (...

(NNS_THAT_ARE_JJ)

🔇 Additional comments (8)
pnpr-docs/configuration.md (1)

17-24: LGTM!

Also applies to: 33-35, 64-169, 182-225, 226-257, 258-269, 311-344

pnpr-docs/endpoints.md (1)

6-62: LGTM!

Also applies to: 85-85, 103-105, 127-131, 147-150

pnpr-docs/storage.md (2)

64-69: LGTM!


71-80: 🎯 Functional Correctness

Remove the namespace declaration suggestion for npmjs. npmjs is intentionally the catch-all upstream here, so omitting packages: is correct.

			> Likely an incorrect or invalid review comment.
pnpr-docs/cli.md (1)

22-22: LGTM!

pnpr-docs/introduction.md (1)

13-17: LGTM!

pnpr-docs/quick-start.md (1)

8-12: LGTM!

Also applies to: 23-52, 75-77, 88-96

pnpr-docs/install-acceleration.md (1)

69-72: LGTM!

Also applies to: 82-84, 91-103, 120-126


📝 Walkthrough

Walkthrough

This PR is a documentation-only rewrite across pnpr-docs, replacing the "mounts/defaultTarget/routes" configuration terminology with a "registries/defaultRegistry" model. It updates configuration.md, endpoints.md, cli.md, install-acceleration.md, introduction.md, quick-start.md, and storage.md examples and prose accordingly.

Changes

pnpr-docs terminology migration

Layer / File(s) Summary
Core configuration model rewrite
pnpr-docs/configuration.md
Replaces mount-based routing docs with registries/defaultRegistry model: hosted/upstream/router kinds, packages map pattern language, groups, secret/HMAC semantics, and registry/resolver surface behavior.
CLI flag description update
pnpr-docs/cli.md
Narrows --disable-registry description to match the new registry surface semantics, removing the registry.enabled override claim.
Endpoint availability and routing docs
pnpr-docs/endpoints.md
Rewrites always-on endpoints, registry/resolver surfaces, allowlist wording, and read/write/user-token endpoint routing to use registries language.
Install acceleration doc updates
pnpr-docs/install-acceleration.md
Updates allowlist, private registry configuration, tarball URL format, and login/auth wording from mounts to registries.
Introduction and quick-start rewrites
pnpr-docs/introduction.md, pnpr-docs/quick-start.md
Updates routing explanation and example pnpr.yaml to use registries/defaultRegistry with hosted local and upstream npmjs registries.
Storage example update
pnpr-docs/storage.md
Updates Cloudflare R2 example to use registries.local with a packages map and router sources/defaultRegistry instead of mounts/routes/defaultTarget.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • pnpm/pnpm.io#829: Added the initial pnpr docs pages for the same files (cli.md, configuration.md, etc.) that this PR rewrites.

Poem

Mounts once stood where registries now grow,
A rabbit hops through docs, row by row,
"sources" and "defaultRegistry" take their place,
No fall-through here, just a tidy namespace,
🐇 Thump-thump — the config docs now glow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main documentation changes around registries, ordered sources, and packages maps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-pnpr-dox2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Docs: align pnpr docs with registries, ordered router sources, and packages maps

📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Document the new registries/defaultRegistry configuration model and routing rules.
• Explain per-registry packages namespaces with specificity-based rule selection and ACL
 semantics.
• Clarify HTTP surface gating (--disable-registry) and always-on login/token endpoints across
 tiers.
Diagram

graph TD
  A["pnpr.yaml config"] --> B["pnpr server"] --> C["Registry surface"] --> D["/~name/ registry"]
  B --> E["Resolver surface"]
  B --> F["Login/token endpoints"]
  D --> G["Router registry"] --> H["Ordered sources"]
Loading
High-Level Assessment

The PR’s approach—rewriting the docs to describe the redesigned model directly—is appropriate for a pre-1.0 project and keeps the documentation internally consistent (anchors/examples/rules all match the new semantics). Considered adding migration notes for old keys, but that would add noise and split the narrative without benefiting new users.

Files changed (7) +271 / -220

Documentation (7) +271 / -220
cli.mdClarify --disable-registry semantics under the new surface-gating rules +1/-1

Clarify --disable-registry semantics under the new surface-gating rules

• Rewords '--disable-registry' to reflect that the npm-registry surface is served whenever at least one registry is declared, and that health + login/token endpoints remain available even when the surface is disabled.

pnpr-docs/cli.md

configuration.mdRewrite configuration docs for registries/defaultRegistry, packages maps, and ordered sources +168/-137

Rewrite configuration docs for registries/defaultRegistry, packages maps, and ordered sources

• Renames 'mounts'/'defaultTarget' to 'registries'/'defaultRegistry' and updates all examples accordingly. Adds a dedicated 'packages' map section describing the restricted pattern language, specificity-based selection (order-independent), and per-package access/publish/unpublish defaults. Updates router semantics to ordered 'sources', documents namespace enforcement and denial shapes, and replaces the 'registry.enabled' toggle with derived registry-surface gating plus always-on account endpoints and startup validation.

pnpr-docs/configuration.md

endpoints.mdUpdate HTTP endpoint docs for registries-derived gating and always-on account routes +50/-36

Update HTTP endpoint docs for registries-derived gating and always-on account routes

• Describes registry-surface availability as derived from 'registries' (with '--disable-registry' override) rather than 'registry.enabled'. Updates routing description to ordered 'sources' dispatch and adds explicit namespace enforcement behavior on every path. Documents user/token endpoints as always mounted so 'pnpm login' works even for resolver-only deployments.

pnpr-docs/endpoints.md

install-acceleration.mdAlign install-acceleration docs with registries terminology and always-on login endpoints +13/-11

Align install-acceleration docs with registries terminology and always-on login endpoints

• Replaces legacy 'mount' terminology/anchors with 'registry' equivalents and updates explanations of private package tarball URLs and caching. Adds/clarifies that login/token endpoints remain available even when only the resolver surface is exposed.

pnpr-docs/install-acceleration.md

introduction.mdRefresh overview to match registries + namespace-claim routing model +5/-4

Refresh overview to match registries + namespace-claim routing model

• Updates the introductory explanation to describe declared registries that claim package names and router-based resolution without cross-origin fall-through.

pnpr-docs/introduction.md

quick-start.mdRewrite quick-start example config to use registries, packages maps, and sources +28/-24

Rewrite quick-start example config to use registries, packages maps, and sources

• Updates the narrative and sample 'pnpr.yaml' to the new 'registries'/'defaultRegistry' keys, adds a 'packages' namespace for the hosted registry, and replaces router 'routes' with ordered 'sources' (including the catch-all guidance). Adjusts publish/login explanations to reflect namespace claims and upstream write rejection.

pnpr-docs/quick-start.md

storage.mdUpdate storage backend example configs to the new registry configuration shape +6/-7

Update storage backend example configs to the new registry configuration shape

• Rewrites the S3-backed configuration example to use 'registries', per-registry 'packages' namespace, ordered router 'sources', and 'defaultRegistry' naming.

pnpr-docs/storage.md

@zkochan zkochan merged commit 617b888 into main Jul 3, 2026
5 of 7 checks passed
@zkochan zkochan deleted the update-pnpr-dox2 branch July 3, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant