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

@@ -7,6 +7,7 @@
const { SyncWaterfallHook } = require("tapable");
const Compilation = require("../Compilation");
const { CSS_TYPE } = require("../ModuleSourceTypeConstants");
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
@@ -86,7 +87,7 @@ class CssLoadingRuntimeModule extends RuntimeModule {
* @returns {boolean} true, if the chunk has css
*/
(chunk, chunkGraph) =>
Boolean(chunkGraph.getChunkModulesIterableBySourceType(chunk, "css"))
Boolean(chunkGraph.getChunkModulesIterableBySourceType(chunk, CSS_TYPE))
);
const hasCssMatcher = compileBooleanMatcher(conditionMap);
@@ -429,7 +430,7 @@ class CssLoadingRuntimeModule extends RuntimeModule {
"while(oldTags.length) {",
Template.indent([
"var oldTag = oldTags.pop();",
"if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"
"if(oldTag && oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"
]),
"}"
])}, apply: ${runtimeTemplate.basicFunction("", [
@@ -451,17 +452,24 @@ class CssLoadingRuntimeModule extends RuntimeModule {
`${
RuntimeGlobals.hmrDownloadUpdateHandlers
}.css = ${runtimeTemplate.basicFunction(
"chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList",
"chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList, css",
[
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
"applyHandlers.push(applyHandler);",
"// Read CSS removed chunks from update manifest",
"var cssRemovedChunks = css && css.r;",
`chunkIds.forEach(${runtimeTemplate.basicFunction("chunkId", [
`var filename = ${RuntimeGlobals.getChunkCssFilename}(chunkId);`,
`var url = ${RuntimeGlobals.publicPath} + filename;`,
"var oldTag = loadStylesheet(chunkId, url);",
"if(!oldTag) return;",
`if(!oldTag && !${withHmr} ) return;`,
"// Skip if CSS was removed",
"if(cssRemovedChunks && cssRemovedChunks.indexOf(chunkId) >= 0) {",
Template.indent(["oldTags.push(oldTag);", "return;"]),
"}",
"",
"// create error before stack unwound to get useful stacktrace later",
"var error = new Error();",
`promises.push(new Promise(${runtimeTemplate.basicFunction(