Enhance refactor commands with controller-aware Route() updates and fix code quality violations
Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
86
node_modules/webpack/lib/optimize/SplitChunksPlugin.js
generated
vendored
86
node_modules/webpack/lib/optimize/SplitChunksPlugin.js
generated
vendored
@@ -21,12 +21,11 @@ const { makePathsRelative } = require("../util/identifier");
|
||||
const memoize = require("../util/memoize");
|
||||
const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
|
||||
/** @typedef {import("../../declarations/WebpackOptions").HashFunction} HashFunction */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksCacheGroup} OptimizationSplitChunksCacheGroup */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksGetCacheGroups} OptimizationSplitChunksGetCacheGroups */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksOptions} OptimizationSplitChunksOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksSizes} OptimizationSplitChunksSizes */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").Output} OutputOptions */
|
||||
/** @typedef {import("../config/defaults").OutputNormalizedWithDefaults} OutputOptions */
|
||||
/** @typedef {import("../Chunk").ChunkName} ChunkName */
|
||||
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
||||
/** @typedef {import("../ChunkGroup")} ChunkGroup */
|
||||
@@ -37,10 +36,8 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
/** @typedef {import("../util/deterministicGrouping").GroupedItems<Module>} DeterministicGroupingGroupedItemsForModule */
|
||||
/** @typedef {import("../util/deterministicGrouping").Options<Module>} DeterministicGroupingOptionsForModule */
|
||||
|
||||
/** @typedef {Record<string, number>} SplitChunksSizes */
|
||||
|
||||
/**
|
||||
* @callback ChunkFilterFunction
|
||||
* @callback ChunkFilterFn
|
||||
* @param {Chunk} chunk
|
||||
* @returns {boolean | undefined}
|
||||
*/
|
||||
@@ -52,12 +49,17 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
* @returns {number}
|
||||
*/
|
||||
|
||||
/** @typedef {string} SourceType */
|
||||
/** @typedef {SourceType[]} SourceTypes */
|
||||
/** @typedef {SourceType[]} DefaultSizeTypes */
|
||||
/** @typedef {Record<SourceType, number>} SplitChunksSizes */
|
||||
|
||||
/**
|
||||
* @typedef {object} CacheGroupSource
|
||||
* @property {string} key
|
||||
* @property {number=} priority
|
||||
* @property {GetName=} getName
|
||||
* @property {ChunkFilterFunction=} chunksFilter
|
||||
* @property {GetNameFn=} getName
|
||||
* @property {ChunkFilterFn=} chunksFilter
|
||||
* @property {boolean=} enforce
|
||||
* @property {SplitChunksSizes} minSize
|
||||
* @property {SplitChunksSizes} minSizeReduction
|
||||
@@ -79,8 +81,8 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
* @typedef {object} CacheGroup
|
||||
* @property {string} key
|
||||
* @property {number} priority
|
||||
* @property {GetName=} getName
|
||||
* @property {ChunkFilterFunction} chunksFilter
|
||||
* @property {GetNameFn=} getName
|
||||
* @property {ChunkFilterFn} chunksFilter
|
||||
* @property {SplitChunksSizes} minSize
|
||||
* @property {SplitChunksSizes} minSizeReduction
|
||||
* @property {SplitChunksSizes} minRemainingSize
|
||||
@@ -103,7 +105,7 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
|
||||
/**
|
||||
* @typedef {object} FallbackCacheGroup
|
||||
* @property {ChunkFilterFunction} chunksFilter
|
||||
* @property {ChunkFilterFn} chunksFilter
|
||||
* @property {SplitChunksSizes} minSize
|
||||
* @property {SplitChunksSizes} maxAsyncSize
|
||||
* @property {SplitChunksSizes} maxInitialSize
|
||||
@@ -124,17 +126,17 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
*/
|
||||
|
||||
/**
|
||||
* @callback GetName
|
||||
* @callback GetNameFn
|
||||
* @param {Module} module
|
||||
* @param {Chunk[]} chunks
|
||||
* @param {string} key
|
||||
* @returns {string=}
|
||||
* @returns {string | undefined}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} SplitChunksOptions
|
||||
* @property {ChunkFilterFunction} chunksFilter
|
||||
* @property {string[]} defaultSizeTypes
|
||||
* @property {ChunkFilterFn} chunksFilter
|
||||
* @property {DefaultSizeTypes} defaultSizeTypes
|
||||
* @property {SplitChunksSizes} minSize
|
||||
* @property {SplitChunksSizes} minSizeReduction
|
||||
* @property {SplitChunksSizes} minRemainingSize
|
||||
@@ -148,7 +150,7 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
* @property {TemplatePath=} filename
|
||||
* @property {string} automaticNameDelimiter
|
||||
* @property {GetCacheGroups} getCacheGroups
|
||||
* @property {GetName} getName
|
||||
* @property {GetNameFn} getName
|
||||
* @property {boolean} usedExports
|
||||
* @property {FallbackCacheGroup} fallbackCacheGroup
|
||||
*/
|
||||
@@ -159,13 +161,13 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
||||
* @property {CacheGroup} cacheGroup
|
||||
* @property {number} cacheGroupIndex
|
||||
* @property {string=} name
|
||||
* @property {Record<string, number>} sizes
|
||||
* @property {Record<SourceType, number>} sizes
|
||||
* @property {Set<Chunk>} chunks
|
||||
* @property {Set<Chunk>} reusableChunks
|
||||
* @property {Set<bigint | Chunk>} chunksKeys
|
||||
*/
|
||||
|
||||
/** @type {GetName} */
|
||||
/** @type {GetNameFn} */
|
||||
const defaultGetName = () => undefined;
|
||||
|
||||
const deterministicGroupingForModules =
|
||||
@@ -184,7 +186,7 @@ const hashFilename = (name, outputOptions) => {
|
||||
const digest =
|
||||
/** @type {string} */
|
||||
(
|
||||
createHash(/** @type {HashFunction} */ (outputOptions.hashFunction))
|
||||
createHash(outputOptions.hashFunction)
|
||||
.update(name)
|
||||
.digest(outputOptions.hashDigest)
|
||||
);
|
||||
@@ -286,7 +288,7 @@ const ALL_CHUNK_FILTER = (_chunk) => true;
|
||||
|
||||
/**
|
||||
* @param {OptimizationSplitChunksSizes | undefined} value the sizes
|
||||
* @param {string[]} defaultSizeTypes the default size types
|
||||
* @param {DefaultSizeTypes} defaultSizeTypes the default size types
|
||||
* @returns {SplitChunksSizes} normalized representation
|
||||
*/
|
||||
const normalizeSizes = (value, defaultSizeTypes) => {
|
||||
@@ -379,7 +381,7 @@ const checkMinSizeReduction = (sizes, minSizeReduction, chunkCount) => {
|
||||
/**
|
||||
* @param {SplitChunksSizes} sizes the sizes
|
||||
* @param {SplitChunksSizes} minSize the min sizes
|
||||
* @returns {undefined | string[]} list of size types that are below min size
|
||||
* @returns {undefined | SourceTypes} list of size types that are below min size
|
||||
*/
|
||||
const getViolatingMinSizes = (sizes, minSize) => {
|
||||
let list;
|
||||
@@ -408,20 +410,20 @@ const totalSize = (sizes) => {
|
||||
|
||||
/**
|
||||
* @param {OptimizationSplitChunksCacheGroup["name"]} name the chunk name
|
||||
* @returns {GetName | undefined} a function to get the name of the chunk
|
||||
* @returns {GetNameFn | undefined} a function to get the name of the chunk
|
||||
*/
|
||||
const normalizeName = (name) => {
|
||||
if (typeof name === "string") {
|
||||
return () => name;
|
||||
}
|
||||
if (typeof name === "function") {
|
||||
return /** @type {GetName} */ (name);
|
||||
return /** @type {GetNameFn} */ (name);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {OptimizationSplitChunksCacheGroup["chunks"]} chunks the chunk filter option
|
||||
* @returns {ChunkFilterFunction | undefined} the chunk filter function
|
||||
* @returns {ChunkFilterFn | undefined} the chunk filter function
|
||||
*/
|
||||
const normalizeChunksFilter = (chunks) => {
|
||||
if (chunks === "initial") {
|
||||
@@ -443,7 +445,7 @@ const normalizeChunksFilter = (chunks) => {
|
||||
|
||||
/**
|
||||
* @param {undefined | GetCacheGroups | Record<string, false | string | RegExp | OptimizationSplitChunksGetCacheGroups | OptimizationSplitChunksCacheGroup>} cacheGroups the cache group options
|
||||
* @param {string[]} defaultSizeTypes the default size types
|
||||
* @param {DefaultSizeTypes} defaultSizeTypes the default size types
|
||||
* @returns {GetCacheGroups} a function to get the cache groups
|
||||
*/
|
||||
const normalizeCacheGroups = (cacheGroups, defaultSizeTypes) => {
|
||||
@@ -586,7 +588,7 @@ const checkModuleLayer = (test, module) => {
|
||||
/**
|
||||
* @param {OptimizationSplitChunksCacheGroup} options the group options
|
||||
* @param {string} key key of cache group
|
||||
* @param {string[]} defaultSizeTypes the default size types
|
||||
* @param {DefaultSizeTypes} defaultSizeTypes the default size types
|
||||
* @returns {CacheGroupSource} the normalized cached group
|
||||
*/
|
||||
const createCacheGroupSource = (options, key, defaultSizeTypes) => {
|
||||
@@ -653,7 +655,7 @@ module.exports = class SplitChunksPlugin {
|
||||
/** @type {SplitChunksOptions} */
|
||||
this.options = {
|
||||
chunksFilter:
|
||||
/** @type {ChunkFilterFunction} */
|
||||
/** @type {ChunkFilterFn} */
|
||||
(normalizeChunksFilter(options.chunks || "all")),
|
||||
defaultSizeTypes,
|
||||
minSize,
|
||||
@@ -684,13 +686,13 @@ module.exports = class SplitChunksPlugin {
|
||||
defaultSizeTypes
|
||||
),
|
||||
getName: options.name
|
||||
? /** @type {GetName} */ (normalizeName(options.name))
|
||||
? /** @type {GetNameFn} */ (normalizeName(options.name))
|
||||
: defaultGetName,
|
||||
automaticNameDelimiter: options.automaticNameDelimiter || "-",
|
||||
usedExports: options.usedExports || false,
|
||||
fallbackCacheGroup: {
|
||||
chunksFilter:
|
||||
/** @type {ChunkFilterFunction} */
|
||||
/** @type {ChunkFilterFn} */
|
||||
(
|
||||
normalizeChunksFilter(
|
||||
fallbackCacheGroup.chunks || options.chunks || "all"
|
||||
@@ -947,15 +949,17 @@ module.exports = class SplitChunksPlugin {
|
||||
return { chunkSetsInGraph, singleChunkSets };
|
||||
});
|
||||
|
||||
/** @typedef {Map<number, Set<Chunk>[]>} ChunkSetsByCount */
|
||||
|
||||
// group these set of chunks by count
|
||||
// to allow to check less sets via isSubset
|
||||
// (only smaller sets can be subset)
|
||||
/**
|
||||
* @param {IterableIterator<Set<Chunk>>} chunkSets set of sets of chunks
|
||||
* @returns {Map<number, Array<Set<Chunk>>>} map of sets of chunks by count
|
||||
* @returns {ChunkSetsByCount} map of sets of chunks by count
|
||||
*/
|
||||
const groupChunkSetsByCount = (chunkSets) => {
|
||||
/** @type {Map<number, Array<Set<Chunk>>>} */
|
||||
/** @type {ChunkSetsByCount} */
|
||||
const chunkSetsByCount = new Map();
|
||||
for (const chunksSet of chunkSets) {
|
||||
const count = chunksSet.size;
|
||||
@@ -979,19 +983,21 @@ module.exports = class SplitChunksPlugin {
|
||||
)
|
||||
);
|
||||
|
||||
/** @typedef {(Set<Chunk> | Chunk)[]} Combinations */
|
||||
|
||||
// Create a list of possible combinations
|
||||
/**
|
||||
* @param {Map<bigint | Chunk, Set<Chunk>>} chunkSets chunk sets
|
||||
* @param {Set<Chunk>} singleChunkSets single chunks sets
|
||||
* @param {Map<number, Set<Chunk>[]>} chunkSetsByCount chunk sets by count
|
||||
* @returns {(key: bigint | Chunk) => (Set<Chunk> | Chunk)[]} combinations
|
||||
* @returns {(key: bigint | Chunk) => Combinations} combinations
|
||||
*/
|
||||
const createGetCombinations = (
|
||||
chunkSets,
|
||||
singleChunkSets,
|
||||
chunkSetsByCount
|
||||
) => {
|
||||
/** @type {Map<bigint | Chunk, (Set<Chunk> | Chunk)[]>} */
|
||||
/** @type {Map<bigint | Chunk, Combinations>} */
|
||||
const combinationsCache = new Map();
|
||||
|
||||
return (key) => {
|
||||
@@ -1005,7 +1011,7 @@ module.exports = class SplitChunksPlugin {
|
||||
const chunksSet =
|
||||
/** @type {Set<Chunk>} */
|
||||
(chunkSets.get(key));
|
||||
/** @type {(Set<Chunk> | Chunk)[]} */
|
||||
/** @type {Combinations} */
|
||||
const array = [chunksSet];
|
||||
for (const [count, setArray] of chunkSetsByCount) {
|
||||
// "equal" is not needed because they would have been merge in the first step
|
||||
@@ -1038,7 +1044,7 @@ module.exports = class SplitChunksPlugin {
|
||||
|
||||
/**
|
||||
* @param {bigint | Chunk} key key
|
||||
* @returns {(Set<Chunk> | Chunk)[]} combinations by key
|
||||
* @returns {Combinations} combinations by key
|
||||
*/
|
||||
const getCombinations = (key) => getCombinationsFactory()(key);
|
||||
|
||||
@@ -1053,7 +1059,7 @@ module.exports = class SplitChunksPlugin {
|
||||
});
|
||||
/**
|
||||
* @param {bigint | Chunk} key key
|
||||
* @returns {(Set<Chunk> | Chunk)[]} exports combinations by key
|
||||
* @returns {Combinations} exports combinations by key
|
||||
*/
|
||||
const getExportsCombinations = (key) =>
|
||||
getExportsCombinationsFactory()(key);
|
||||
@@ -1064,14 +1070,14 @@ module.exports = class SplitChunksPlugin {
|
||||
* @property {bigint | Chunk} key a key of the list
|
||||
*/
|
||||
|
||||
/** @type {WeakMap<Set<Chunk> | Chunk, WeakMap<ChunkFilterFunction, SelectedChunksResult>>} */
|
||||
/** @type {WeakMap<Set<Chunk> | Chunk, WeakMap<ChunkFilterFn, SelectedChunksResult>>} */
|
||||
const selectedChunksCacheByChunksSet = new WeakMap();
|
||||
|
||||
/**
|
||||
* get list and key by applying the filter function to the list
|
||||
* It is cached for performance reasons
|
||||
* @param {Set<Chunk> | Chunk} chunks list of chunks
|
||||
* @param {ChunkFilterFunction} chunkFilter filter function for chunks
|
||||
* @param {ChunkFilterFn} chunkFilter filter function for chunks
|
||||
* @returns {SelectedChunksResult} list and key
|
||||
*/
|
||||
const getSelectedChunks = (chunks, chunkFilter) => {
|
||||
@@ -1132,7 +1138,7 @@ module.exports = class SplitChunksPlugin {
|
||||
// Determine name for split chunk
|
||||
|
||||
const name =
|
||||
/** @type {GetName} */
|
||||
/** @type {GetNameFn} */
|
||||
(cacheGroup.getName)(module, selectedChunks, cacheGroup.key);
|
||||
// Check if the name is ok
|
||||
const existingChunk = name && compilation.namedChunks.get(name);
|
||||
@@ -1294,7 +1300,7 @@ module.exports = class SplitChunksPlugin {
|
||||
const { chunks: selectedChunks, key: selectedChunksKey } =
|
||||
getSelectedChunks(
|
||||
chunkCombination,
|
||||
/** @type {ChunkFilterFunction} */
|
||||
/** @type {ChunkFilterFn} */
|
||||
(cacheGroup.chunksFilter)
|
||||
);
|
||||
|
||||
@@ -1316,7 +1322,7 @@ module.exports = class SplitChunksPlugin {
|
||||
|
||||
/**
|
||||
* @param {ChunksInfoItem} info entry
|
||||
* @param {string[]} sourceTypes source types to be removed
|
||||
* @param {SourceTypes} sourceTypes source types to be removed
|
||||
*/
|
||||
const removeModulesWithSourceType = (info, sourceTypes) => {
|
||||
for (const module of info.modules) {
|
||||
|
||||
Reference in New Issue
Block a user