Should node support subcommands?
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
What is the problem this feature will solve?
currently, node's cli interface is pretty simple and lean,
it mainly accepts flags that start with two dashes, or sometimes a single dash for some aliases.
additionally, many flags depend on each other or imply using another flag.
now that more and more flags are added to node, (and each new flag is heavily considered before adding to avoid options bloat), I propose we support a more complex cli interface with sub-commands.
this issue has come up before when adding node --run, and to avoid blocking that - the discussion was postponed, so I went ahead and opened this issue.
If I recall, the main concern was node run or node test is a breaking change since it today runs node run.js or node test.js accordingly - that can be addressed with releasing this gradually as semver-major with a deprecation warning for a few versions prior to the actual change
some groups/clusters of commands that might fit using sub commands:
node --runnode --watch,--watch-pathnode --testnode --build-snapshot
What is the feature you are proposing to solve the problem?
N/A
What alternatives have you considered?
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Node の CLI 処理と node --run に関するこれまでの議論を確認し、次に提案されているグループ --run、--watch、--test、--build-snapshot を比較します。既存の node run.js および node test.js の呼び出しへの互換性の影響を考慮してください。完了とするには、合意されたサブコマンド設計と semver-major の非推奨化計画が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100