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:
root
2026-02-20 11:31:28 +00:00
parent d01a6179aa
commit b5eb27a827
1690 changed files with 47348 additions and 16848 deletions

View File

@@ -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;
}

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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;