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:
1
node_modules/webpack/lib/asset/AssetBytesGenerator.js
generated
vendored
1
node_modules/webpack/lib/asset/AssetBytesGenerator.js
generated
vendored
@@ -60,6 +60,7 @@ class AssetSourceGenerator extends Generator {
|
||||
runtimeRequirements.add(RuntimeGlobals.requireScope);
|
||||
runtimeRequirements.add(RuntimeGlobals.toBinary);
|
||||
|
||||
/** @type {string} */
|
||||
let sourceContent;
|
||||
if (concatenationScope) {
|
||||
concatenationScope.registerNamespaceExport(
|
||||
|
||||
21
node_modules/webpack/lib/asset/AssetGenerator.js
generated
vendored
21
node_modules/webpack/lib/asset/AssetGenerator.js
generated
vendored
@@ -43,6 +43,7 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
/** @typedef {import("../Compilation").AssetInfo} AssetInfo */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../Module").NameForCondition} NameForCondition */
|
||||
/** @typedef {import("../Module").BuildInfo} BuildInfo */
|
||||
/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */
|
||||
@@ -54,6 +55,8 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
/** @typedef {import("../util/Hash")} Hash */
|
||||
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
|
||||
|
||||
/** @typedef {(source: string | Buffer, context: { filename: string, module: Module }) => string} DataUrlFunction */
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template U
|
||||
@@ -62,12 +65,13 @@ const getMimeTypes = memoize(() => require("mime-types"));
|
||||
* @returns {T[] & U[]} array
|
||||
*/
|
||||
const mergeMaybeArrays = (a, b) => {
|
||||
/** @type {Set<T | U | null | undefined | string | Set<T> | Set<U>>} */
|
||||
const set = new Set();
|
||||
if (Array.isArray(a)) for (const item of a) set.add(item);
|
||||
else set.add(a);
|
||||
if (Array.isArray(b)) for (const item of b) set.add(item);
|
||||
else set.add(b);
|
||||
return [...set];
|
||||
return /** @type {T[] & U[]} */ ([.../** @type {Set<T | U>} */ (set)]);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -204,11 +208,17 @@ class AssetGenerator extends Generator {
|
||||
emit
|
||||
) {
|
||||
super();
|
||||
/** @type {AssetGeneratorOptions["dataUrl"] | undefined} */
|
||||
this.dataUrlOptions = dataUrlOptions;
|
||||
/** @type {AssetModuleFilename | undefined} */
|
||||
this.filename = filename;
|
||||
/** @type {RawPublicPath | undefined} */
|
||||
this.publicPath = publicPath;
|
||||
/** @type {AssetModuleOutputPath | undefined} */
|
||||
this.outputPath = outputPath;
|
||||
/** @type {boolean | undefined} */
|
||||
this.emit = emit;
|
||||
/** @type {ModuleGraph} */
|
||||
this._moduleGraph = moduleGraph;
|
||||
}
|
||||
|
||||
@@ -333,6 +343,7 @@ class AssetGenerator extends Generator {
|
||||
runtimeTemplate
|
||||
);
|
||||
|
||||
/** @type {undefined | string} */
|
||||
let assetPath;
|
||||
|
||||
if (generatorOptions.publicPath !== undefined && type === JAVASCRIPT_TYPE) {
|
||||
@@ -457,6 +468,7 @@ class AssetGenerator extends Generator {
|
||||
generateDataUri(module) {
|
||||
const source = /** @type {Source} */ (module.originalSource());
|
||||
|
||||
/** @type {string} */
|
||||
let encodedSource;
|
||||
|
||||
if (typeof this.dataUrlOptions === "function") {
|
||||
@@ -480,6 +492,7 @@ class AssetGenerator extends Generator {
|
||||
}
|
||||
const mimeType = this.getMimeType(module);
|
||||
|
||||
/** @type {string} */
|
||||
let encodedContent;
|
||||
|
||||
if (
|
||||
@@ -490,7 +503,9 @@ class AssetGenerator extends Generator {
|
||||
/** @type {string} */ (module.resourceResolveData.encodedContent)
|
||||
).equals(source.buffer())
|
||||
) {
|
||||
encodedContent = module.resourceResolveData.encodedContent;
|
||||
encodedContent =
|
||||
/** @type {string} */
|
||||
(module.resourceResolveData.encodedContent);
|
||||
} else {
|
||||
encodedContent = encodeDataUri(
|
||||
/** @type {"base64" | false} */ (encoding),
|
||||
@@ -520,10 +535,10 @@ class AssetGenerator extends Generator {
|
||||
concatenationScope
|
||||
} = generateContext;
|
||||
|
||||
/** @type {string} */
|
||||
let content;
|
||||
|
||||
const needContent = type === JAVASCRIPT_TYPE || type === CSS_URL_TYPE;
|
||||
|
||||
const data = getData ? getData() : undefined;
|
||||
|
||||
if (
|
||||
|
||||
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) {
|
||||
|
||||
4
node_modules/webpack/lib/asset/AssetParser.js
generated
vendored
4
node_modules/webpack/lib/asset/AssetParser.js
generated
vendored
@@ -9,17 +9,21 @@ const Parser = require("../Parser");
|
||||
|
||||
/** @typedef {import("../../declarations/WebpackOptions").AssetParserDataUrlOptions} AssetParserDataUrlOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").AssetParserOptions} AssetParserOptions */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../Module").BuildInfo} BuildInfo */
|
||||
/** @typedef {import("../Module").BuildMeta} BuildMeta */
|
||||
/** @typedef {import("../Parser").ParserState} ParserState */
|
||||
/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */
|
||||
|
||||
/** @typedef {((source: string | Buffer, context: { filename: string, module: Module }) => boolean)} AssetParserDataUrlFunction */
|
||||
|
||||
class AssetParser extends Parser {
|
||||
/**
|
||||
* @param {AssetParserOptions["dataUrlCondition"] | boolean} dataUrlCondition condition for inlining as DataUrl
|
||||
*/
|
||||
constructor(dataUrlCondition) {
|
||||
super();
|
||||
/** @type {AssetParserOptions["dataUrlCondition"] | boolean} */
|
||||
this.dataUrlCondition = dataUrlCondition;
|
||||
}
|
||||
|
||||
|
||||
1
node_modules/webpack/lib/asset/AssetSourceGenerator.js
generated
vendored
1
node_modules/webpack/lib/asset/AssetSourceGenerator.js
generated
vendored
@@ -59,6 +59,7 @@ class AssetSourceGenerator extends Generator {
|
||||
const encodedSource =
|
||||
typeof content === "string" ? content : content.toString("utf8");
|
||||
|
||||
/** @type {string} */
|
||||
let sourceContent;
|
||||
if (concatenationScope) {
|
||||
concatenationScope.registerNamespaceExport(
|
||||
|
||||
4
node_modules/webpack/lib/asset/RawDataUrlModule.js
generated
vendored
4
node_modules/webpack/lib/asset/RawDataUrlModule.js
generated
vendored
@@ -22,8 +22,10 @@ const makeSerializable = require("../util/makeSerializable");
|
||||
/** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
|
||||
/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */
|
||||
/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
|
||||
/** @typedef {import("../Module").CodeGenerationResultData} CodeGenerationResultData */
|
||||
/** @typedef {import("../Module").NeedBuildCallback} NeedBuildCallback */
|
||||
/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */
|
||||
/** @typedef {import("../Module").Sources} Sources */
|
||||
/** @typedef {import("../Module").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("../RequestShortener")} RequestShortener */
|
||||
/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */
|
||||
@@ -114,11 +116,13 @@ class RawDataUrlModule extends Module {
|
||||
if (this.url === undefined) {
|
||||
this.url = /** @type {Buffer} */ (this.urlBuffer).toString();
|
||||
}
|
||||
/** @type {Sources} */
|
||||
const sources = new Map();
|
||||
sources.set(
|
||||
JAVASCRIPT_TYPE,
|
||||
new RawSource(`module.exports = ${JSON.stringify(this.url)};`)
|
||||
);
|
||||
/** @type {CodeGenerationResultData} */
|
||||
const data = new Map();
|
||||
data.set("url", {
|
||||
javascript: this.url
|
||||
|
||||
Reference in New Issue
Block a user