node-version as fallback of node-version-file
Maintainer thường phản hồi trong vòng 8 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, typescript
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Bắt đầu tại src/main.ts ở các dòng 85-95 để theo dõi cách node-version và node-version-file được chọn, sau đó đọc src/util.ts ở các dòng 8-12 để kiểm tra hành vi tra cứu tệp. Được xem là hoàn tất khi tệp hiện có được ưu tiên, còn tệp bị thiếu sẽ chuyển sang node-version khi cả hai đầu vào đều được cung cấp mà không làm pipeline bị crash.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Currently the behavior is that node-version is preferred rather than node-version-file if both are provided.
I would like to propose the opposite since node-version is actually hardcoded in the action parameters, but the file is not guaranteed to be there.
Currently, scenarios resolved as following:
with:
node-version: 8 # nothing to see here
with:
node-version-file: fileExists.json # all good
with:
node-version-file: fileDoesNotExists.json # throws error and crashes the pipeline
with:
node-version: 8
node-version-file: fileExists.json # ignored, picked version is 8
with:
node-version: 8
node-version-file: fileDoesNotExists.json # ignored, picked version is 8
What I'm requesting for is a change in the 2 lasts scenarios:
with:
node-version: 8
node-version-file: fileExists.json # has priority, so it's picked
with:
node-version: 8
node-version-file: fileDoesNotExists.json # does not throw and picks version 8 instead
Justification
This is just a nicer API, i think. it does not remove the case of conscious crash of the pipeline if no node-version is given, but it does nicely propose a fail-safe for people interested.
Note
We could also have another parameter such as node-version-fallback-if-file-not-found but it'd just increase the complexity of the api.
Are you willing to submit a PR?
Yes, i'm ok with that.
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 1.7k
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 actions/setup-node
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
actions/setup-node#1531 · 1 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 8 ngày
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
actions/setup-node#1634 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Volta extends resolution in getNodeVersionFromFile has no cycle detection, recursing until stack overflowCó thể đã có người làm @v-gowridurgad đã nhận 15 ngày trước. Đang mở
actions/setup-node#1628 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 8 ngày
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines`Đang mởfeature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
actions/setup-node#1553 · 12 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 8 ngày
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
actions/setup-node#1428 · 1 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 8 ngày
Tất cả issue của actions/setup-node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
opengovsg/FormSG#10118 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
linagora/twake-calendar-frontend#1434 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: MBC kr [Geo-blocked]Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
iptv-org/iptv#52824 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
jaegertracing/jaeger-ui#4512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ide documentation enhancement platform:macos platform:vscode
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
anthropics/claude-code#97389 ·
Maintainer thường phản hồi trong vòng 1 ngày