Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
53
node_modules/webpack/lib/SourceMapDevToolPlugin.js
generated
vendored
53
node_modules/webpack/lib/SourceMapDevToolPlugin.js
generated
vendored
@@ -51,9 +51,9 @@ const validate = createSchemaValidation(
|
||||
*/
|
||||
|
||||
const METACHARACTERS_REGEXP = /[-[\]\\/{}()*+?.^$|]/g;
|
||||
const CONTENT_HASH_DETECT_REGEXP = /\[contenthash(:\w+)?\]/;
|
||||
const CONTENT_HASH_DETECT_REGEXP = /\[contenthash(?::\w+)?\]/;
|
||||
const CSS_AND_JS_MODULE_EXTENSIONS_REGEXP = /\.((c|m)?js|css)($|\?)/i;
|
||||
const CSS_EXTENSION_DETECT_REGEXP = /\.css($|\?)/i;
|
||||
const CSS_EXTENSION_DETECT_REGEXP = /\.css(?:$|\?)/i;
|
||||
const MAP_URL_COMMENT_REGEXP = /\[map\]/g;
|
||||
const URL_COMMENT_REGEXP = /\[url\]/g;
|
||||
const URL_FORMATTING_REGEXP = /^\n\/\/(.*)$/;
|
||||
@@ -93,18 +93,19 @@ const getTaskForFile = (
|
||||
compilation,
|
||||
cacheItem
|
||||
) => {
|
||||
/** @type {string | Buffer} */
|
||||
let source;
|
||||
/** @type {RawSourceMap} */
|
||||
/** @type {null | RawSourceMap} */
|
||||
let sourceMap;
|
||||
/**
|
||||
* Check if asset can build source map
|
||||
*/
|
||||
if (asset.sourceAndMap) {
|
||||
const sourceAndMap = asset.sourceAndMap(options);
|
||||
sourceMap = /** @type {RawSourceMap} */ (sourceAndMap.map);
|
||||
sourceMap = sourceAndMap.map;
|
||||
source = sourceAndMap.source;
|
||||
} else {
|
||||
sourceMap = /** @type {RawSourceMap} */ (asset.map(options));
|
||||
sourceMap = asset.map(options);
|
||||
source = asset.source();
|
||||
}
|
||||
if (!sourceMap || typeof source !== "string") return;
|
||||
@@ -173,6 +174,7 @@ class SourceMapDevToolPlugin {
|
||||
const options = this.options;
|
||||
options.test = options.test || CSS_AND_JS_MODULE_EXTENSIONS_REGEXP;
|
||||
|
||||
/** @type {(filename: string) => boolean} */
|
||||
const matchObject = ModuleFilenameHelpers.matchObject.bind(
|
||||
undefined,
|
||||
options
|
||||
@@ -310,7 +312,7 @@ class SourceMapDevToolPlugin {
|
||||
|
||||
if (
|
||||
typeof module === "string" &&
|
||||
/^(data|https?):/.test(module)
|
||||
/^(?:data|https?):/.test(module)
|
||||
) {
|
||||
moduleToSourceNameMapping.set(module, module);
|
||||
continue;
|
||||
@@ -416,7 +418,9 @@ class SourceMapDevToolPlugin {
|
||||
asyncLib.each(
|
||||
tasks,
|
||||
(task, callback) => {
|
||||
/** @type {Record<string, Source>} */
|
||||
const assets = Object.create(null);
|
||||
/** @type {Record<string, AssetInfo | undefined>} */
|
||||
const assetsInfo = Object.create(null);
|
||||
const file = task.file;
|
||||
const chunk = fileToChunk.get(file);
|
||||
@@ -434,24 +438,27 @@ class SourceMapDevToolPlugin {
|
||||
moduleToSourceNameMapping.get(m)
|
||||
);
|
||||
sourceMap.sources = /** @type {string[]} */ (moduleFilenames);
|
||||
sourceMap.ignoreList = options.ignoreList
|
||||
? sourceMap.sources.reduce(
|
||||
/** @type {(acc: number[], sourceName: string, idx: number) => number[]} */ (
|
||||
(acc, sourceName, idx) => {
|
||||
const rule = /** @type {Rules} */ (
|
||||
options.ignoreList
|
||||
);
|
||||
if (
|
||||
ModuleFilenameHelpers.matchPart(sourceName, rule)
|
||||
) {
|
||||
acc.push(idx);
|
||||
}
|
||||
return acc;
|
||||
if (options.ignoreList) {
|
||||
const ignoreList = sourceMap.sources.reduce(
|
||||
/** @type {(acc: number[], sourceName: string, idx: number) => number[]} */ (
|
||||
(acc, sourceName, idx) => {
|
||||
const rule = /** @type {Rules} */ (
|
||||
options.ignoreList
|
||||
);
|
||||
if (
|
||||
ModuleFilenameHelpers.matchPart(sourceName, rule)
|
||||
) {
|
||||
acc.push(idx);
|
||||
}
|
||||
),
|
||||
[]
|
||||
)
|
||||
: [];
|
||||
return acc;
|
||||
}
|
||||
),
|
||||
[]
|
||||
);
|
||||
if (ignoreList.length > 0) {
|
||||
sourceMap.ignoreList = ignoreList;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.noSources) {
|
||||
sourceMap.sourcesContent = undefined;
|
||||
|
||||
Reference in New Issue
Block a user