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:
52
node_modules/webpack/lib/optimize/ConcatenatedModule.js
generated
vendored
52
node_modules/webpack/lib/optimize/ConcatenatedModule.js
generated
vendored
@@ -72,6 +72,7 @@ const {
|
||||
/** @typedef {import("../Module").FileSystemDependencies} FileSystemDependencies */
|
||||
/** @typedef {import("../Module").BuildMeta} BuildMeta */
|
||||
/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */
|
||||
/** @typedef {import("../Module").CodeGenerationResultData} CodeGenerationResultData */
|
||||
/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
|
||||
/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */
|
||||
/** @typedef {import("../Module").LibIdent} LibIdent */
|
||||
@@ -90,7 +91,8 @@ const {
|
||||
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
|
||||
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
||||
/** @typedef {import("../util/Hash")} Hash */
|
||||
/** @typedef {typeof import("../util/Hash")} HashConstructor */
|
||||
/** @typedef {import("../util/Hash").HashFunction} HashFunction */
|
||||
/** @typedef {import("../util/concatenate").UsedNames} UsedNames */
|
||||
/** @typedef {import("../util/concatenate").ScopeInfo} ScopeInfo */
|
||||
/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
|
||||
/** @typedef {import("../util/identifier").AssociatedObjectForCache} AssociatedObjectForCache */
|
||||
@@ -227,6 +229,7 @@ const compareNumbers = (a, b) => {
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
const bySourceOrder = createComparator("sourceOrder", compareNumbers);
|
||||
const byRangeStart = createComparator("rangeStart", compareNumbers);
|
||||
|
||||
@@ -653,7 +656,9 @@ const getFinalName = (
|
||||
);
|
||||
{
|
||||
const { ids, comment } = binding;
|
||||
/** @type {string} */
|
||||
let reference;
|
||||
/** @type {boolean} */
|
||||
let isPropertyAccess;
|
||||
if ("rawName" in binding) {
|
||||
reference = `${binding.rawName}${comment || ""}${propertyAccess(ids)}`;
|
||||
@@ -705,7 +710,7 @@ class ConcatenatedModule extends Module {
|
||||
* @param {RuntimeSpec} runtime the runtime
|
||||
* @param {Compilation} compilation the compilation
|
||||
* @param {AssociatedObjectForCache=} associatedObjectForCache object for caching
|
||||
* @param {string | HashConstructor=} hashFunction hash function to use
|
||||
* @param {HashFunction=} hashFunction hash function to use
|
||||
* @returns {ConcatenatedModule} the module
|
||||
*/
|
||||
static create(
|
||||
@@ -854,6 +859,7 @@ class ConcatenatedModule extends Module {
|
||||
const { moduleArgument, exportsArgument } =
|
||||
/** @type {BuildInfo} */
|
||||
(rootModule.buildInfo);
|
||||
/** @type {BuildInfo} */
|
||||
this.buildInfo = {
|
||||
strict: true,
|
||||
cacheable: true,
|
||||
@@ -872,8 +878,7 @@ class ConcatenatedModule extends Module {
|
||||
for (const m of this._modules) {
|
||||
// populate cacheable
|
||||
if (!(/** @type {BuildInfo} */ (m.buildInfo).cacheable)) {
|
||||
/** @type {BuildInfo} */
|
||||
(this.buildInfo).cacheable = false;
|
||||
this.buildInfo.cacheable = false;
|
||||
}
|
||||
|
||||
// populate dependencies
|
||||
@@ -911,7 +916,7 @@ class ConcatenatedModule extends Module {
|
||||
const { assets, assetsInfo, topLevelDeclarations, needCreateRequire } =
|
||||
/** @type {BuildInfo} */ (m.buildInfo);
|
||||
|
||||
const buildInfo = /** @type {BuildInfo} */ (this.buildInfo);
|
||||
const buildInfo = this.buildInfo;
|
||||
|
||||
// populate topLevelDeclarations
|
||||
if (topLevelDeclarations) {
|
||||
@@ -1209,7 +1214,7 @@ class ConcatenatedModule extends Module {
|
||||
* @param {Module} rootModule the root module of the concatenation
|
||||
* @param {Set<Module>} modules all modules in the concatenation (including the root module)
|
||||
* @param {AssociatedObjectForCache=} associatedObjectForCache object for caching
|
||||
* @param {string | HashConstructor=} hashFunction hash function to use
|
||||
* @param {HashFunction=} hashFunction hash function to use
|
||||
* @returns {string} the identifier
|
||||
*/
|
||||
static _createIdentifier(
|
||||
@@ -1222,6 +1227,7 @@ class ConcatenatedModule extends Module {
|
||||
/** @type {string} */ (rootModule.context),
|
||||
associatedObjectForCache
|
||||
);
|
||||
/** @type {string[]} */
|
||||
const identifiers = [];
|
||||
for (const module of modules) {
|
||||
identifiers.push(cachedMakePathsRelative(module.identifier()));
|
||||
@@ -1316,6 +1322,7 @@ class ConcatenatedModule extends Module {
|
||||
const usedNamesInScopeInfo = new Map();
|
||||
|
||||
// Set of already checked scopes
|
||||
/** @type {Set<Scope>} */
|
||||
const ignoredScopes = new Set();
|
||||
|
||||
// get all global names
|
||||
@@ -1329,14 +1336,17 @@ class ConcatenatedModule extends Module {
|
||||
// The super class expression in class scopes behaves weird
|
||||
// We get ranges of all super class expressions to make
|
||||
// renaming to work correctly
|
||||
/** @typedef {{ range: Range, variables: Variable[] }} ClassInfo */
|
||||
/** @type {WeakMap<Scope, ClassInfo[]>} */
|
||||
const superClassCache = new WeakMap();
|
||||
/**
|
||||
* @param {Scope} scope scope
|
||||
* @returns {{ range: Range, variables: Variable[] }[]} result
|
||||
* @returns {ClassInfo[]} result
|
||||
*/
|
||||
const getSuperClassExpressions = (scope) => {
|
||||
const cacheEntry = superClassCache.get(scope);
|
||||
if (cacheEntry !== undefined) return cacheEntry;
|
||||
/** @type {ClassInfo[]} */
|
||||
const superClassExpressions = [];
|
||||
for (const childScope of scope.childScopes) {
|
||||
if (childScope.type !== "class") continue;
|
||||
@@ -1462,6 +1472,7 @@ class ConcatenatedModule extends Module {
|
||||
info.module.identifier(),
|
||||
name
|
||||
);
|
||||
/** @type {UsedNames} */
|
||||
const referencesUsedNames = new Set();
|
||||
for (const ref of references) {
|
||||
addScopeSymbols(
|
||||
@@ -1533,11 +1544,12 @@ class ConcatenatedModule extends Module {
|
||||
topLevelDeclarations.add(name);
|
||||
}
|
||||
}
|
||||
/** @type {string} */
|
||||
let namespaceObjectName;
|
||||
if (info.namespaceExportSymbol) {
|
||||
namespaceObjectName = info.internalNames.get(
|
||||
info.namespaceExportSymbol
|
||||
);
|
||||
namespaceObjectName =
|
||||
/** @type {string} */
|
||||
(info.internalNames.get(info.namespaceExportSymbol));
|
||||
} else {
|
||||
namespaceObjectName = findNewName(
|
||||
"namespaceObject",
|
||||
@@ -1547,13 +1559,8 @@ class ConcatenatedModule extends Module {
|
||||
);
|
||||
allUsedNames.add(namespaceObjectName);
|
||||
}
|
||||
info.namespaceObjectName =
|
||||
/** @type {string} */
|
||||
(namespaceObjectName);
|
||||
topLevelDeclarations.add(
|
||||
/** @type {string} */
|
||||
(namespaceObjectName)
|
||||
);
|
||||
info.namespaceObjectName = namespaceObjectName;
|
||||
topLevelDeclarations.add(namespaceObjectName);
|
||||
break;
|
||||
}
|
||||
case "external": {
|
||||
@@ -1636,13 +1643,15 @@ class ConcatenatedModule extends Module {
|
||||
if (info.type === "concatenated") {
|
||||
const globalScope = /** @type {Scope} */ (info.globalScope);
|
||||
// group references by name
|
||||
/** @type {Map<string, Reference[]>} */
|
||||
const referencesByName = new Map();
|
||||
for (const reference of globalScope.through) {
|
||||
const name = reference.identifier.name;
|
||||
if (!referencesByName.has(name)) {
|
||||
referencesByName.set(name, []);
|
||||
}
|
||||
referencesByName.get(name).push(reference);
|
||||
/** @type {Reference[]} */
|
||||
(referencesByName.get(name)).push(reference);
|
||||
}
|
||||
for (const [name, references] of referencesByName) {
|
||||
const match = ConcatenationScope.matchModuleReference(name);
|
||||
@@ -1775,6 +1784,7 @@ class ConcatenatedModule extends Module {
|
||||
|
||||
// define exports
|
||||
if (exportsMap.size > 0) {
|
||||
/** @type {string[]} */
|
||||
const definitions = [];
|
||||
for (const [key, value] of exportsMap) {
|
||||
definitions.push(
|
||||
@@ -1826,9 +1836,11 @@ class ConcatenatedModule extends Module {
|
||||
}
|
||||
|
||||
// generate namespace objects
|
||||
/** @type {Map<ConcatenatedModuleInfo, string>} */
|
||||
const namespaceObjectSources = new Map();
|
||||
for (const info of neededNamespaceObjects) {
|
||||
if (info.namespaceExportSymbol) continue;
|
||||
/** @type {string[]} */
|
||||
const nsObj = [];
|
||||
const exportsInfo = moduleGraph.getExportsInfo(info.module);
|
||||
for (const exportInfo of exportsInfo.orderedExports) {
|
||||
@@ -1924,6 +1936,7 @@ ${defineGetters}`
|
||||
|
||||
// evaluate modules in order
|
||||
for (const rawInfo of modulesWithInfo) {
|
||||
/** @type {undefined | string} */
|
||||
let name;
|
||||
let isConditional = false;
|
||||
const info = rawInfo.type === "reference" ? rawInfo.target : rawInfo;
|
||||
@@ -2012,6 +2025,7 @@ ${defineGetters}`
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {CodeGenerationResultData} */
|
||||
const data = new Map();
|
||||
if (chunkInitFragments.length > 0) {
|
||||
data.set("chunkInitFragments", chunkInitFragments);
|
||||
@@ -2038,7 +2052,7 @@ ${defineGetters}`
|
||||
* @param {RuntimeSpec} runtime runtime
|
||||
* @param {RuntimeSpec[]} runtimes runtimes
|
||||
* @param {CodeGenerationResults} codeGenerationResults codeGenerationResults
|
||||
* @param {Set<string>} usedNames used names
|
||||
* @param {UsedNames} usedNames used names
|
||||
*/
|
||||
_analyseModule(
|
||||
modulesMap,
|
||||
|
||||
Reference in New Issue
Block a user