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

@@ -10,14 +10,20 @@ const LazySet = require("../util/LazySet");
/** @typedef {import("enhanced-resolve").ResolveContext} ResolveContext */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Compilation").FileSystemDependencies} FileSystemDependencies */
/** @typedef {import("../ResolverFactory").ResolveOptionsWithDependencyType} ResolveOptionsWithDependencyType */
/**
* @template T
* @typedef {Map<string, T>} MatchedConfigsItem
*/
/**
* @template T
* @typedef {object} MatchedConfigs
* @property {Map<string, T>} resolved
* @property {Map<string, T>} unresolved
* @property {Map<string, T>} prefixed
* @property {MatchedConfigsItem<T>} resolved
* @property {MatchedConfigsItem<T>} unresolved
* @property {MatchedConfigsItem<T>} prefixed
*/
/** @type {ResolveOptionsWithDependencyType} */
@@ -30,11 +36,11 @@ const RESOLVE_OPTIONS = { dependencyType: "esm" };
* @returns {Promise<MatchedConfigs<T>>} resolved matchers
*/
module.exports.resolveMatchedConfigs = (compilation, configs) => {
/** @type {Map<string, T>} */
/** @type {MatchedConfigsItem<T>} */
const resolved = new Map();
/** @type {Map<string, T>} */
/** @type {MatchedConfigsItem<T>} */
const unresolved = new Map();
/** @type {Map<string, T>} */
/** @type {MatchedConfigsItem<T>} */
const prefixed = new Map();
/** @type {ResolveContext} */
const resolveContext = {
@@ -84,15 +90,15 @@ module.exports.resolveMatchedConfigs = (compilation, configs) => {
})
).then(() => {
compilation.contextDependencies.addAll(
/** @type {LazySet<string>} */
/** @type {FileSystemDependencies} */
(resolveContext.contextDependencies)
);
compilation.fileDependencies.addAll(
/** @type {LazySet<string>} */
/** @type {FileSystemDependencies} */
(resolveContext.fileDependencies)
);
compilation.missingDependencies.addAll(
/** @type {LazySet<string>} */
/** @type {FileSystemDependencies} */
(resolveContext.missingDependencies)
);
return { resolved, unresolved, prefixed };