feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -11,7 +11,7 @@ const ProgressPlugin = require("../ProgressPlugin");
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("./PackFileCacheStrategy")} PackFileCacheStrategy */
const BUILD_DEPENDENCIES_KEY = Symbol();
const BUILD_DEPENDENCIES_KEY = Symbol("build dependencies key");
class IdleFileCachePlugin {
/**
@@ -38,7 +38,7 @@ class IdleFileCachePlugin {
* @returns {void}
*/
apply(compiler) {
let strategy = this.strategy;
const strategy = this.strategy;
const idleTimeout = this.idleTimeout;
const idleTimeoutForInitialStore = Math.min(
idleTimeout,
@@ -119,7 +119,7 @@ class IdleFileCachePlugin {
currentIdlePromise = promise.then(() => strategy.afterAllStored());
if (reportProgress) {
currentIdlePromise = currentIdlePromise.then(() => {
reportProgress(1, `stored`);
reportProgress(1, "stored");
});
}
return currentIdlePromise.then(() => {
@@ -175,7 +175,7 @@ class IdleFileCachePlugin {
}
};
/** @type {ReturnType<typeof setTimeout> | undefined} */
let idleTimer = undefined;
let idleTimer;
compiler.cache.hooks.beginIdle.tap(
{ name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK },
() => {