@rspack/lite-tapable
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -178,4 +178,4 @@ "use strict"; | ||
exports.HookBase = HookBase; | ||
exports.minStage = -Infinity; | ||
exports.maxStage = Infinity; | ||
exports.minStage = Number.NEGATIVE_INFINITY; | ||
exports.maxStage = Number.POSITIVE_INFINITY; | ||
const allStageRange = [exports.minStage, exports.maxStage]; | ||
@@ -196,3 +196,3 @@ const i32MIN = -(2 ** 31); | ||
const [from, to] = stageRange; | ||
for (let tap of hook.taps) { | ||
for (const tap of hook.taps) { | ||
const stage = tap.stage ?? 0; | ||
@@ -245,3 +245,3 @@ if (from <= stage && stage < to) { | ||
} | ||
for (let tap of tapsInRange) { | ||
for (const tap of tapsInRange) { | ||
this._runTapInterceptors(tap); | ||
@@ -295,3 +295,3 @@ try { | ||
} | ||
for (let tap of tapsInRange) { | ||
for (const tap of tapsInRange) { | ||
this._runTapInterceptors(tap); | ||
@@ -355,3 +355,3 @@ let r = undefined; | ||
} | ||
for (let tap of tapsInRange) { | ||
for (const tap of tapsInRange) { | ||
this._runTapInterceptors(tap); | ||
@@ -401,3 +401,3 @@ try { | ||
callAsyncStageRange(queried, ...args) { | ||
const { stageRange: [from, to], tapsInRange } = queried; | ||
const { stageRange: [from], tapsInRange } = queried; | ||
const argsWithoutCb = args.slice(0, args.length - 1); | ||
@@ -420,3 +420,3 @@ const cb = args[args.length - 1]; | ||
let counter = tapsInRange.length; | ||
for (let tap of tapsInRange) { | ||
for (const tap of tapsInRange) { | ||
this._runTapInterceptors(tap); | ||
@@ -476,3 +476,3 @@ if (tap.type === "promise") { | ||
callAsyncStageRange(queried, ...args) { | ||
const { stageRange: [from, to], tapsInRange } = queried; | ||
const { stageRange: [from], tapsInRange } = queried; | ||
const argsWithoutCb = args.slice(0, args.length - 1); | ||
@@ -564,3 +564,3 @@ const cb = args[args.length - 1]; | ||
callAsyncStageRange(queried, ...args) { | ||
const { stageRange: [from, to], tapsInRange } = queried; | ||
const { stageRange: [from], tapsInRange } = queried; | ||
const argsWithoutCb = args.slice(0, args.length - 1); | ||
@@ -671,3 +671,3 @@ const cb = args[args.length - 1]; | ||
callAsyncStageRange(queried, ...args) { | ||
const { stageRange: [from, to], tapsInRange } = queried; | ||
const { stageRange: [from], tapsInRange } = queried; | ||
const argsWithoutCb = args.slice(0, args.length - 1); | ||
@@ -674,0 +674,0 @@ const cb = args[args.length - 1]; |
{ | ||
"name": "@rspack/lite-tapable", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Lite weight tapable for Rspack", |
39369