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

@@ -6,6 +6,10 @@
"use strict";
const WebpackError = require("./WebpackError");
const makeSerializable = require("./util/makeSerializable");
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/**
* @template T
@@ -22,18 +26,43 @@ class HookWebpackError extends WebpackError {
* @param {string} hook name of hook
*/
constructor(error, hook) {
super(error.message);
super(error ? error.message : undefined, error ? { cause: error } : {});
this.name = "HookWebpackError";
this.hook = hook;
this.error = error;
this.name = "HookWebpackError";
this.hideStack = true;
this.details = `caused by plugins in ${hook}\n${error.stack}`;
this.stack += `\n-- inner error --\n${error ? error.stack : ""}`;
this.details = `caused by plugins in ${hook}\n${error ? error.stack : ""}`;
}
this.stack += `\n-- inner error --\n${error.stack}`;
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.error);
write(this.hook);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.error = read();
this.hook = read();
super.deserialize(context);
}
}
makeSerializable(HookWebpackError, "webpack/lib/HookWebpackError");
module.exports = HookWebpackError;
/**