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:
root
2026-02-20 11:31:28 +00:00
parent d01a6179aa
commit b5eb27a827
1690 changed files with 47348 additions and 16848 deletions

View File

@@ -48,8 +48,11 @@ class AbstractLibraryPlugin {
* @param {AbstractLibraryPluginOptions} options options
*/
constructor({ pluginName, type }) {
/** @type {AbstractLibraryPluginOptions["pluginName"]} */
this._pluginName = pluginName;
/** @type {AbstractLibraryPluginOptions["type"]} */
this._type = type;
/** @type {WeakMap<LibraryOptions, T>} */
this._parseCache = new WeakMap();
}
@@ -236,7 +239,7 @@ class AbstractLibraryPlugin {
/**
* @abstract
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const AbstractMethodError = require("../AbstractMethodError");

View File

@@ -47,12 +47,13 @@ class AmdLibraryPlugin extends AbstractLibraryPlugin {
pluginName: "AmdLibraryPlugin",
type: options.type
});
/** @type {AmdLibraryPluginOptions["requireAsWrapper"]} */
this.requireAsWrapper = options.requireAsWrapper;
}
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const { name, amdContainer } = library;

View File

@@ -33,7 +33,7 @@ const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
*/
const KEYWORD_REGEX =
/^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/;
/^(?:await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/;
const IDENTIFIER_REGEX =
/^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu;
@@ -128,15 +128,19 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin {
pluginName: "AssignLibraryPlugin",
type: options.type
});
/** @type {AssignLibraryPluginOptions["prefix"]} */
this.prefix = options.prefix;
/** @type {AssignLibraryPluginOptions["declare"]} */
this.declare = options.declare;
/** @type {AssignLibraryPluginOptions["unnamed"]} */
this.unnamed = options.unnamed;
/** @type {AssignLibraryPluginOptions["named"]} */
this.named = options.named || "assign";
}
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const { name } = library;

View File

@@ -25,6 +25,7 @@ const enabledTypes = new WeakMap();
const getEnabledTypes = (compiler) => {
let set = enabledTypes.get(compiler);
if (set === undefined) {
/** @type {LibraryTypes} */
set = new Set();
enabledTypes.set(compiler, set);
}

View File

@@ -51,7 +51,7 @@ class ExportPropertyLibraryPlugin extends AbstractLibraryPlugin {
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
return {

View File

@@ -48,7 +48,7 @@ class JsonpLibraryPlugin extends AbstractLibraryPlugin {
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const { name } = library;

View File

@@ -7,11 +7,13 @@
const { ConcatSource } = require("webpack-sources");
const { UsageState } = require("../ExportsInfo");
const ExternalModule = require("../ExternalModule");
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const HarmonyExportImportedSpecifierDependency = require("../dependencies/HarmonyExportImportedSpecifierDependency");
const ConcatenatedModule = require("../optimize/ConcatenatedModule");
const propertyAccess = require("../util/propertyAccess");
const { getEntryRuntime } = require("../util/runtime");
const { getEntryRuntime, getRuntimeKey } = require("../util/runtime");
const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
/** @typedef {import("webpack-sources").Source} Source */
@@ -20,11 +22,14 @@ const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
/** @typedef {import("../../declarations/WebpackOptions").LibraryExport} LibraryExport */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */
/** @typedef {import("../javascript/JavascriptModulesPlugin").ModuleRenderContext} ModuleRenderContext */
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
/**
* @template T
@@ -76,17 +81,20 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
/** @type {BuildMeta} */
const buildMeta = module.buildMeta || (module.buildMeta = {});
/** @type {BuildMeta["exportsSourceByRuntime"]} */
const exportsSourceByRuntime =
buildMeta.exportsSourceByRuntime ||
(buildMeta.exportsSourceByRuntime = new Map());
/** @type {BuildMeta["exportsFinalNameByRuntime"]} */
const exportsFinalNameByRuntime =
buildMeta.exportsFinalNameByRuntime ||
(buildMeta.exportsFinalNameByRuntime = new Map());
for (const runtime of runtimes) {
exportsSourceByRuntime.set(runtime, source);
exportsFinalNameByRuntime.set(runtime, finalName);
const key = getRuntimeKey(runtime);
exportsSourceByRuntime.set(key, source);
exportsFinalNameByRuntime.set(key, finalName);
}
return true;
@@ -116,8 +124,13 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
exportsInfo.canMangleUse = false;
} else {
const exportsInfo = moduleGraph.getExportsInfo(module);
// If the entry module is commonjs, its exports cannot be mangled
if (module.buildMeta && module.buildMeta.treatAsCommonJs) {
if (
// If the entry module is commonjs, its exports cannot be mangled
(module.buildMeta && module.buildMeta.treatAsCommonJs) ||
// The entry module provides unknown exports
exportsInfo._otherExportsInfo.provided === null
) {
exportsInfo.setUsedInUnknownWay(runtime);
} else {
exportsInfo.setAllKnownExportsUsed(runtime);
@@ -128,7 +141,7 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const { name } = library;
@@ -144,6 +157,94 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
};
}
/**
* @param {Source} source source
* @param {Module} module module
* @param {ModuleGraph} moduleGraph moduleGraph
* @param {RuntimeSpec} runtime chunk runtime
* @param {[string, string][]} exports exports
* @param {Set<string>} alreadyRenderedExports already rendered exports
* @returns {ConcatSource} source with null provided exports
*/
_analyzeUnknownProvidedExports(
source,
module,
moduleGraph,
runtime,
exports,
alreadyRenderedExports
) {
const result = new ConcatSource(source);
/** @type {Set<string>} */
const moduleRequests = new Set();
/** @type {Map<string, string>} */
const unknownProvidedExports = new Map();
/**
* @param {Module} module the module
* @param {boolean} isDynamicReexport if module is dynamic reexported
*/
const resolveDynamicStarReexport = (module, isDynamicReexport) => {
for (const connection of moduleGraph.getOutgoingConnections(module)) {
const dep = connection.dependency;
// Only handle star-reexport statement
if (
dep instanceof HarmonyExportImportedSpecifierDependency &&
dep.name === null
) {
const importedModule = connection.resolvedModule;
const importedModuleExportsInfo =
moduleGraph.getExportsInfo(importedModule);
// The imported module provides unknown exports
// So keep the reexports rendered in the bundle
if (
dep.getMode(moduleGraph, runtime).type === "dynamic-reexport" &&
importedModuleExportsInfo._otherExportsInfo.provided === null
) {
// Handle export * from 'external'
if (importedModule instanceof ExternalModule) {
moduleRequests.add(importedModule.userRequest);
} else {
resolveDynamicStarReexport(importedModule, true);
}
}
// If importer modules existing `dynamic-reexport` dependency
// We should keep export statement rendered in the bundle
else if (isDynamicReexport) {
for (const exportInfo of importedModuleExportsInfo.orderedExports) {
if (!exportInfo.provided || exportInfo.name === "default") {
continue;
}
const originalName = exportInfo.name;
const usedName = exportInfo.getUsedName(originalName, runtime);
if (!alreadyRenderedExports.has(originalName) && usedName) {
unknownProvidedExports.set(originalName, usedName);
}
}
}
}
}
};
resolveDynamicStarReexport(module, false);
for (const request of moduleRequests) {
result.add(`export * from "${request}";\n`);
}
for (const [origin, used] of unknownProvidedExports) {
exports.push([
origin,
`${RuntimeGlobals.exports}${propertyAccess([used])}`
]);
}
return result;
}
/**
* @param {Source} source source
* @param {Module} module module
@@ -164,9 +265,8 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
},
{ options, compilation }
) {
const result = new ConcatSource(source);
const exportsInfo = options.export
let result = new ConcatSource(source);
const exportInfos = options.export
? [
moduleGraph.getExportInfo(
module,
@@ -178,7 +278,9 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
const exportsFinalNameByRuntime =
(module.buildMeta &&
module.buildMeta.exportsFinalNameByRuntime &&
module.buildMeta.exportsFinalNameByRuntime.get(chunk.runtime)) ||
module.buildMeta.exportsFinalNameByRuntime.get(
getRuntimeKey(chunk.runtime)
)) ||
{};
const definitions =
@@ -188,6 +290,9 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
const shortHandedExports = [];
/** @type {[string, string][]} */
const exports = [];
/** @type {Set<string>} */
const alreadyRenderedExports = new Set();
const isAsync = moduleGraph.isAsync(module);
const treatAsCommonJs =
@@ -200,7 +305,7 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
);
}
outer: for (const exportInfo of exportsInfo) {
outer: for (const exportInfo of exportInfos) {
if (!exportInfo.provided) continue;
const originalName = exportInfo.name;
@@ -273,6 +378,8 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
: `${finalName} as ${originalName}`
);
}
alreadyRenderedExports.add(originalName);
}
if (treatAsCommonJs) {
@@ -283,6 +390,15 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
result.add(`export { ${shortHandedExports.join(", ")} };\n`);
}
result = this._analyzeUnknownProvidedExports(
result,
module,
moduleGraph,
chunk.runtime,
exports,
alreadyRenderedExports
);
for (const [exportName, final] of exports) {
result.add(
`export ${runtimeTemplate.renderConst()} ${exportName} = ${final};\n`
@@ -308,9 +424,10 @@ class ModuleLibraryPlugin extends AbstractLibraryPlugin {
const exportsSource =
module.buildMeta &&
module.buildMeta.exportsSourceByRuntime &&
module.buildMeta.exportsSourceByRuntime.get(chunk.runtime);
module.buildMeta.exportsSourceByRuntime.get(getRuntimeKey(chunk.runtime));
// Re-add the module's exports source when rendered in factory or as an inlined startup module wrapped in an IIFE
// Re-add the module's exports source when rendered in factory
// or as an inlined startup module wrapped in an IIFE
if ((inlinedInIIFE || factory) && exportsSource) {
return new ConcatSource(exportsSource, source);
}

View File

@@ -17,6 +17,7 @@ const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */
/** @typedef {import("../ExportsInfo").ExportInfoName} ExportInfoName */
/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */
/** @typedef {import("../util/Hash")} Hash */
/**
@@ -51,7 +52,7 @@ class SystemLibraryPlugin extends AbstractLibraryPlugin {
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
const { name } = library;
@@ -128,7 +129,9 @@ class SystemLibraryPlugin extends AbstractLibraryPlugin {
const otherUnused =
exportsInfo.otherExportsInfo.getUsed(chunk.runtime) ===
UsageState.Unused;
/** @type {string[]} */
const instructions = [];
/** @type {ExportInfoName[]} */
const handledNames = [];
for (const exportInfo of exportsInfo.orderedExports) {
const used = exportInfo.getUsedName(

View File

@@ -83,12 +83,13 @@ class UmdLibraryPlugin extends AbstractLibraryPlugin {
type: options.type
});
/** @type {UmdLibraryPluginOptions["optionalAmdExternalAsGlobal"]} */
this.optionalAmdExternalAsGlobal = options.optionalAmdExternalAsGlobal;
}
/**
* @param {LibraryOptions} library normalized library option
* @returns {T | false} preprocess as needed by overriding
* @returns {T} preprocess as needed by overriding
*/
parseOptions(library) {
/** @type {LibraryName | undefined} */
@@ -207,7 +208,6 @@ class UmdLibraryPlugin extends AbstractLibraryPlugin {
replaceKeys(
externals
.map((m) => {
let expr;
let request = m.request;
if (typeof request === "object") {
request =
@@ -219,7 +219,7 @@ class UmdLibraryPlugin extends AbstractLibraryPlugin {
`Missing external configuration for type:${type}`
);
}
expr = Array.isArray(request)
let expr = Array.isArray(request)
? `require(${JSON.stringify(
request[0]
)})${accessorToObjectAccess(request.slice(1))}`
@@ -258,6 +258,7 @@ class UmdLibraryPlugin extends AbstractLibraryPlugin {
)
);
/** @type {string} */
let amdFactory;
if (optionalExternals.length > 0) {
const wrapperArguments = externalsArguments(requiredExternals);