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:
32
node_modules/webpack/lib/stats/DefaultStatsFactoryPlugin.js
generated
vendored
32
node_modules/webpack/lib/stats/DefaultStatsFactoryPlugin.js
generated
vendored
@@ -386,12 +386,10 @@ const uniqueOrderedArray = (items, selector, comparator) =>
|
||||
* @returns {MappedValues<T, R>} mapped object
|
||||
*/
|
||||
const mapObject = (obj, fn) => {
|
||||
/** @type {MappedValues<T, R>} */
|
||||
const newObj = Object.create(null);
|
||||
for (const key of Object.keys(obj)) {
|
||||
newObj[key] = fn(
|
||||
obj[/** @type {keyof T} */ (key)],
|
||||
/** @type {keyof T} */ (key)
|
||||
);
|
||||
for (const key of /** @type {(keyof T)[]} */ (Object.keys(obj))) {
|
||||
newObj[key] = fn(obj[key], key);
|
||||
}
|
||||
return newObj;
|
||||
};
|
||||
@@ -507,8 +505,8 @@ const EXTRACT_ERROR = {
|
||||
object.details = /** @type {WebpackError} */ (error).details;
|
||||
}
|
||||
},
|
||||
errorStack: (object, error) => {
|
||||
if (typeof error !== "string") {
|
||||
errorStack: (object, error, _context, { errorStack }) => {
|
||||
if (typeof error !== "string" && errorStack) {
|
||||
object.stack = error.stack;
|
||||
}
|
||||
},
|
||||
@@ -545,6 +543,8 @@ const EXTRACT_ERROR = {
|
||||
}
|
||||
};
|
||||
|
||||
/** @typedef {((value: string) => boolean)} FilterItemTypeFn */
|
||||
|
||||
/** @type {SimpleExtractors} */
|
||||
const SIMPLE_EXTRACTORS = {
|
||||
compilation: {
|
||||
@@ -587,6 +587,7 @@ const SIMPLE_EXTRACTORS = {
|
||||
const util = require("util");
|
||||
|
||||
object.logging = {};
|
||||
/** @type {Set<keyof LogType>} */
|
||||
let acceptedTypes;
|
||||
let collapsedGroups = false;
|
||||
switch (logging) {
|
||||
@@ -677,6 +678,7 @@ const SIMPLE_EXTRACTORS = {
|
||||
if (depthInCollapsedGroup > 0) depthInCollapsedGroup--;
|
||||
continue;
|
||||
}
|
||||
/** @type {undefined | string} */
|
||||
let message;
|
||||
if (entry.type === LogType.time) {
|
||||
const [label, first, second] =
|
||||
@@ -1229,7 +1231,7 @@ const SIMPLE_EXTRACTORS = {
|
||||
const codeGenerated = compilation.codeGeneratedModules.has(module);
|
||||
const buildTimeExecuted =
|
||||
compilation.buildTimeExecutedModules.has(module);
|
||||
/** @type {{[x: string]: number}} */
|
||||
/** @type {{ [x: string]: number }} */
|
||||
const sizes = {};
|
||||
for (const sourceType of module.getSourceTypes()) {
|
||||
sizes[sourceType] = module.size(sourceType);
|
||||
@@ -1826,6 +1828,7 @@ const getTotalItems = (children) => {
|
||||
*/
|
||||
const collapse = (children) => {
|
||||
// After collapse each child must take exactly one line
|
||||
/** @type {Children<T>[]} */
|
||||
const newChildren = [];
|
||||
for (const child of children) {
|
||||
if (child.children) {
|
||||
@@ -1872,6 +1875,7 @@ const spaceLimited = (
|
||||
/** @type {number[]} */
|
||||
const groupSizes = [];
|
||||
// This are the items, which take 1 line each
|
||||
/** @type {Children<T>[]} */
|
||||
const items = [];
|
||||
// The total of group sizes
|
||||
let groupsSize = 0;
|
||||
@@ -1907,6 +1911,7 @@ const spaceLimited = (
|
||||
if (limit < max) {
|
||||
// calculate how much we are over the size limit
|
||||
// this allows to approach the limit faster
|
||||
/** @type {number} */
|
||||
let oversize;
|
||||
// If each group would take 1 line the total would be below the maximum
|
||||
// collapse some groups, keep items
|
||||
@@ -2097,6 +2102,8 @@ const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;
|
||||
* @typedef {BaseGroup & { children: T[], size: number }} BaseGroupWithChildren
|
||||
*/
|
||||
|
||||
/** @typedef {(name: string, asset: StatsAsset) => boolean} AssetFilterItemFn */
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* _: (groupConfigs: GroupConfig<KnownStatsAsset, BaseGroup & { filteredChildren: number, size: number } | BaseGroupWithChildren<KnownStatsAsset>>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void,
|
||||
@@ -2256,6 +2263,8 @@ const ASSETS_GROUPERS = {
|
||||
* }} ModulesGroupers
|
||||
*/
|
||||
|
||||
/** @typedef {(name: string, module: StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean} ModuleFilterItemTypeFn */
|
||||
|
||||
/**
|
||||
* @type {(type: ExcludeModulesType) => ModulesGroupers}
|
||||
*/
|
||||
@@ -2377,6 +2386,7 @@ const MODULES_GROUPERS = (type) => ({
|
||||
const pathMatch =
|
||||
groupModulesByPath && GROUP_PATH_REGEXP.exec(resource);
|
||||
const path = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
|
||||
/** @type {string[]} */
|
||||
const keys = [];
|
||||
if (groupModulesByPath) {
|
||||
if (extension) {
|
||||
@@ -2442,9 +2452,7 @@ const MODULES_GROUPERS = (type) => ({
|
||||
});
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* groupReasonsByOrigin: (groupConfigs: GroupConfig<KnownStatsModuleReason, BaseGroup & { module: string, children: KnownStatsModuleReason[], active: boolean }>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void
|
||||
* }} ModuleReasonsGroupers
|
||||
* @typedef {{ groupReasonsByOrigin: (groupConfigs: GroupConfig<KnownStatsModuleReason, BaseGroup & { module: string, children: KnownStatsModuleReason[], active: boolean }>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void }} ModuleReasonsGroupers
|
||||
*/
|
||||
|
||||
/** @type {ModuleReasonsGroupers} */
|
||||
@@ -2541,7 +2549,7 @@ const sortByField = (field) => {
|
||||
/**
|
||||
* @typedef {{
|
||||
* assetsSort: (comparators: Comparator<Asset>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void,
|
||||
* _: (comparators: Comparator<Asset>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void
|
||||
* _: (comparators: Comparator<Asset>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void,
|
||||
* }} AssetSorters
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user