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

@@ -111,11 +111,11 @@ class WebpackOptionsApply extends OptionsApply {
const NodeTargetPlugin = require("./node/NodeTargetPlugin");
// Some older versions of Node.js don't support all built-in modules via import, only via `require`,
// but шt seems like there shouldn't be a warning here since these versions are rarely used in real applications
// but it seems like there shouldn't be a warning here since these versions are rarely used in real applications
new NodeTargetPlugin(
options.output.module &&
compiler.platform.node === null &&
compiler.platform.web === null
compiler.platform.node === null &&
compiler.platform.web === null
? "module-import"
: "node-commonjs"
).apply(compiler);
@@ -408,6 +408,39 @@ class WebpackOptionsApply extends OptionsApply {
typeof options.experiments.lazyCompilation === "object"
? options.experiments.lazyCompilation
: {};
const isUniversalTarget =
options.output.module &&
compiler.platform.node === null &&
compiler.platform.web === null;
if (isUniversalTarget) {
const emitter = require.resolve("../hot/emitter-event-target.js");
const NormalModuleReplacementPlugin = require("./NormalModuleReplacementPlugin");
// Override emitter that using `EventEmitter` to `EventTarget`
// TODO webpack6 - migrate to `EventTarget` by default
new NormalModuleReplacementPlugin(/emitter(\.js)?$/, (result) => {
if (
/webpack[/\\]hot|webpack-dev-server[/\\]client|webpack-hot-middleware[/\\]client/.test(
result.context
)
) {
result.request = emitter;
}
return result;
}).apply(compiler);
}
const backend = require.resolve(
isUniversalTarget
? "../hot/lazy-compilation-universal.js"
: `../hot/lazy-compilation-${
options.externalsPresets.node ? "node" : "web"
}.js`
);
new LazyCompilationPlugin({
backend:
typeof lazyOptions.backend === "function"
@@ -415,12 +448,7 @@ class WebpackOptionsApply extends OptionsApply {
: require("./hmr/lazyCompilationBackend")({
...lazyOptions.backend,
client:
(lazyOptions.backend && lazyOptions.backend.client) ||
require.resolve(
`../hot/lazy-compilation-${
options.externalsPresets.node ? "node" : "web"
}.js`
)
(lazyOptions.backend && lazyOptions.backend.client) || backend
}),
entries: !lazyOptions || lazyOptions.entries !== false,
imports: !lazyOptions || lazyOptions.imports !== false,