Skip to content

registry-client: send VLT_TOKEN_<registry> to configured registries - #1962

Merged
ruyadorno merged 1 commit into
mainfrom
ruyadorno/env-token
Oct 8, 2026
Merged

ruyadorno merged 1 commit into
mainfrom
ruyadorno/env-token

Conversation

@ruy-bot

@ruy-bot ruy-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

VLT_TOKEN_<registry> env vars were only read for runtime, VLT_REGISTRY or keychain keys, so the documented CI recipe sent no Authorization. Configured registry URLs are now token lookup candidates.

Fixes #1844

Changes

  • registry-client: registryKeys() = normalized keys of registry, registries, scoped-registries, jsr-registries; getTokenByURL() takes them as extra prefix-match candidates. Env still never probed by request URL.
  • RegistryClient and :outdated() auth pass configured keys
  • docs: per-registry VLT_TOKEN_* recipe for multi-registry CI; drop claims it skips scoped-registries; naming rule (trailing / dropped, runs of non-alphanumerics → _)

Tests

  • auth: configured keys, lookalike hosts/paths, precedence (runtime > env > keychain; env-less key doesn't shadow keychain)
  • client: request-level Authorization per configured registry (request + requestStream); none for lookalike path / unconfigured client
  • cli-sdk: :outdated() auth forwards configured keys

Follow-ups

Co-authored-by: Ruy Adorno [email protected]

`VLT_TOKEN_<registry>` env vars were only read for runtime, `VLT_REGISTRY`
or keychain keys, so the documented CI recipe sent no `Authorization`.

## Changes
- `registryKeys()`: normalized keys of `registry`, `registries`,
  `scoped-registries`, `jsr-registries`
- `getTokenByURL()` takes them as extra prefix-match candidates;
  `RegistryClient` and `:outdated()` auth pass them
- docs: per-registry `VLT_TOKEN_*` recipe for multiple registries;
  drop claims it skips `scoped-registries`

## Tests
- auth: configured keys, lookalike hosts/paths, precedence
- client: request-level header per configured registry

Fixes #1844

Co-authored-by: Ruy Adorno <[email protected]>
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Oct 8, 2026 2:27am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 305fd006-abf2-41fc-a5d9-7d8db497d0ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectvltpkg
Branchruyadorno/env-token
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
vlt install: vue & cache-lockfile📈 view plot
🚷 view threshold
497.15 ms
(-32.76%)Baseline: 739.38 ms
924.23 ms
(53.79%)
vlt install: vue & cache-lockfile-node-modules📈 view plot
🚷 view threshold
352.82 ms
(+0.15%)Baseline: 352.29 ms
440.36 ms
(80.12%)
vlt install: vue & clean📈 view plot
🚷 view threshold
14,039.17 ms
(-8.72%)Baseline: 15,379.89 ms
19,224.86 ms
(73.03%)
vlt install: vue & lockfile📈 view plot
🚷 view threshold
4,766.26 ms
(-8.11%)Baseline: 5,186.86 ms
6,483.57 ms
(73.51%)
🐰 View full continuous benchmarking report in Bencher

@ruyadorno
ruyadorno merged commit 60b539b into main Oct 8, 2026
24 checks passed
@ruyadorno
ruyadorno deleted the ruyadorno/env-token branch October 8, 2026 21:30

This branch was successfully deployed

1 active deployment
Preview — bddb7b01 Deployed Oct 8, 2026 by vercel[bot]
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.

[BUG] VLT_TOKEN_<registry> env vars are ignored by vlt install (documented CI auth recipe sends no Authorization header)

1 participant