Skip to content

Commit 0260f12

Browse files
billatnpmisaacs
authored andcommitted
feat(promise): removed .tap
1 parent 0a8cb87 commit 0260f12

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/verify.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ function verify (cache, opts) {
4949
stats.runTime[label] = end - start
5050
return stats
5151
})
52-
}, {}).tap(stats => {
53-
stats.runTime.total = stats.endTime - stats.startTime
54-
opts.log.silly('verify', 'verification finished for', cache, 'in', `${stats.runTime.total}ms`)
55-
})
52+
}, {})
53+
.then((stats) => {
54+
stats.runTime.total = stats.endTime - stats.startTime
55+
opts.log.silly('verify', 'verification finished for', cache, 'in', `${stats.runTime.total}ms`)
56+
return stats
57+
})
5658
}
5759

5860
function markStartTime (cache, opts) {
@@ -101,7 +103,7 @@ function garbageCollect (cache, opts) {
101103
reclaimedSize: 0,
102104
badContentCount: 0,
103105
keptSize: 0
104-
}).tap((stats) => BB.map(files, (f) => {
106+
}).then((stats) => BB.map(files, (f) => {
105107
const split = f.split(/[/\\]/)
106108
const digest = split.slice(split.length - 3).join('')
107109
const algo = split[split.length - 4]
@@ -128,7 +130,8 @@ function garbageCollect (cache, opts) {
128130
})
129131
})
130132
}
131-
}, { concurrency: opts.concurrency }))
133+
}, { concurrency: opts.concurrency })
134+
.then(() => stats))
132135
})
133136
})
134137
}

0 commit comments

Comments
 (0)