cloudflare / cloudflare/binary-install

Add option to remove only binary or whole directory

Abierto
#4 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement status - PR Welcome
Lenguaje dominante
JavaScript
Estrellas
48
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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())`

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en el punto de entrada de la desinstalación e inspecciona las comprobaciones existentes en torno a _getInstallDirectory(), installDirectory y _getBinaryPath(). Conserva como comportamiento predeterminado la eliminación actual del directorio completo y, después, verifica que option.uninstallPrompt controle la elección y que rechazar elimine únicamente el binario.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
cli, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.