cloudflare / cloudflare/binary-install

Add option to remove only binary or whole directory

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement status - PR Welcome
主要言語
JavaScript
スター
48
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently, `binary-install` assumes that uninstalling should remove the entire directory from the user's machine, however some libraries may have application-specific code in that directory. If that is the case, they may want to give users the choice of whether or not they want to remove application-specific code, or just the binary.

`binary-install` should remove the entire directory by default, but should allow library consumers to toggle the feature where the user is prompted to either remove the entire directory or just the binary.

current code in `uninstall` that should remain the default

```js
if (existsSync(this._getInstallDirectory())) {
rimraf.sync(this.installDirectory);
console.log(
`${this.name ? this.name : "Your package"} has been uninstalled`
);
}
```

if the user passes `option.uninstallPrompt = true`

```
"Would you like to remove all of your data associated with ${this.name}`? (y/n)
```

if y -> use existing default code

if n -> `fs.unlink(this._getBinaryPath())`

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

アンインストールのエントリーポイントから開始し、_getInstallDirectory()、installDirectory、_getBinaryPath() 周辺にある既存のチェックを確認します。現在のディレクトリ全体の削除をデフォルトとして維持し、そのうえで option.uninstallPrompt が選択を制御し、拒否した場合はバイナリのみが削除されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
cli, tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。