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:
19
node_modules/webpack/lib/util/hash/BatchedHash.js
generated
vendored
Executable file → Normal file
19
node_modules/webpack/lib/util/hash/BatchedHash.js
generated
vendored
Executable file → Normal file
@@ -6,6 +6,7 @@
|
||||
"use strict";
|
||||
|
||||
const Hash = require("../Hash");
|
||||
const { digest, update } = require("./hash-digest");
|
||||
const MAX_SHORT_STRING = require("./wasm-hash").MAX_SHORT_STRING;
|
||||
|
||||
/** @typedef {import("../../../declarations/WebpackOptions").HashDigest} Encoding */
|
||||
@@ -51,9 +52,9 @@ class BatchedHash extends Hash {
|
||||
return this;
|
||||
}
|
||||
if (this.encoding) {
|
||||
this.hash.update(this.string, this.encoding);
|
||||
update(this.hash, this.string, this.encoding);
|
||||
} else {
|
||||
this.hash.update(this.string);
|
||||
update(this.hash, this.string);
|
||||
}
|
||||
this.string = undefined;
|
||||
}
|
||||
@@ -66,12 +67,12 @@ class BatchedHash extends Hash {
|
||||
this.string = data;
|
||||
this.encoding = inputEncoding;
|
||||
} else if (inputEncoding) {
|
||||
this.hash.update(data, inputEncoding);
|
||||
update(this.hash, data, inputEncoding);
|
||||
} else {
|
||||
this.hash.update(data);
|
||||
update(this.hash, data);
|
||||
}
|
||||
} else {
|
||||
this.hash.update(data);
|
||||
update(this.hash, data);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -95,15 +96,15 @@ class BatchedHash extends Hash {
|
||||
digest(encoding) {
|
||||
if (this.string !== undefined) {
|
||||
if (this.encoding) {
|
||||
this.hash.update(this.string, this.encoding);
|
||||
update(this.hash, this.string, this.encoding);
|
||||
} else {
|
||||
this.hash.update(this.string);
|
||||
update(this.hash, this.string);
|
||||
}
|
||||
}
|
||||
if (!encoding) {
|
||||
return this.hash.digest();
|
||||
return digest(this.hash);
|
||||
}
|
||||
return this.hash.digest(encoding);
|
||||
return digest(this.hash, encoding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user