Repository navigation
registry-client: send VLT_TOKEN_<registry> to configured registries - #1962
Merged
Merged
Conversation
`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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
| Project | vltpkg |
| Branch | ruyadorno/env-token |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark 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%) |
ruyadorno
approved these changes
Oct 8, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VLT_TOKEN_<registry>env vars were only read for runtime,VLT_REGISTRYor keychain keys, so the documented CI recipe sent noAuthorization. Configured registry URLs are now token lookup candidates.Fixes #1844
Changes
registryKeys()= normalized keys ofregistry,registries,scoped-registries,jsr-registries;getTokenByURL()takes them as extra prefix-match candidates. Env still never probed by request URL.RegistryClientand:outdated()auth pass configured keysVLT_TOKEN_*recipe for multi-registry CI; drop claims it skipsscoped-registries; naming rule (trailing/dropped, runs of non-alphanumerics →_)Tests
Authorizationper configured registry (request+requestStream); none for lookalike path / unconfigured client:outdated()auth forwards configured keysFollow-ups
VLT_TOKENis ignored unlessVLT_REGISTRYis set (does not apply to the default registry alias) #1845 (plainVLT_TOKENw/oVLT_REGISTRY) not fixed here.VLT_TOKEN_<origin>not applied to path-scoped registries (would leak to sibling paths on shared hosts). Docs say path is part of the name.publishConfig.registrynot in config → itsVLT_TOKEN_*not sent onvlt publish.Co-authored-by: Ruy Adorno [email protected]