npm version lookups ignore the registry configured in .npmrc
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Start by locating NpmVersionResolver and YarnVersionResolver, which the issue identifies as fetching versions directly from the public registry; inspect their tests and the install-npm entry point to see how resolution is invoked. Compare those lookups with npm's configured registry and credential behavior. Done means private .npmrc registries and credentials are honored for latest and partial-version lookups, with regression tests covering those cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug
The npm version resolver ignores the registry configured in .npmrc.
NpmVersionResolver and YarnVersionResolver look versions up directly at https://registry.npmjs.org/<package>; only containerbase's URL replacements are applied. The scope registries and credentials from .npmrc (eg. @corp:registry=https://npm.corp.example with an auth token) are never used. The install itself runs npm, which does use them.
So a package that only exists on a private registry can't be resolved:
install-npm @corp/tool(no version orlatest) fails today, because thelatestdist tag is fetched from the public registry.install-npm @corp/tool 5fails the same way once partial versions are resolved (#7633); before,5was passed through to npm unchanged.
A full version like install-npm @corp/tool 5.1.0 works, because it skips the lookup.
Expected
Version lookups use the same registry and credentials as the install, so latest and partial versions work for packages from any registry configured in .npmrc. One option is to ask npm itself, eg. npm view <package>@<range> version --json, since install-npm requires node anyway.
Context
Found by CodeRabbit on #7633 and deferred, since latest already has the problem.
Opened by Claude Opus 5.5 in Claude Code on behalf of @viceice.
- Ngôn ngữ chính
- TypeScript
- Star
- 58
- Fork
- 65
- Merge trung bình
- 10 giờ 37 phút
- Pull request đã merge (30 ngày)
- 462
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của containerbase/base
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
containerbase/base#7891 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
containerbase/base#7842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority-3-normal tool/dotnet
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
containerbase/base#5996 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
containerbase/base#7971 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
containerbase/base#7970 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của containerbase/base
Issue tương tự
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixCó thể đã có người làm @ItsDeadlyProgrammer đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appsmithorg/appsmith#42471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mermaid-js/mermaid#8546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainer thường phản hồi trong vòng 1 ngày