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:
35
node_modules/webpack/lib/asset/AssetModulesPlugin.js
generated
vendored
35
node_modules/webpack/lib/asset/AssetModulesPlugin.js
generated
vendored
@@ -12,17 +12,22 @@ const {
|
||||
ASSET_MODULE_TYPE_RESOURCE,
|
||||
ASSET_MODULE_TYPE_SOURCE
|
||||
} = require("../ModuleTypeConstants");
|
||||
const { compareModulesByIdOrIdentifier } = require("../util/comparators");
|
||||
const { compareModulesByFullName } = require("../util/comparators");
|
||||
const createSchemaValidation = require("../util/create-schema-validation");
|
||||
const memoize = require("../util/memoize");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("schema-utils").Schema} Schema */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").AssetGeneratorDataUrl} AssetGeneratorDataUrl */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").AssetModuleOutputPath} AssetModuleOutputPath */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").RawPublicPath} RawPublicPath */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").FilenameTemplate} FilenameTemplate */
|
||||
/** @typedef {import("../Compilation").AssetInfo} AssetInfo */
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
/** @typedef {import("../Module").BuildInfo} BuildInfo */
|
||||
/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
|
||||
/** @typedef {import("../NormalModule")} NormalModule */
|
||||
/** @typedef {import("../NormalModule").NormalModuleCreateData} NormalModuleCreateData */
|
||||
|
||||
/**
|
||||
* @param {string} name name of definitions
|
||||
@@ -76,6 +81,7 @@ const getAssetSourceGenerator = memoize(() =>
|
||||
require("./AssetSourceGenerator")
|
||||
);
|
||||
const getAssetBytesGenerator = memoize(() => require("./AssetBytesGenerator"));
|
||||
const getNormalModule = memoize(() => require("../NormalModule"));
|
||||
|
||||
const type = ASSET_MODULE_TYPE;
|
||||
const PLUGIN_NAME = "AssetModulesPlugin";
|
||||
@@ -90,6 +96,27 @@ class AssetModulesPlugin {
|
||||
compiler.hooks.compilation.tap(
|
||||
PLUGIN_NAME,
|
||||
(compilation, { normalModuleFactory }) => {
|
||||
const NormalModule = getNormalModule();
|
||||
for (const type of [
|
||||
ASSET_MODULE_TYPE,
|
||||
ASSET_MODULE_TYPE_BYTES,
|
||||
ASSET_MODULE_TYPE_INLINE,
|
||||
ASSET_MODULE_TYPE_RESOURCE,
|
||||
ASSET_MODULE_TYPE_SOURCE
|
||||
]) {
|
||||
normalModuleFactory.hooks.createModuleClass
|
||||
.for(type)
|
||||
.tap(PLUGIN_NAME, (createData, _resolveData) => {
|
||||
// TODO create the module via new AssetModule with its own properties
|
||||
const module = new NormalModule(
|
||||
/** @type {NormalModuleCreateData} */
|
||||
(createData)
|
||||
);
|
||||
module.factoryMeta = { sideEffectFree: true };
|
||||
return module;
|
||||
});
|
||||
}
|
||||
|
||||
normalModuleFactory.hooks.createParser
|
||||
.for(ASSET_MODULE_TYPE)
|
||||
.tap(PLUGIN_NAME, (parserOptions) => {
|
||||
@@ -146,6 +173,7 @@ class AssetModulesPlugin {
|
||||
.tap(PLUGIN_NAME, (generatorOptions) => {
|
||||
validateGeneratorOptions[type](generatorOptions);
|
||||
|
||||
/** @type {undefined | AssetGeneratorDataUrl} */
|
||||
let dataUrl;
|
||||
if (type !== ASSET_MODULE_TYPE_RESOURCE) {
|
||||
dataUrl = generatorOptions.dataUrl;
|
||||
@@ -158,8 +186,11 @@ class AssetModulesPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {undefined | FilenameTemplate} */
|
||||
let filename;
|
||||
/** @type {undefined | RawPublicPath} */
|
||||
let publicPath;
|
||||
/** @type {undefined | AssetModuleOutputPath} */
|
||||
let outputPath;
|
||||
if (type !== ASSET_MODULE_TYPE_INLINE) {
|
||||
filename = generatorOptions.filename;
|
||||
@@ -202,7 +233,7 @@ class AssetModulesPlugin {
|
||||
const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType(
|
||||
chunk,
|
||||
ASSET_MODULE_TYPE,
|
||||
compareModulesByIdOrIdentifier(chunkGraph)
|
||||
compareModulesByFullName(compilation.compiler)
|
||||
);
|
||||
if (modules) {
|
||||
for (const module of modules) {
|
||||
|
||||
Reference in New Issue
Block a user