Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-08-18 18:00:46 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-08-22 21:14:50 +0300
commitbd2ae5d79eb8807bfca6075e98432c545a9ededa (patch)
tree283f8cfd5e989303279331a105adfdd0c024e1be /workspaces/arborist/scripts
parentd54f03132a5e8247cdd8a3c165669477e95980fb (diff)
fix: linting
In preparation for @npmcli/eslint-config@3.1.0
Diffstat (limited to 'workspaces/arborist/scripts')
-rw-r--r--workspaces/arborist/scripts/benchmark.js7
-rw-r--r--workspaces/arborist/scripts/benchmark/reify.js16
2 files changed, 11 insertions, 12 deletions
diff --git a/workspaces/arborist/scripts/benchmark.js b/workspaces/arborist/scripts/benchmark.js
index f6b2b0294..f4d26871b 100644
--- a/workspaces/arborist/scripts/benchmark.js
+++ b/workspaces/arborist/scripts/benchmark.js
@@ -151,7 +151,7 @@ const suite = new Suite({
}
},
- onComplete () {
+ async onComplete () {
rimraf.sync(lastBenchmark)
mkdirp.sync(resolve(__dirname, 'benchmark/saved'))
// always save with sha
@@ -168,12 +168,13 @@ const suite = new Suite({
}
linkSync(saveThis, lastBenchmark)
- teardown().then(() => Promise.all([
+ await teardown()
+ await Promise.all([
registryServer.stop(),
new Promise((res, rej) => {
rimraf(this.cache, er => er ? rej(er) : res())
}),
- ]))
+ ])
},
})
diff --git a/workspaces/arborist/scripts/benchmark/reify.js b/workspaces/arborist/scripts/benchmark/reify.js
index b826533d0..f477cfbd1 100644
--- a/workspaces/arborist/scripts/benchmark/reify.js
+++ b/workspaces/arborist/scripts/benchmark/reify.js
@@ -49,10 +49,9 @@ const suite = async (suite, { registry, cache }) => {
version: '1.0.0',
dependencies,
}))
- await arb.reify().then(() => {
- // grab this so we can make setup faster
- packageLock = require(resolve(path, 'package-lock.json'))
- })
+ await arb.reify()
+ // grab this so we can make setup faster
+ packageLock = require(resolve(path, 'package-lock.json'))
}
// just reify them all fast. we'll remove the bits we don't want later.
@@ -96,14 +95,13 @@ const suite = async (suite, { registry, cache }) => {
rimraf.sync(resolve(path, 'cache'))
}
},
- fn (d) {
- new Arborist({
+ async fn (d) {
+ await new Arborist({
path,
registry,
cache: /no-cache/.test(path) ? resolve(path, 'cache') : cache,
- }).reify().then(() => d.resolve(), er => {
- throw er
- })
+ }).reify()
+ d.resolve()
},
})
}