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:
root
2025-12-23 07:36:18 +00:00
parent 3cc590186a
commit 3ce82a924a
1256 changed files with 6491 additions and 3989 deletions

View File

@@ -169,6 +169,12 @@ class ModuleGraph {
* @private
*/
this._dependencySourceOrderMap = new WeakMap();
/**
* @type {Set<Module>}
* @private
*/
this._modulesNeedingSort = new Set();
}
/**
@@ -305,17 +311,15 @@ class ModuleGraph {
// import { a, b } from "lib" -> a and b have the same source order -> a = b = 1
// import { d } from "lib/d" -> d = 2
const currentSourceOrder =
/** @type { HarmonyImportSideEffectDependency | HarmonyImportSpecifierDependency} */ (
dependency
).sourceOrder;
/** @type {HarmonyImportSideEffectDependency | HarmonyImportSpecifierDependency} */
(dependency).sourceOrder;
// lib/index.js (reexport)
// import { a } from "lib/a" -> a = 0
// import { b } from "lib/b" -> b = 1
const originSourceOrder =
/** @type { HarmonyImportSideEffectDependency | HarmonyImportSpecifierDependency} */ (
originDependency
).sourceOrder;
/** @type {HarmonyImportSideEffectDependency | HarmonyImportSpecifierDependency} */
(originDependency).sourceOrder;
if (
typeof currentSourceOrder === "number" &&
typeof originSourceOrder === "number"
@@ -330,17 +334,28 @@ class ModuleGraph {
sub: originSourceOrder
});
// Save for later batch sorting
this._modulesNeedingSort.add(parentModule);
}
}
/**
* @returns {void}
*/
finishUpdateParent() {
if (this._modulesNeedingSort.size === 0) {
return;
}
for (const mod of this._modulesNeedingSort) {
// If dependencies like HarmonyImportSideEffectDependency and HarmonyImportSpecifierDependency have a SourceOrder,
// we sort based on it; otherwise, we preserve the original order.
sortWithSourceOrder(
parentModule.dependencies,
this._dependencySourceOrderMap
mod.dependencies,
this._dependencySourceOrderMap,
(dep, index) => this.setParentDependenciesBlockIndex(dep, index)
);
for (const [index, dep] of parentModule.dependencies.entries()) {
this.setParentDependenciesBlockIndex(dep, index);
}
}
this._modulesNeedingSort.clear();
}
/**