Add JS-CATCH-FALLBACK-01 rule and update npm packages
Add PHP-ALIAS-01 rule: prohibit field aliasing in serialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
16
node_modules/webpack/lib/ChunkGraph.js
generated
vendored
Executable file → Normal file
16
node_modules/webpack/lib/ChunkGraph.js
generated
vendored
Executable file → Normal file
@@ -35,8 +35,9 @@ const {
|
||||
/** @typedef {import("./Chunk").Entrypoints} Entrypoints */
|
||||
/** @typedef {import("./Chunk").ChunkId} ChunkId */
|
||||
/** @typedef {import("./ChunkGroup")} ChunkGroup */
|
||||
/** @typedef {import("./Generator").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("./Module")} Module */
|
||||
/** @typedef {import("./Module").SourceType} SourceType */
|
||||
/** @typedef {import("./Module").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("./Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
|
||||
/** @typedef {import("./Module").RuntimeRequirements} RuntimeRequirements */
|
||||
/** @typedef {import("./ModuleGraph")} ModuleGraph */
|
||||
@@ -97,7 +98,7 @@ const getModuleRuntimes = (chunks) => {
|
||||
* @returns {(set: SortableSet<Module>) => Map<string, SortableSet<Module>>} modules by source type
|
||||
*/
|
||||
const modulesBySourceType = (sourceTypesByModule) => (set) => {
|
||||
/** @type {Map<string, SortableSet<Module>>} */
|
||||
/** @type {Map<SourceType, SortableSet<Module>>} */
|
||||
const map = new Map();
|
||||
for (const module of set) {
|
||||
const sourceTypes =
|
||||
@@ -220,7 +221,7 @@ class ChunkGraphModule {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {WeakMap<Module, Set<string>>} SourceTypesByModule */
|
||||
/** @typedef {WeakMap<Module, SourceTypes>} SourceTypesByModule */
|
||||
/** @typedef {Map<Module, Entrypoint>} EntryModules */
|
||||
|
||||
class ChunkGraphChunk {
|
||||
@@ -631,7 +632,7 @@ class ChunkGraph {
|
||||
/**
|
||||
* @param {Chunk} chunk chunk
|
||||
* @param {Module} module chunk module
|
||||
* @param {Set<string>} sourceTypes source types
|
||||
* @param {SourceTypes} sourceTypes source types
|
||||
*/
|
||||
setChunkModuleSourceTypes(chunk, module, sourceTypes) {
|
||||
const cgc = this._getChunkGraphChunk(chunk);
|
||||
@@ -668,10 +669,11 @@ class ChunkGraph {
|
||||
|
||||
/**
|
||||
* @param {Module} module module
|
||||
* @returns {Set<string> | undefined} source types
|
||||
* @returns {SourceTypes | undefined} source types
|
||||
*/
|
||||
_getOverwrittenModuleSourceTypes(module) {
|
||||
let newSet = false;
|
||||
/** @type {Set<SourceType> | undefined} */
|
||||
let sourceTypes;
|
||||
for (const chunk of this.getModuleChunksIterable(module)) {
|
||||
const cgc = this._getChunkGraphChunk(chunk);
|
||||
@@ -679,7 +681,7 @@ class ChunkGraph {
|
||||
const st = cgc.sourceTypesByModule.get(module);
|
||||
if (st === undefined) return;
|
||||
if (!sourceTypes) {
|
||||
sourceTypes = st;
|
||||
sourceTypes = /** @type {Set<SourceType>} */ (st);
|
||||
} else if (!newSet) {
|
||||
for (const type of st) {
|
||||
if (!newSet) {
|
||||
@@ -871,7 +873,7 @@ class ChunkGraph {
|
||||
/**
|
||||
* @param {Chunk} chunkA first chunk
|
||||
* @param {Chunk} chunkB second chunk
|
||||
* @returns {-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order
|
||||
* @returns {-1 | 0 | 1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order
|
||||
*/
|
||||
compareChunks(chunkA, chunkB) {
|
||||
const cgcA = this._getChunkGraphChunk(chunkA);
|
||||
|
||||
Reference in New Issue
Block a user