node-version as fallback of node-version-file
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- ci-cd
調査の方向性
src/main.ts の85-95行目から始めて、node-version と node-version-file がどのように選択されるかを追跡し、その後 src/util.ts の8-12行目を読んでファイル検索の動作を確認します。両方の入力が指定されている場合、既存のファイルが優先され、ファイルが存在しないときは node-version にフォールバックし、パイプラインをクラッシュさせないことを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 1.7k
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/setup-node のほかの issue
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
actions/setup-node#1531 · コメント 1 件 · リアクション 4 件 ·
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
actions/setup-node#1634 · コメント 1 件 ·
-
actions/setup-node#1628 · コメント 3 件 · 担当者 1 名 ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` オープンfeature request
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
actions/setup-node#1553 · コメント 12 件 · リアクション 2 件 ·
-
feature request
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
actions/setup-node#1428 · コメント 1 件 · リアクション 3 件 ·
actions/setup-node の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100