Vendored pnpm deployments
Maintainer thường phản hồi trong vòng 1 ngà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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, node.js
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start in src/nodejs/supply/supply.go, especially BuildDependencies(), the PNPM interface, and the package-manager selection cases. Compare the existing NPM.Rebuild() implementation in src/nodejs/npm/npm.go; then inspect the supply tests for vendored and pnpm behavior. Done means a vendored pnpm deployment invokes pnpm rebuild rather than pnpm install.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Vendored pnpm deployments run pnpm install instead of pnpm rebuild
Summary
Since v1.9.5 pnpm is officially supported (big thanks) but pnpm projects with a pre-populated node_modules/ (vendored deployments) incorrectly run pnpm install --no-frozen-lockfile instead of pnpm rebuild.
There are two distinct bugs in BuildDependencies().
Bug 1 — case s.UsePNPM has priority over case s.IsVendored
switch {
case s.UseYarn: // L343
s.Yarn.Build(...)
case s.UsePNPM: // L348 ← matched first, PNPM.Build() runs
s.PNPM.Build(...)
case s.IsVendored: // L353 ← never reached when pnpm-lock.yaml is present
s.NPM.Rebuild(...)
...
}
When both flags are set:
s.UsePNPM = true—pnpm-lock.yamlexistss.IsVendored = true—node_modules/exists
PNPM.Build() runs pnpm install, ignoring the pre-populated node_modules/.
Bug 2 — case s.IsVendored hardcodes NPM.Rebuild() regardless of package manager
Even if the ordering were fixed, case s.IsVendored at
supply.go#L353
always calls s.NPM.Rebuild(). A vendored pnpm project should call PNPM.Rebuild(),
which would also require adding Rebuild(string) error to the
PNPM interface at L51–L53
(today only Build(string, string) error exists),
mirroring npm/npm.go#L34–L51.
The same gap likely exists for Yarn vendored deployments.
Use case
We use pnpm deploy --prod to produce a flat node_modules/ layout compatible with the CF buildpack, then push the archive.
The buildpack should detect the pre-populated node_modules/ and skip the install phase, running pnpm rebuild instead to recompile any native addons for the CF stack.
How to reproduce
- Create a minimal pnpm workspace with a
pnpm-lock.yamland a pre-populatednode_modules/. - Run the buildpack supply step.
- Expected:
pnpm rebuildis called. - Actual:
pnpm install --no-frozen-lockfileis called.
- Ngôn ngữ chính
- Go
- Star
- 173
- Fork
- 389
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 cloudfoundry/nodejs-buildpack
-
unscheduled
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
cloudfoundry/nodejs-buildpack#683 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BDSA-2025-12492 CVE-2025-8869Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cloudfoundry/nodejs-buildpack#923 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Misleading "PRO TIP" about missing "package-lock.json" (with `npm-shrinkwrap.json`)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
cloudfoundry/nodejs-buildpack#852 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
unscheduled
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
cloudfoundry/nodejs-buildpack#655 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Supply step do not retry when error is connection reset by peerCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởunscheduled
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cloudfoundry/nodejs-buildpack#626 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudfoundry/nodejs-buildpack
Issue tương tự
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substringĐang mởtriage/pending-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
external-secrets/external-secrets#7117 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ENTERPILOT/GoModel#1183 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Edwin-metcalf/MetCode#16 ·
-
Action Required: Fix Renovate ConfigurationCó thể đã có người làm @thompson-tomo đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
open-telemetry/opentelemetry-collector#16170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Buffer.writeRTX drops the RTCP returned by calc, so NACKs for other lost packets are never sentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày