diff --git a/lib/cli.js b/lib/cli.js index 944b4b79353..815ce68c22f 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -17,7 +17,6 @@ const fs = require("fs"), path = require("path"), - mkdirp = require("mkdirp"), { CLIEngine } = require("./cli-engine"), options = require("./options"), log = require("./shared/logging"), @@ -115,7 +114,7 @@ function printResults(engine, results, format, outputFile) { } try { - mkdirp.sync(path.dirname(filePath)); + fs.mkdirSync(path.dirname(filePath), { recursive: true }); fs.writeFileSync(filePath, output); } catch (ex) { log.error("There was a problem writing the output file:\n%s", ex); diff --git a/package.json b/package.json index 57320b33d9d..713ca8c8014 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "dependencies": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^3.0.0", + "cross-spawn": "^7.0.1", "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", @@ -72,13 +72,12 @@ "levn": "^0.3.0", "lodash": "^4.17.14", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.3", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", + "regexpp": "^3.0.0", + "semver": "^7.1.1", + "strip-ansi": "^6.0.0", "strip-json-comments": "^3.0.1", "table": "^5.2.3", "text-table": "^0.2.0", diff --git a/tests/lib/cli-engine/formatters/stylish.js b/tests/lib/cli-engine/formatters/stylish.js index 54e66fbc1ce..66f6abe464a 100644 --- a/tests/lib/cli-engine/formatters/stylish.js +++ b/tests/lib/cli-engine/formatters/stylish.js @@ -49,10 +49,10 @@ const formatter = proxyquire("../../../../lib/cli-engine/formatters/stylish", { //------------------------------------------------------------------------------ describe("formatter:stylish", () => { - const colorsEnabled = chalk.enabled; + const originalColorLevel = chalk.level; beforeEach(() => { - chalk.enabled = false; + chalk.level = 0; sinon.spy(chalkStub, "reset"); sinon.spy(chalkStub.yellow, "bold"); sinon.spy(chalkStub.red, "bold"); @@ -60,7 +60,7 @@ describe("formatter:stylish", () => { afterEach(() => { sinon.verifyAndRestore(); - chalk.enabled = colorsEnabled; + chalk.level = originalColorLevel; }); describe("when passed no messages", () => { diff --git a/tests/lib/cli-engine/formatters/table.js b/tests/lib/cli-engine/formatters/table.js index f80a3359f5d..3e29caf2edd 100644 --- a/tests/lib/cli-engine/formatters/table.js +++ b/tests/lib/cli-engine/formatters/table.js @@ -17,15 +17,14 @@ const formatter = require("../../../../lib/cli-engine/formatters/table"); //------------------------------------------------------------------------------ describe("formatter:table", () => { - let originalChalkEnabled; + const originalColorLevel = chalk.level; before(() => { - originalChalkEnabled = chalk.enabled; - chalk.enabled = false; + chalk.level = 0; }); after(() => { - chalk.enabled = originalChalkEnabled; + chalk.level = originalColorLevel; }); describe("when passed no messages", () => {