tapable
Advanced tools
Comparing version 2.0.0-beta.10 to 2.0.0-beta.11
@@ -282,9 +282,13 @@ /* | ||
const firstAsync = this.options.taps.findIndex(t => t.type !== "sync"); | ||
const somethingReturns = resultReturns || doneReturns || false; | ||
const somethingReturns = resultReturns || doneReturns; | ||
let code = ""; | ||
let current = onDone; | ||
let unrollCounter = 0; | ||
for (let j = this.options.taps.length - 1; j >= 0; j--) { | ||
const i = j; | ||
const unroll = current !== onDone && this.options.taps[i].type !== "sync"; | ||
const unroll = | ||
current !== onDone && | ||
(this.options.taps[i].type !== "sync" || unrollCounter++ > 20); | ||
if (unroll) { | ||
unrollCounter = 0; | ||
code += `function _next${i}() {\n`; | ||
@@ -291,0 +295,0 @@ code += current(); |
{ | ||
"name": "tapable", | ||
"version": "2.0.0-beta.10", | ||
"version": "2.0.0-beta.11", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Just a little module for plugins.", |
45045
1214