diff --git a/src/commands/uninstall.ts b/src/commands/uninstall.ts index 2aa2e2f..52e4f5f 100644 --- a/src/commands/uninstall.ts +++ b/src/commands/uninstall.ts @@ -5,7 +5,6 @@ import path from "node:path"; import chalk from "chalk"; import { Command } from "commander"; import inquirer from "inquirer"; -import rimraf from "rimraf"; import util from "../lib/util.js"; @@ -60,7 +59,7 @@ function deleteBundle(name: string, path: string) { process.stdout.write("Uninstalling " + chalk.magenta(name) + "... "); try { - rimraf.sync(path); + fs.rmSync(path, { recursive: true, force: true }); } catch (e: any) { /* istanbul ignore next */ process.stdout.write(chalk.red("failed!") + os.EOL); diff --git a/test/commands/install.spec.ts b/test/commands/install.spec.ts index 33dc648..709eb29 100644 --- a/test/commands/install.spec.ts +++ b/test/commands/install.spec.ts @@ -1,7 +1,6 @@ import fs from "node:fs"; import { Command } from "commander"; -import rimraf from "rimraf"; import semver from "semver"; import { beforeEach, expect, it, vi } from "vitest"; @@ -43,8 +42,14 @@ it("should install a version that satisfies a provided semver range", async () = }); it("should install bower & npm dependencies when run with no arguments in a bundle directory", async () => { - rimraf.sync("./bundles/lfg-streamtip/node_modules"); - rimraf.sync("./bundles/lfg-streamtip/bower_components"); + fs.rmSync("./bundles/lfg-streamtip/node_modules", { + recursive: true, + force: true, + }); + fs.rmSync("./bundles/lfg-streamtip/bower_components", { + recursive: true, + force: true, + }); process.chdir("./bundles/lfg-streamtip"); await program.runWith("install");