Skip to content

feat(deps): registry resolver — PB1–PB5 + docs#1361

Closed
nadav-y wants to merge 1 commit into
microsoft:mainfrom
nadav-y:claude/beautiful-moore-37041b
Closed

feat(deps): registry resolver — PB1–PB5 + docs#1361
nadav-y wants to merge 1 commit into
microsoft:mainfrom
nadav-y:claude/beautiful-moore-37041b

Conversation

@nadav-y
Copy link
Copy Markdown

@nadav-y nadav-y commented May 17, 2026

-- will reopen under the right branch

Copilot AI review requested due to automatic review settings May 17, 2026 11:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@nadav-y nadav-y force-pushed the claude/beautiful-moore-37041b branch from 24e4d4b to 68310f3 Compare May 17, 2026 11:30
Implements PB1–PB5 from the post-commit design review of the registry
resolver prototype. No behaviour change for existing git-based projects.

### What changed

**PB1 — Object form only in v1**
- Remove `owner/repo@<name>#<ref>` named-scope shorthand — `@` collides
  with SSH `git@host` and marketplace shorthand.
- Keep `registries.default:` routing: string shorthand with a *semver*
  ref auto-routes to the default registry. Non-semver refs (branches,
  SHAs) always stay on the Git resolver.
- `registry:` key is optional in object form; when omitted, the entry
  routes through `registries.default`.

**PB2 — Flag rename**
- Experimental flag renamed `package_registry` → `registries`.
- Enable: `apm experimental enable registries`.

**PB3 — Registry config in `~/.apm/config.json`**
- `apm config set registry.<name>.url <url>` / `registry.<name>.token <token>`
  write to `config.json`.
- Token precedence: env var (`APM_REGISTRY_TOKEN_<NAME>`) > config.json.
- Hard-fail if `token:` appears in any repo-tracked YAML.

**PB4 — Registries as a governance primitive**
- New `registry_source:` block in `apm-policy.yml`:
  - `require: [<names>]` — listed registries must be reachable; fail-
    closed if a named registry has no URL in the project's `registries:`
    block.
  - `allow_non_registry: false` — blocks any dep not routed through a
    configured registry, applied transitively.

**PB5 — SPI / Artifactory rename deferred**
- `RegistryClient` left as-is; SPI abstraction is a follow-up PR.

### Documentation
- New `guides/private-registries.md` end-to-end guide.
- Updated `guides/registries.md` with correct semver-only routing rules,
  user-level config, and policy governance sections.
- Updated `reference/manifest-schema.md`, `reference/policy-schema.md`,
  `reference/cli/config.md`, `reference/cli/install.md`,
  `consumer/manage-dependencies.md`, `enterprise/security.md`.
- Flag rename propagated across all docs that referenced `package-registry`.
- Fixed docs bug: three pages incorrectly listed non-semver refs as valid
  registry selectors; corrected to semver-only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nadav-y nadav-y force-pushed the claude/beautiful-moore-37041b branch from 68310f3 to 5f785b7 Compare May 17, 2026 11:32
@nadav-y nadav-y marked this pull request as draft May 17, 2026 13:59
@nadav-y nadav-y closed this May 17, 2026
@nadav-y nadav-y deleted the claude/beautiful-moore-37041b branch May 17, 2026 15:44
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.

2 participants