Repository navigation
fix(registry-client): getTokenByURL never probes env by request URL - #1869
Conversation
- drop full-URL `getToken()` fallback: only hit on an exact bare-origin URL, through the lossy `VLT_TOKEN_*` name, so lookalike hosts matched (`https://npm-corp.com/` got `VLT_TOKEN_https_npm_corp_com`) - skip matched keys w/o a token: token-less `VLT_REGISTRY` shadowed a shorter keychain key Env-only `VLT_TOKEN_<key>` (no keychain / `VLT_REGISTRY` match) still unresolved, needs the configured registry list. Refs #1844 Co-Authored-By: Ruy Adorno <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesRegistry token lookup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains in the reviewed change. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| Project | vltpkg |
| Branch | fix/token-by-url-known-keys |
| 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 | 1,565.39 ms(+2.62%)Baseline: 1,525.37 ms | 1,677.90 ms (93.29%) |
| vlt install: vue & cache-lockfile-node-modules | 📈 view plot 🚷 view threshold | 379.62 ms(+9.16%)Baseline: 347.76 ms | 382.53 ms (99.24%) |
| vlt install: vue & clean | 📈 view plot 🚷 view threshold | 10,059.86 ms(-2.17%)Baseline: 10,283.28 ms | 11,311.61 ms (88.93%) |
| vlt install: vue & lockfile | 📈 view plot 🚷 view threshold | 3,923.74 ms(+1.65%)Baseline: 3,860.09 ms | 4,246.10 ms (92.41%) |
Refs #1844
getToken()fallback. Only hit on exact bare-origin URL, via the lossyVLT_TOKEN_*name (.-/→_), so lookalike hosts matched:https://npm-corp.com/gotVLT_TOKEN_https_npm_corp_comVLT_REGISTRYno longer shadows a shorter keychain key.VLT_REGISTRY+VLT_TOKEN_<key>still worksNot fixed: env-only
VLT_TOKEN_<key>(no keychain /VLT_REGISTRYmatch) still sends nothing. Probing env per URL prefix would leak on every path of a lookalike host; safe fix needs the configured registry list → #1844.Summary by CodeRabbit