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

@@ -313,6 +313,7 @@ class BinaryMiddleware extends SerializerMiddleware {
/** @type {number[]} */
const lengths = [];
for (const item of serializedData) {
/** @type {undefined | number} */
let last;
if (typeof item === "function") {
lengths.push(0);
@@ -490,8 +491,10 @@ class BinaryMiddleware extends SerializerMiddleware {
}
case "boolean": {
let lastByte = thing === true ? 1 : 0;
/** @type {number[]} */
const bytes = [];
let count = 1;
/** @type {undefined | number} */
let n;
for (n = 1; n < 0xffffffff && i + n < data.length; n++) {
const item = data[i + n];
@@ -541,6 +544,7 @@ class BinaryMiddleware extends SerializerMiddleware {
}
case "object": {
if (thing === null) {
/** @type {number} */
let n;
for (n = 1; n < 0x100000104 && i + n < data.length; n++) {
const item = data[i + n];

View File

@@ -21,7 +21,7 @@ const { dirname, join, mkdirp } = require("../util/fs");
const memoize = require("../util/memoize");
const SerializerMiddleware = require("./SerializerMiddleware");
/** @typedef {typeof import("../util/Hash")} Hash */
/** @typedef {import("../util/Hash").HashFunction} HashFunction */
/** @typedef {import("../util/fs").IStats} IStats */
/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */
/** @typedef {import("./types").BufferSerializableType} BufferSerializableType */
@@ -49,7 +49,7 @@ const WRITE_LIMIT_CHUNK = 511 * 1024 * 1024;
/**
* @param {Buffer[]} buffers buffers
* @param {string | Hash} hashFunction hash function to use
* @param {HashFunction} hashFunction hash function to use
* @returns {string} hash
*/
const hashForName = (buffers, hashFunction) => {
@@ -101,7 +101,7 @@ const readUInt64LE = Buffer.prototype.readBigUInt64LE
* @param {(BufferSerializableType | LazyFunction)[]} data data to be serialized
* @param {string | boolean} name file base name
* @param {(name: string | false, buffers: Buffer[], size: number) => Promise<void>} writeFile writes a file
* @param {string | Hash} hashFunction hash function to use
* @param {HashFunction=} hashFunction hash function to use
* @returns {Promise<SerializeResult>} resulting file pointer and promise
*/
const serialize = async (
@@ -336,6 +336,7 @@ const deserialize = async (middleware, name, readFile) => {
throw new Error("Invalid file version");
}
const sectionCount = readUInt32LE();
/** @type {number[]} */
const lengths = [];
let lastLengthPositive = false;
for (let i = 0; i < sectionCount; i++) {
@@ -433,11 +434,13 @@ const deserialize = async (middleware, name, readFile) => {
class FileMiddleware extends SerializerMiddleware {
/**
* @param {IntermediateFileSystem} fs filesystem
* @param {string | Hash} hashFunction hash function to use
* @param {HashFunction} hashFunction hash function to use
*/
constructor(fs, hashFunction = DEFAULTS.HASH_FUNCTION) {
super();
/** @type {IntermediateFileSystem} */
this.fs = fs;
/** @type {HashFunction} */
this._hashFunction = hashFunction;
}
@@ -454,6 +457,7 @@ class FileMiddleware extends SerializerMiddleware {
// It's important that we don't touch existing files during serialization
// because serialize may read existing files (when deserializing)
/** @type {Set<string>} */
const allWrittenFiles = new Set();
/**
* @param {string | false} name name
@@ -472,6 +476,7 @@ class FileMiddleware extends SerializerMiddleware {
*/
(resolve, reject) => {
let stream = this.fs.createWriteStream(`${file}_`);
/** @type {undefined | import("zlib").Gzip | import("zlib").BrotliCompress} */
let compression;
if (file.endsWith(".gz")) {
compression = createGzip({

View File

@@ -18,7 +18,7 @@ const SerializerMiddleware = require("./SerializerMiddleware");
const SetObjectSerializer = require("./SetObjectSerializer");
/** @typedef {import("../logging/Logger").Logger} Logger */
/** @typedef {typeof import("../util/Hash")} Hash */
/** @typedef {import("../util/Hash").HashFunction} HashFunction */
/** @typedef {import("./SerializerMiddleware").LazyOptions} LazyOptions */
/** @typedef {import("./types").ComplexSerializableType} ComplexSerializableType */
/** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */
@@ -111,7 +111,7 @@ const setMapSize = (map, size) => {
/**
* @param {Buffer} buffer buffer
* @param {string | Hash} hashFunction hash function to use
* @param {HashFunction} hashFunction hash function to use
* @returns {string} hash
*/
const toHash = (buffer, hashFunction) => {
@@ -207,17 +207,21 @@ const loaders = new Map();
/** @typedef {PrimitiveSerializableType[]} SerializedType */
/** @typedef {{ logger: Logger }} Context */
/** @typedef {(context: ObjectSerializerContext | ObjectDeserializerContext) => void} ExtendContext */
/**
* @extends {SerializerMiddleware<DeserializedType, SerializedType, Context>}
*/
class ObjectMiddleware extends SerializerMiddleware {
/**
* @param {(context: ObjectSerializerContext | ObjectDeserializerContext) => void} extendContext context extensions
* @param {string | Hash} hashFunction hash function to use
* @param {ExtendContext} extendContext context extensions
* @param {HashFunction} hashFunction hash function to use
*/
constructor(extendContext, hashFunction = DEFAULTS.HASH_FUNCTION) {
super();
/** @type {ExtendContext} */
this.extendContext = extendContext;
/** @type {HashFunction} */
this._hashFunction = hashFunction;
}
@@ -276,11 +280,12 @@ class ObjectMiddleware extends SerializerMiddleware {
}
/**
* @param {Constructor} object for serialization
* @param {EXPECTED_ANY} object for serialization
* @returns {SerializerConfigWithSerializer} Serializer config
*/
static getSerializerFor(object) {
const proto = Object.getPrototypeOf(object);
/** @type {null | Constructor} */
let c;
if (proto === null) {
// Object created with Object.create(null)
@@ -295,7 +300,11 @@ class ObjectMiddleware extends SerializerMiddleware {
}
const config = serializers.get(c);
if (!config) throw new Error(`No serializer registered for ${c.name}`);
if (!config) {
throw new Error(
`No serializer registered for ${/** @type {Constructor} */ (c).name}`
);
}
if (config === NOT_SERIALIZABLE) throw NOT_SERIALIZABLE;
return /** @type {SerializerConfigWithSerializer} */ (config);
@@ -345,6 +354,7 @@ class ObjectMiddleware extends SerializerMiddleware {
const addReferenceable = (item) => {
referenceable.set(item, currentPos++);
};
/** @type {Map<number, Buffer | [Buffer, Buffer] | Map<string, Buffer>>} */
let bufferDedupeMap = new Map();
/**
* @param {Buffer} buf buffer
@@ -366,6 +376,7 @@ class ObjectMiddleware extends SerializerMiddleware {
return buf;
}
const hash = toHash(entry, this._hashFunction);
/** @type {Map<string, Buffer>} */
const newMap = new Map();
newMap.set(hash, entry);
bufferDedupeMap.set(len, newMap);
@@ -384,8 +395,10 @@ class ObjectMiddleware extends SerializerMiddleware {
entry.push(buf);
return buf;
}
/** @type {Map<string, Buffer>} */
const newMap = new Map();
const hash = toHash(buf, this._hashFunction);
/** @type {undefined | Buffer} */
let found;
for (const item of entry) {
const itemHash = toHash(item, this._hashFunction);
@@ -408,7 +421,9 @@ class ObjectMiddleware extends SerializerMiddleware {
return buf;
};
let currentPosTypeLookup = 0;
/** @type {Map<ComplexSerializableType, number>} */
let objectTypeLookup = new Map();
/** @type {Set<ComplexSerializableType>} */
const cycleStack = new Set();
/**
* @param {ComplexSerializableType} item item to stack
@@ -441,12 +456,18 @@ class ObjectMiddleware extends SerializerMiddleware {
if (item.constructor === Object) {
return `Object { ${Object.keys(item).join(", ")} }`;
}
if (item.constructor === Map) return `Map { ${item.size} items }`;
if (item.constructor === Array) {
return `Array { ${item.length} items }`;
if (item.constructor === Map) {
return `Map { ${/** @type {Map<EXPECTED_ANY, EXPECTED_ANY>} */ (item).size} items }`;
}
if (item.constructor === Array) {
return `Array { ${/** @type {EXPECTED_ANY[]} */ (item).length} items }`;
}
if (item.constructor === Set) {
return `Set { ${/** @type {Set<EXPECTED_ANY>} */ (item).size} items }`;
}
if (item.constructor === RegExp) {
return /** @type {RegExp} */ (item).toString();
}
if (item.constructor === Set) return `Set { ${item.size} items }`;
if (item.constructor === RegExp) return item.toString();
return `${item.constructor.name}`;
}
return `Object [null prototype] { ${Object.keys(item).join(
@@ -464,7 +485,7 @@ class ObjectMiddleware extends SerializerMiddleware {
})
.join(" -> ");
};
/** @type {WeakSet<Error>} */
/** @type {undefined | WeakSet<Error>} */
let hasDebugInfoAttached;
/** @type {ObjectSerializerContext} */
let ctx = {
@@ -723,6 +744,7 @@ class ObjectMiddleware extends SerializerMiddleware {
);
} else {
const request = nextItem;
/** @type {undefined | ObjectSerializer} */
let serializer;
if (typeof request === "number") {
@@ -788,6 +810,7 @@ class ObjectMiddleware extends SerializerMiddleware {
// As this is only for error handling, we omit creating a Map for
// faster access to this information, as this would affect performance
// in the good case
/** @type {undefined | [Constructor | null, SerializerConfig]} */
let serializerEntry;
for (const entry of serializers) {
if (entry[1].serializer === serializer) {

View File

@@ -20,7 +20,9 @@ const cache = new WeakMap();
*/
class ObjectStructure {
constructor() {
/** @type {undefined | keyof T[]} */
this.keys = undefined;
/** @type {undefined | Map<keyof T, ObjectStructure<T>>} */
this.children = undefined;
}