From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送
---
node_modules/webpack/lib/ModuleFilenameHelpers.js | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/node_modules/webpack/lib/ModuleFilenameHelpers.js b/node_modules/webpack/lib/ModuleFilenameHelpers.js
index b03b753..308b520 100644
--- a/node_modules/webpack/lib/ModuleFilenameHelpers.js
+++ b/node_modules/webpack/lib/ModuleFilenameHelpers.js
@@ -15,7 +15,8 @@
/** @typedef {import("./Module")} Module */
/** @typedef {import("./RequestShortener")} RequestShortener */
-/** @typedef {string | RegExp | ((str: string) => boolean) | (string | RegExp | ((str: string) => boolean))[]} Matcher */
+/** @typedef {(str: string) => boolean} MatcherFn */
+/** @typedef {string | RegExp | MatcherFn | (string | RegExp | MatcherFn)[]} Matcher */
/** @typedef {{ test?: Matcher, include?: Matcher, exclude?: Matcher }} MatchObject */
const ModuleFilenameHelpers = module.exports;
@@ -89,6 +90,7 @@
};
/**
+ * Returns the lazy access object.
* @template T
* Returns a lazy object. The object is lazy in the sense that the properties are
* only evaluated when they are accessed. This is only obtained by setting a function as the value for each key.
@@ -115,8 +117,9 @@
return newObj;
};
-const SQUARE_BRACKET_TAG_REGEXP = /\[\\*([\w-]+)\\*\]/gi;
+const SQUARE_BRACKET_TAG_REGEXP = /\[\\*([\w-]+)\\*\]/g;
/**
+ * Defines the module filename template context type used by this module.
* @typedef {object} ModuleFilenameTemplateContext
* @property {string} identifier the identifier of the module
* @property {string} shortIdentifier the shortened identifier of the module
@@ -134,6 +137,7 @@
/** @typedef {string | ModuleFilenameTemplateFunction} ModuleFilenameTemplate */
/**
+ * Returns the filename.
* @param {Module | string} module the module
* @param {{ namespace?: string, moduleFilenameTemplate?: ModuleFilenameTemplate }} options options
* @param {{ requestShortener: RequestShortener, chunkGraph: ChunkGraph, hashFunction?: HashFunction }} contextInfo context info
@@ -157,6 +161,7 @@
/** @type {ReturnStringCallback} */
let absoluteResourcePath;
+ /** @type {ReturnStringCallback} */
let hash;
/** @type {ReturnStringCallback} */
let identifier;
@@ -281,7 +286,7 @@
* @template T
* @param {T[]} array the array with duplicates to be replaced
* @param {(duplicateItem: T, duplicateItemIndex: number, numberOfTimesReplaced: number) => T} fn callback function to generate new values for the duplicate items
- * @param {(firstElement:T, nextElement:T) => -1 | 0 | 1=} comparator optional comparator function to sort the duplicate items
+ * @param {(firstElement: T, nextElement: T) => -1 | 0 | 1=} comparator optional comparator function to sort the duplicate items
* @returns {T[]} the array with duplicates replaced
* @example
* ```js
--
Gitblit v1.9.3