diff --git a/package.json b/package.json index 65a9ac1..b90935c 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,6 @@ "chalk": "5.4.1", "cpy": "11.1.0", "cpy-cli": "5.0.0", - "del": "8.0.0", "eslint": "9.17.0", "eslint-plugin-jsdoc": "50.6.1", "eslint-plugin-n": "17.15.1", diff --git a/test/markdownlint-cli2-test-cases.mjs b/test/markdownlint-cli2-test-cases.mjs index cd0278f..8aa68c4 100644 --- a/test/markdownlint-cli2-test-cases.mjs +++ b/test/markdownlint-cli2-test-cases.mjs @@ -4,6 +4,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import test from "ava"; +import cpy from "cpy"; import { __dirname } from "./esm-helpers.mjs"; const noop = () => null; @@ -140,16 +141,13 @@ const testCases = ({ const directoryName = (dir) => `${dir}-copy-${host}`; - const copyDirectory = (dir, alt) => import("cpy").then((cpy) => ( - cpy.default( - path.join(__dirname(import.meta), (alt || dir), "**"), - path.join(__dirname(import.meta), directoryName(dir)) - ) - )); + const copyDirectory = (dir, alt) => cpy( + path.join(__dirname(import.meta), (alt || dir), "**"), + path.join(__dirname(import.meta), directoryName(dir)) + ); - const deleteDirectory = (dir) => import("del").then((del) => ( - del.deleteAsync(path.join(__dirname(import.meta), directoryName(dir))) - )); + const deleteDirectory = (dir) => + fs.rm(path.join(__dirname(import.meta), directoryName(dir)), { "recursive": true }); testCase({ "name": "no-arguments",