Use self nf path to run sub commands
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 54/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- node.js, typescript
調査の方向性
Start by checking the CLI entry point and existing command dispatch for how nf subcommands are invoked. The request proposes using the local nf executable through npm exec for development; confirm which development command should change and verify it runs the requested build --watch subcommand.
索引モデルが issue の本文から書いたものです。
説明
Which package is this feature request for?
@nanoforge-dev/cli
Which command is this feature request for?
dev
Feature
nf dev starts build --watch and start --watch through the package manager: <pm> exec nf <command> --watch (dev.action.ts#L40-L42, package-manager.ts#L131-L141). So the package manager decides which nf runs, not the CLI that is running (process.argv[1]). As confirmed in the comments, the sub-commands can end up running the global nf binary instead of the project's local one.
Related: the local CLI is looked up from process.cwd(), not from --directory (local-binaries.ts#L6), so nf dev --directory <dir> run from another folder doesn't find the project's local CLI either.
Ideal solution or implementation
The sub-commands spawn process.execPath with the entry of the CLI that is running (process.argv[1]), followed by the sub-command and its flags, in directory, instead of <pm> exec nf.
Acceptance criteria:
- With a local CLI in the project and a different global
nf,nf devnever runs the global one forbuildorstart. - A test checks the command
nf devspawns (it uses the running CLI's entry, not<pm> exec nf). -
--editorand the other flags still reach thebuildsub-command.
Alternative solutions or implementations
Keep <pm> exec, but pass the local binary's path (<pm> exec <project>/node_modules/.bin/nf -- build --watch, as in the original request).
Other context
Open questions (not recorded, ask the team):
- Should the local CLI lookup use
--directoryinstead ofprocess.cwd()in the same change, or in its own issue?
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 2
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NanoForge-dev/CLI のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NanoForge-dev/CLI#294 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NanoForge-dev/CLI#293 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NanoForge-dev/CLI#292 ·
メンテナーはふだん 1 日以内に返信
-
command:dev enhancement good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NanoForge-dev/CLI#281 ·
メンテナーはふだん 1 日以内に返信
-
bug command:build good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NanoForge-dev/CLI#276 ·
メンテナーはふだん 1 日以内に返信
NanoForge-dev/CLI の issue をすべて見る
似ている issue
-
Mend: dependency security vulnerability
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
fdm-monster/fdm-monster#5563 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
growilabs/growi#12246 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
🐛 The Rulekeeper - An index run that gives up on the lock ends Succeeded対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SSWConsulting/SSW.Rules#2809 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信