Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
4
node_modules/webpack/lib/util/hash/BatchedHash.js
generated
vendored
4
node_modules/webpack/lib/util/hash/BatchedHash.js
generated
vendored
@@ -7,6 +7,7 @@
|
||||
|
||||
const Hash = require("../Hash");
|
||||
const { digest, update } = require("./hash-digest");
|
||||
/** @type {number} */
|
||||
const MAX_SHORT_STRING = require("./wasm-hash").MAX_SHORT_STRING;
|
||||
|
||||
/** @typedef {import("../../../declarations/WebpackOptions").HashDigest} Encoding */
|
||||
@@ -17,8 +18,11 @@ class BatchedHash extends Hash {
|
||||
*/
|
||||
constructor(hash) {
|
||||
super();
|
||||
/** @type {undefined | string} */
|
||||
this.string = undefined;
|
||||
/** @type {undefined | Encoding} */
|
||||
this.encoding = undefined;
|
||||
/** @type {Hash} */
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
|
||||
9
node_modules/webpack/lib/util/hash/BulkUpdateHash.js
generated
vendored
9
node_modules/webpack/lib/util/hash/BulkUpdateHash.js
generated
vendored
@@ -15,7 +15,7 @@ const BULK_SIZE = 3;
|
||||
|
||||
// We are using an object instead of a Map as this will stay static during the runtime
|
||||
// so access to it can be optimized by v8
|
||||
/** @type {{[key: string]: Map<string, string>}} */
|
||||
/** @type {{ [key: string]: Map<string, string> }} */
|
||||
const digestCaches = {};
|
||||
|
||||
class BulkUpdateHash extends Hash {
|
||||
@@ -25,14 +25,20 @@ class BulkUpdateHash extends Hash {
|
||||
*/
|
||||
constructor(hashOrFactory, hashKey) {
|
||||
super();
|
||||
/** @type {undefined | string} */
|
||||
this.hashKey = hashKey;
|
||||
if (typeof hashOrFactory === "function") {
|
||||
/** @type {undefined | HashFactory} */
|
||||
this.hashFactory = hashOrFactory;
|
||||
/** @type {undefined | Hash} */
|
||||
this.hash = undefined;
|
||||
} else {
|
||||
/** @type {undefined | HashFactory} */
|
||||
this.hashFactory = undefined;
|
||||
/** @type {undefined | Hash} */
|
||||
this.hash = hashOrFactory;
|
||||
}
|
||||
/** @type {string} */
|
||||
this.buffer = "";
|
||||
}
|
||||
|
||||
@@ -103,6 +109,7 @@ class BulkUpdateHash extends Hash {
|
||||
* @returns {string | Buffer} digest
|
||||
*/
|
||||
digest(encoding) {
|
||||
/** @type {undefined | Map<string, string | Buffer>} */
|
||||
let digestCache;
|
||||
const buffer = this.buffer;
|
||||
if (this.hash === undefined) {
|
||||
|
||||
1
node_modules/webpack/lib/util/hash/hash-digest.js
generated
vendored
1
node_modules/webpack/lib/util/hash/hash-digest.js
generated
vendored
@@ -49,6 +49,7 @@ const encode = (buffer, base) => {
|
||||
value = (value << EIGHT) | BigInt(buffer[i]);
|
||||
}
|
||||
// Convert to baseX string efficiently using array
|
||||
/** @type {string[]} */
|
||||
const digits = [];
|
||||
if (value === ZERO) return ENCODE_TABLE[base][0];
|
||||
while (value > ZERO) {
|
||||
|
||||
20
node_modules/webpack/lib/util/hash/wasm-hash.js
generated
vendored
20
node_modules/webpack/lib/util/hash/wasm-hash.js
generated
vendored
@@ -13,6 +13,14 @@ const Hash = require("../Hash");
|
||||
// ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64
|
||||
const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3;
|
||||
|
||||
/**
|
||||
* @typedef {object} WasmExports
|
||||
* @property {WebAssembly.Memory} memory
|
||||
* @property {() => void} init
|
||||
* @property {(length: number) => void} update
|
||||
* @property {(length: number) => void} final
|
||||
*/
|
||||
|
||||
class WasmHash extends Hash {
|
||||
/**
|
||||
* @param {WebAssembly.Instance} instance wasm instance
|
||||
@@ -23,13 +31,19 @@ class WasmHash extends Hash {
|
||||
constructor(instance, instancesPool, chunkSize, digestSize) {
|
||||
super();
|
||||
|
||||
const exports = /** @type {EXPECTED_ANY} */ (instance.exports);
|
||||
const exports = /** @type {WasmExports} */ (instance.exports);
|
||||
exports.init();
|
||||
/** @type {WasmExports} */
|
||||
this.exports = exports;
|
||||
/** @type {Buffer} */
|
||||
this.mem = Buffer.from(exports.memory.buffer, 0, 65536);
|
||||
/** @type {number} */
|
||||
this.buffered = 0;
|
||||
/** @type {WebAssembly.Instance[]} */
|
||||
this.instancesPool = instancesPool;
|
||||
/** @type {number} */
|
||||
this.chunkSize = chunkSize;
|
||||
/** @type {number} */
|
||||
this.digestSize = digestSize;
|
||||
}
|
||||
|
||||
@@ -85,6 +99,7 @@ class WasmHash extends Hash {
|
||||
*/
|
||||
_updateWithShortString(data, encoding) {
|
||||
const { exports, buffered, mem, chunkSize } = this;
|
||||
/** @type {number} */
|
||||
let endPos;
|
||||
if (data.length < 70) {
|
||||
// eslint-disable-next-line unicorn/text-encoding-identifier-case
|
||||
@@ -212,5 +227,6 @@ const create = (wasmModule, instancesPool, chunkSize, digestSize) => {
|
||||
);
|
||||
};
|
||||
|
||||
create.MAX_SHORT_STRING = MAX_SHORT_STRING;
|
||||
|
||||
module.exports = create;
|
||||
module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING;
|
||||
|
||||
Reference in New Issue
Block a user