From 12c443df8ece0eb57c641d3d67e999457ac76995 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 23 Aug 2019 13:03:47 +0200 Subject: [PATCH] Meta tweaks --- benchmark.js | 22 +++++++++++++++++++--- package.json | 10 +++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/benchmark.js b/benchmark.js index 41cb7b3..9cfd6db 100644 --- a/benchmark.js +++ b/benchmark.js @@ -9,7 +9,7 @@ const suite = new Benchmark.Suite('concurrency'); const tempDir = tempy.directory(); -const fixtures = Array.from({length: 2000}, (x, index) => { +const fixtures = Array.from({length: 2000}, (_, index) => { return path.resolve(tempDir, (index + 1).toString()); }); @@ -19,7 +19,22 @@ function createFixtures() { } } -const concurrencies = [1, 3, 5, 10, 15, 20, 50, 100, 200, 300, 400, 500, 1000, Infinity]; +const concurrencies = [ + 1, + 3, + 5, + 10, + 15, + 20, + 50, + 100, + 200, + 300, + 400, + 500, + 1000, + Infinity +]; for (const concurrency of concurrencies) { const name = `concurrency: ${concurrency.toString()}`; @@ -29,7 +44,8 @@ for (const concurrency of concurrencies) { defer: true, setup() {}, // This line breaks async await async fn(deferred) { - // Can't use setup because it isn't called after every defer + // Can't use `setup()` because it isn't called after every + // defer and it breaks using `async` keyword here. // https://github.com/bestiejs/benchmark.js/issues/136 createFixtures(); diff --git a/package.json b/package.json index 51b594f..68acb84 100644 --- a/package.json +++ b/package.json @@ -45,21 +45,21 @@ "filesystem" ], "dependencies": { - "globby": "^10.0.0", + "globby": "^10.0.1", "graceful-fs": "^4.2.2", "is-glob": "^4.0.1", - "is-path-cwd": "^2.0.0", + "is-path-cwd": "^2.2.0", "is-path-inside": "^3.0.1", - "slash": "^3.0.0", "p-map": "^3.0.0", - "rimraf": "^3.0.0" + "rimraf": "^3.0.0", + "slash": "^3.0.0" }, "devDependencies": { "ava": "^2.3.0", "benchmark": "^2.1.4", "make-dir": "^3.0.0", "tempy": "^0.3.0", - "tsd": "^0.7.3", + "tsd": "^0.7.4", "xo": "^0.24.0" } }