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

@@ -296,6 +296,7 @@ class BasicEvaluatedExpression {
if (this.isBigInt()) return `${this.bigint}`;
if (this.isRegExp()) return `${this.regExp}`;
if (this.isArray()) {
/** @type {string[]} */
const array = [];
for (const item of /** @type {BasicEvaluatedExpression[]} */ (
this.items

View File

@@ -8,16 +8,19 @@
/** @typedef {import("../../declarations/WebpackOptions").ChunkLoadingType} ChunkLoadingType */
/** @typedef {import("../Compiler")} Compiler */
/** @type {WeakMap<Compiler, Set<ChunkLoadingType>>} */
/** @typedef {Set<ChunkLoadingType>} ChunkLoadingTypes */
/** @type {WeakMap<Compiler, ChunkLoadingTypes>} */
const enabledTypes = new WeakMap();
/**
* @param {Compiler} compiler compiler
* @returns {Set<ChunkLoadingType>} enabled types
* @returns {ChunkLoadingTypes} enabled types
*/
const getEnabledTypes = (compiler) => {
let set = enabledTypes.get(compiler);
if (set === undefined) {
/** @type {ChunkLoadingTypes} */
set = new Set();
enabledTypes.set(compiler, set);
}

View File

@@ -32,7 +32,7 @@ const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const { last, someInIterable } = require("../util/IterableHelpers");
const StringXor = require("../util/StringXor");
const { compareModulesByIdOrIdentifier } = require("../util/comparators");
const { compareModulesByFullName } = require("../util/comparators");
const {
RESERVED_NAMES,
addScopeSymbols,
@@ -59,17 +59,21 @@ const JavascriptParser = require("./JavascriptParser");
/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */
/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */
/** @typedef {import("../Compilation").ExecuteModuleObject} ExecuteModuleObject */
/** @typedef {import("../Compilation").WebpackRequire} WebpackRequire */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../DependencyTemplates")} DependencyTemplates */
/** @typedef {import("../Entrypoint")} Entrypoint */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../Module").BuildInfo} BuildInfo */
/** @typedef {import("../Module").CodeGenerationResultData} CodeGenerationResultData */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("../TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("../WebpackError")} WebpackError */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../util/Hash")} Hash */
/** @typedef {import("../util/concatenate").ScopeSet} ScopeSet */
/** @typedef {import("../util/concatenate").UsedNamesInScopeInfo} UsedNamesInScopeInfo */
/**
* @param {Chunk} chunk a chunk
@@ -278,7 +282,7 @@ class JavascriptModulesPlugin {
constructor(options = {}) {
this.options = options;
/** @type {WeakMap<Source, { source: Source, needModule:boolean, needExports: boolean, needRequire: boolean, needThisAsExports: boolean, needStrict: boolean | undefined, renderShorthand: boolean }>} */
/** @type {WeakMap<Source, { source: Source, needModule: boolean, needExports: boolean, needRequire: boolean, needThisAsExports: boolean, needStrict: boolean | undefined, renderShorthand: boolean }>} */
this._moduleFactoryCache = new WeakMap();
}
@@ -354,6 +358,7 @@ class JavascriptModulesPlugin {
outputOptions
);
/** @type {() => Source} */
let render;
if (hotUpdateChunk) {
@@ -535,6 +540,7 @@ class JavascriptModulesPlugin {
const { module } = options;
const code = source.source();
/** @type {(this: ExecuteModuleObject["exports"], exports: ExecuteModuleObject["exports"], moduleObject: ExecuteModuleObject, webpackRequire: WebpackRequire) => void} */
const fn = vm.runInThisContext(
`(function(${module.moduleArgument}, ${module.exportsArgument}, ${RuntimeGlobals.require}) {\n${code}\n/**/})`,
{
@@ -552,7 +558,8 @@ class JavascriptModulesPlugin {
moduleObject.exports,
moduleObject,
moduleObject.exports,
context.__webpack_require__
/** @type {WebpackRequire} */
(context.__webpack_require__)
);
} catch (err) {
/** @type {Error} */
@@ -569,6 +576,7 @@ class JavascriptModulesPlugin {
let code = source.source();
if (typeof code !== "string") code = code.toString();
/** @type {(this: null, webpackRequire: WebpackRequire) => void} */
const fn = vm.runInThisContext(
`(function(${RuntimeGlobals.require}) {\n${code}\n/**/})`,
{
@@ -578,7 +586,11 @@ class JavascriptModulesPlugin {
);
try {
// eslint-disable-next-line no-useless-call
fn.call(null, context.__webpack_require__);
fn.call(
null,
/** @type {WebpackRequire} */
(context.__webpack_require__)
);
} catch (err) {
/** @type {Error} */
(err).stack += printGeneratedCodeForStack(options.module, code);
@@ -638,6 +650,7 @@ class JavascriptModulesPlugin {
hooks.renderModuleContent.call(moduleSource, module, renderContext),
"JavascriptModulesPlugin.getCompilationHooks().renderModuleContent"
);
/** @type {Source} */
let moduleSourcePostContainer;
if (factory) {
const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements(
@@ -660,6 +673,7 @@ class JavascriptModulesPlugin {
);
const renderShorthand =
renderInObject === true && runtimeTemplate.supportsMethodShorthand();
/** @type {Source} */
let source;
if (
cacheEntry &&
@@ -673,6 +687,7 @@ class JavascriptModulesPlugin {
source = cacheEntry.source;
} else {
const factorySource = new ConcatSource();
/** @type {string[]} */
const args = [];
if (needExports || needRequire || needModule) {
args.push(
@@ -747,13 +762,14 @@ class JavascriptModulesPlugin {
* @returns {Source} the rendered source
*/
renderChunk(renderContext, hooks) {
const { chunk, chunkGraph } = renderContext;
const { chunk, chunkGraph, runtimeTemplate } = renderContext;
const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType(
chunk,
JAVASCRIPT_TYPE,
compareModulesByIdOrIdentifier(chunkGraph)
compareModulesByFullName(runtimeTemplate.compilation.compiler)
);
const allModules = modules ? [...modules] : [];
/** @type {undefined | string} */
let strictHeader;
let allStrict = renderContext.strictMode;
if (
@@ -838,7 +854,7 @@ class JavascriptModulesPlugin {
...(chunkGraph.getOrderedChunkModulesIterableBySourceType(
chunk,
JAVASCRIPT_TYPE,
compareModulesByIdOrIdentifier(chunkGraph)
compareModulesByFullName(runtimeTemplate.compilation.compiler)
) || [])
];
@@ -850,6 +866,7 @@ class JavascriptModulesPlugin {
}
const source = new ConcatSource();
/** @type {string} */
let prefix;
if (iife) {
if (runtimeTemplate.supportsArrowFunction()) {
@@ -1026,6 +1043,7 @@ class JavascriptModulesPlugin {
);
if (renderedModule) {
/** @type {string} */
let footer;
if (iife !== undefined) {
startupSource.add(
@@ -1209,7 +1227,7 @@ class JavascriptModulesPlugin {
requireFunction || interceptModuleExecution || moduleUsed;
/**
* @type {{startup: string[], beforeStartup: string[], header: string[], afterStartup: string[], allowInlineStartup: boolean}}
* @type {{ startup: string[], beforeStartup: string[], header: string[], afterStartup: string[], allowInlineStartup: boolean }}
*/
const result = {
header: [],
@@ -1334,6 +1352,7 @@ class JavascriptModulesPlugin {
result.allowInlineStartup = false;
}
/** @type {undefined | CodeGenerationResultData} */
let data;
if (codeGenerationResults.has(entryModule, chunk.runtime)) {
const result = codeGenerationResults.get(
@@ -1766,7 +1785,9 @@ class JavascriptModulesPlugin {
}
for (const variable of info.variables) {
/** @type {UsedNamesInScopeInfo} */
const usedNamesInScopeInfo = new Map();
/** @type {ScopeSet} */
const ignoredScopes = new Set();
const name = variable.name;

View File

@@ -318,7 +318,7 @@ class VariableInfo {
/** @typedef {Literal | string | null | undefined} ImportSource */
/**
* @typedef {Omit<ParseOptions, "sourceType"> & {sourceType: "module" | "script" | "auto"}} InternalParseOptions
* @typedef {Omit<ParseOptions, "sourceType"> & { sourceType: "module" | "script" | "auto" }} InternalParseOptions
*/
/**
@@ -347,12 +347,13 @@ class VariableInfo {
/** @typedef {symbol} Tag */
/** @typedef {import("../dependencies/HarmonyImportDependencyParserPlugin").HarmonySettings} HarmonySettings */
/** @typedef {import("../dependencies/HarmonyImportDependencyParserPlugin").HarmonySpecifierGuards} HarmonySpecifierGuards */
/** @typedef {import("../dependencies/ImportParserPlugin").ImportSettings} ImportSettings */
/** @typedef {import("../dependencies/CommonJsImportsParserPlugin").CommonJsImportSettings} CommonJsImportSettings */
/** @typedef {import("../CompatibilityPlugin").CompatibilitySettings} CompatibilitySettings */
/** @typedef {import("../optimize/InnerGraph").TopLevelSymbol} TopLevelSymbol */
/** @typedef {HarmonySettings | ImportSettings | CommonJsImportSettings | TopLevelSymbol | CompatibilitySettings} KnownTagData */
/** @typedef {HarmonySettings | ImportSettings | CommonJsImportSettings | TopLevelSymbol | CompatibilitySettings | HarmonySpecifierGuards} KnownTagData */
/** @typedef {KnownTagData | Record<string, EXPECTED_ANY>} TagData */
/**
@@ -519,6 +520,8 @@ class JavascriptParser extends Parser {
statement: new SyncBailHook(["statement"]),
/** @type {SyncBailHook<[IfStatement], boolean | void>} */
statementIf: new SyncBailHook(["statement"]),
/** @type {SyncBailHook<[Expression], ((walk: () => void) => void) | void>} */
collectGuards: new SyncBailHook(["expression"]),
/** @type {SyncBailHook<[Expression, ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration], boolean | void>} */
classExtendsExpression: new SyncBailHook([
"expression",
@@ -747,6 +750,7 @@ class JavascriptParser extends Parser {
return;
}
/** @type {undefined | string} */
let regExp;
const arg1 = expr.arguments[0];
@@ -769,6 +773,7 @@ class JavascriptParser extends Parser {
);
}
/** @type {undefined | string} */
let flags;
const arg2 = expr.arguments[1];
@@ -1597,7 +1602,7 @@ class JavascriptParser extends Parser {
const arg1Eval = this.evaluateExpression(arg1);
if (!arg1Eval.isString()) return;
const arg1Value = /** @type {string} */ (arg1Eval.string);
/** @type {number} */
let result;
if (arg2) {
if (arg2.type === "SpreadElement") return;
@@ -1642,7 +1647,9 @@ class JavascriptParser extends Parser {
.for(fn)
.tap(CLASS_NAME, (expr, param) => {
if (!param.isString()) return;
/** @type {BasicEvaluatedExpression} */
let arg1;
/** @type {string} */
let result;
const str = /** @type {string} */ (param.string);
switch (expr.arguments.length) {
@@ -1682,7 +1689,7 @@ class JavascriptParser extends Parser {
/**
* @param {"cooked" | "raw"} kind kind of values to get
* @param {TemplateLiteral} templateLiteralExpr TemplateLiteral expr
* @returns {{quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[]}} Simplified template
* @returns {{ quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[] }} Simplified template
*/
const getSimplifiedTemplateResult = (kind, templateLiteralExpr) => {
/** @type {BasicEvaluatedExpression[]} */
@@ -1764,7 +1771,8 @@ class JavascriptParser extends Parser {
.for("concat")
.tap(CLASS_NAME, (expr, param) => {
if (!param.isString() && !param.isWrapped()) return;
let stringSuffix = null;
/** @type {undefined | BasicEvaluatedExpression} */
let stringSuffix;
let hasUnknownParams = false;
/** @type {BasicEvaluatedExpression[]} */
const innerExpressions = [];
@@ -1840,6 +1848,7 @@ class JavascriptParser extends Parser {
if (!param.isString()) return;
if (expr.arguments.length !== 1) return;
if (expr.arguments[0].type === "SpreadElement") return;
/** @type {string[]} */
let result;
const arg = this.evaluateExpression(expr.arguments[0]);
if (arg.isString()) {
@@ -1865,6 +1874,7 @@ class JavascriptParser extends Parser {
const condition = this.evaluateExpression(expr.test);
const conditionValue = condition.asBool();
/** @type {BasicEvaluatedExpression} */
let res;
if (conditionValue === undefined) {
const consequent = this.evaluateExpression(expr.consequent);
@@ -1983,6 +1993,7 @@ class JavascriptParser extends Parser {
this.walkExpression(classy.superClass);
}
if (classy.body && classy.body.type === "ClassBody") {
/** @type {Identifier[]} */
const scopeParams = [];
// Add class name in scope for recursive calls
if (classy.id) {
@@ -2318,8 +2329,16 @@ class JavascriptParser extends Parser {
walkIfStatement(statement) {
const result = this.hooks.statementIf.call(statement);
if (result === undefined) {
this.walkExpression(statement.test);
this.walkNestedStatement(statement.consequent);
const inGuard = this.hooks.collectGuards.call(statement.test);
if (inGuard) {
inGuard(() => {
this.walkExpression(statement.test);
this.walkNestedStatement(statement.consequent);
});
} else {
this.walkExpression(statement.test);
this.walkNestedStatement(statement.consequent);
}
const consequentTerminated = this.scope.terminated;
this.scope.terminated = undefined;
@@ -3704,8 +3723,16 @@ class JavascriptParser extends Parser {
walkConditionalExpression(expression) {
const result = this.hooks.expressionConditionalOperator.call(expression);
if (result === undefined) {
this.walkExpression(expression.test);
this.walkExpression(expression.consequent);
const inGuard = this.hooks.collectGuards.call(expression.test);
if (inGuard) {
inGuard(() => {
this.walkExpression(expression.test);
this.walkExpression(expression.consequent);
});
} else {
this.walkExpression(expression.test);
this.walkExpression(expression.consequent);
}
if (expression.alternate) {
this.walkExpression(expression.alternate);
@@ -4220,6 +4247,7 @@ class JavascriptParser extends Parser {
* @returns {R | undefined} result of hook
*/
callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args) {
/** @type {string} */
let name;
if (typeof info === "string") {
name = info;
@@ -4247,7 +4275,7 @@ class JavascriptParser extends Parser {
}
return;
}
name = info.name;
name = /** @type {string} */ (info.name);
}
const hook = hookMap.get(name);
if (hook !== undefined) {
@@ -4255,7 +4283,7 @@ class JavascriptParser extends Parser {
if (result !== undefined) return result;
}
if (fallback !== undefined) {
return fallback(/** @type {string} */ (name));
return fallback(name);
}
}
@@ -4891,7 +4919,7 @@ class JavascriptParser extends Parser {
]).some(
(comment) =>
comment.type === "Block" &&
/^\s*(#|@)__PURE__\s*$/.test(comment.value)
/^\s*(?:#|@)__PURE__\s*$/.test(comment.value)
);
if (!pureFlag) return false;
commentsStartPos = /** @type {Range} */ (expr.callee.range)[1];
@@ -5187,8 +5215,11 @@ class JavascriptParser extends Parser {
extractMemberExpressionChain(expression) {
/** @type {Node} */
let expr = expression;
/** @type {Members} */
const members = [];
/** @type {MembersOptionals} */
const membersOptionals = [];
/** @type {MemberRanges} */
const memberRanges = [];
while (expr.type === "MemberExpression") {
if (expr.computed) {
@@ -5214,10 +5245,11 @@ class JavascriptParser extends Parser {
/**
* @param {string} varName variable name
* @returns {{name: string, info: VariableInfo | string} | undefined} name of the free variable and variable info for that
* @returns {{ name: string, info: VariableInfo | string } | undefined} name of the free variable and variable info for that
*/
getFreeInfoFromVariable(varName) {
const info = this.getVariableInfo(varName);
/** @type {string} */
let name;
if (info instanceof VariableInfo && info.name) {
if (!info.isFree()) return;
@@ -5232,10 +5264,11 @@ class JavascriptParser extends Parser {
/**
* @param {string} varName variable name
* @returns {{name: string, info: VariableInfo | string} | undefined} name of the free variable and variable info for that
* @returns {{ name: string, info: VariableInfo | string } | undefined} name of the free variable and variable info for that
*/
getNameInfoFromVariable(varName) {
const info = this.getVariableInfo(varName);
/** @type {string} */
let name;
if (info instanceof VariableInfo && info.name) {
if (!info.isFree() && !info.isTagged()) return;