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:
15
node_modules/webpack/lib/optimize/RemoveParentModulesPlugin.js
generated
vendored
15
node_modules/webpack/lib/optimize/RemoveParentModulesPlugin.js
generated
vendored
@@ -33,7 +33,7 @@ const THIRTY_TWO_BIGINT = BigInt(32);
|
||||
* Parses the module mask and returns the modules represented by it
|
||||
* @param {bigint} mask the module mask
|
||||
* @param {Module[]} ordinalModules the modules in the order they were added to the mask (LSB is index 0)
|
||||
* @returns {Generator<Module>} the modules represented by the mask
|
||||
* @returns {Generator<Module, undefined, undefined>} the modules represented by the mask
|
||||
*/
|
||||
function* getModulesFromMask(mask, ordinalModules) {
|
||||
let offset = 31;
|
||||
@@ -74,10 +74,13 @@ class RemoveParentModulesPlugin {
|
||||
*/
|
||||
const handler = (chunks, chunkGroups) => {
|
||||
const chunkGraph = compilation.chunkGraph;
|
||||
/** @type {Set<ChunkGroup>} */
|
||||
const queue = new Set();
|
||||
/** @type {WeakMap<ChunkGroup, bigint | undefined>} */
|
||||
const availableModulesMap = new WeakMap();
|
||||
|
||||
let nextModuleMask = ONE_BIGINT;
|
||||
/** @type {WeakMap<Module, bigint>} */
|
||||
const maskByModule = new WeakMap();
|
||||
/** @type {Module[]} */
|
||||
const ordinalModules = [];
|
||||
@@ -99,6 +102,7 @@ class RemoveParentModulesPlugin {
|
||||
};
|
||||
|
||||
// Initialize masks by chunk and by chunk group for quicker comparisons
|
||||
/** @type {WeakMap<Chunk, bigint>} */
|
||||
const chunkMasks = new WeakMap();
|
||||
for (const chunk of chunks) {
|
||||
let mask = ZERO_BIGINT;
|
||||
@@ -109,6 +113,7 @@ class RemoveParentModulesPlugin {
|
||||
chunkMasks.set(chunk, mask);
|
||||
}
|
||||
|
||||
/** @type {WeakMap<ChunkGroup, bigint>} */
|
||||
const chunkGroupMasks = new WeakMap();
|
||||
for (const chunkGroup of chunkGroups) {
|
||||
let mask = ZERO_BIGINT;
|
||||
@@ -143,7 +148,8 @@ class RemoveParentModulesPlugin {
|
||||
const availableModulesInParent = availableModulesMap.get(parent);
|
||||
if (availableModulesInParent !== undefined) {
|
||||
const parentMask =
|
||||
availableModulesInParent | chunkGroupMasks.get(parent);
|
||||
availableModulesInParent |
|
||||
/** @type {bigint} */ (chunkGroupMasks.get(parent));
|
||||
// If we know the available modules in parent: process these
|
||||
if (availableModulesMask === undefined) {
|
||||
// if we have not own info yet: create new entry
|
||||
@@ -181,7 +187,10 @@ class RemoveParentModulesPlugin {
|
||||
);
|
||||
if (availableModulesSets.includes(undefined)) continue; // No info about this chunk group
|
||||
|
||||
const availableModulesMask = intersectMasks(availableModulesSets);
|
||||
const availableModulesMask = intersectMasks(
|
||||
/** @type {bigint[]} */
|
||||
(availableModulesSets)
|
||||
);
|
||||
const toRemoveMask = chunkMask & availableModulesMask;
|
||||
if (toRemoveMask !== ZERO_BIGINT) {
|
||||
for (const module of getModulesFromMask(
|
||||
|
||||
Reference in New Issue
Block a user