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,10 +7,10 @@
const { parseIdentifier } = require("./identifier");
/** @typedef {string|(string|ConditionalMapping)[]} DirectMapping */
/** @typedef {{[k: string]: MappingValue}} ConditionalMapping */
/** @typedef {ConditionalMapping|DirectMapping|null} MappingValue */
/** @typedef {Record<string, MappingValue>|ConditionalMapping|DirectMapping} ExportsField */
/** @typedef {string | (string | ConditionalMapping)[]} DirectMapping */
/** @typedef {{ [k: string]: MappingValue }} ConditionalMapping */
/** @typedef {ConditionalMapping | DirectMapping | null} MappingValue */
/** @typedef {Record<string, MappingValue> | ConditionalMapping | DirectMapping} ExportsField */
/** @typedef {Record<string, MappingValue>} ImportsField */
/**
@@ -104,7 +104,7 @@ function patternKeyCompare(a, b) {
* Trying to match request to field
* @param {string} request request
* @param {ExportsField | ImportsField} field exports or import field
* @returns {[MappingValue, string, boolean, boolean, string]|null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings
* @returns {[MappingValue, string, boolean, boolean, string] | null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings
*/
function findMatch(request, field) {
if (
@@ -112,14 +112,16 @@ function findMatch(request, field) {
!request.includes("*") &&
!request.endsWith("/")
) {
const target = /** @type {{[k: string]: MappingValue}} */ (field)[request];
const target = /** @type {{ [k: string]: MappingValue }} */ (field)[
request
];
return [target, "", false, false, request];
}
/** @type {string} */
let bestMatch = "";
/** @type {string|undefined} */
/** @type {string | undefined} */
let bestMatchSubpath;
const keys = Object.getOwnPropertyNames(field);
@@ -157,7 +159,9 @@ function findMatch(request, field) {
if (bestMatch === "") return null;
const target = /** @type {{[k: string]: MappingValue}} */ (field)[bestMatch];
const target =
/** @type {{ [k: string]: MappingValue }} */
(field)[bestMatch];
const isSubpathMapping = bestMatch.endsWith("/");
const isPattern = bestMatch.includes("*");
@@ -171,7 +175,7 @@ function findMatch(request, field) {
}
/**
* @param {ConditionalMapping | DirectMapping|null} mapping mapping
* @param {ConditionalMapping | DirectMapping | null} mapping mapping
* @returns {boolean} is conditional mapping
*/
function isConditionalMapping(mapping) {
@@ -274,10 +278,10 @@ function targetMapping(
}
/**
* @param {string|undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {boolean} isPattern true, if mapping is a pattern (contains "*")
* @param {boolean} isSubpathMapping true, for subpath mappings
* @param {DirectMapping|null} mappingTarget direct export
* @param {DirectMapping | null} mappingTarget direct export
* @param {Set<string>} conditionNames condition names
* @param {(d: string, f: boolean) => void} assert asserting direct value
* @returns {string[]} mapping result

38
node_modules/enhanced-resolve/lib/util/fs.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Natsu @xiaoxiaojx
*/
"use strict";
/** @typedef {import("../Resolver").FileSystem} FileSystem */
/**
* Read and parse JSON file
* @template T
* @param {FileSystem} fileSystem the file system
* @param {string} jsonFilePath absolute path to JSON file
* @returns {Promise<T>} parsed JSON content
*/
async function readJson(fileSystem, jsonFilePath) {
const { readJson } = fileSystem;
if (readJson) {
return new Promise((resolve, reject) => {
readJson(jsonFilePath, (err, content) => {
if (err) return reject(err);
resolve(/** @type {T} */ (content));
});
});
}
const buf = await new Promise((resolve, reject) => {
fileSystem.readFile(jsonFilePath, (err, data) => {
if (err) return reject(err);
resolve(data);
});
});
return JSON.parse(/** @type {string} */ (buf.toString()));
}
module.exports.readJson = readJson;

View File

@@ -171,6 +171,18 @@ const join = (rootPath, request) => {
return posixNormalize(rootPath);
};
/**
* @param {string} maybePath a path
* @returns {string} the directory name
*/
const dirname = (maybePath) => {
switch (getType(maybePath)) {
case PathType.AbsoluteWin:
return path.win32.dirname(maybePath);
}
return path.posix.dirname(maybePath);
};
/** @type {Map<string, Map<string, string | undefined>>} */
const joinCache = new Map();
@@ -194,10 +206,45 @@ const cachedJoin = (rootPath, request) => {
return cacheEntry;
};
/** @type {Map<string, string>} */
const dirnameCache = new Map();
/**
* @param {string} maybePath a path
* @returns {string} the directory name
*/
const cachedDirname = (maybePath) => {
const cacheEntry = dirnameCache.get(maybePath);
if (cacheEntry !== undefined) return cacheEntry;
const result = dirname(maybePath);
dirnameCache.set(maybePath, result);
return result;
};
/**
* Check if childPath is a subdirectory of parentPath
* @param {string} parentPath parent directory path
* @param {string} childPath child path to check
* @returns {boolean} true if childPath is under parentPath
*/
const isSubPath = (parentPath, childPath) => {
// Ensure parentPath ends with a separator to avoid false matches
// e.g., "/app" shouldn't match "/app-other"
const parentWithSlash =
parentPath.endsWith("/") || parentPath.endsWith("\\")
? parentPath
: normalize(`${parentPath}/`);
return childPath.startsWith(parentWithSlash);
};
module.exports.PathType = PathType;
module.exports.cachedDirname = cachedDirname;
module.exports.cachedJoin = cachedJoin;
module.exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
module.exports.dirname = dirname;
module.exports.getType = getType;
module.exports.invalidSegmentRegEx = invalidSegmentRegEx;
module.exports.isSubPath = isSubPath;
module.exports.join = join;
module.exports.normalize = normalize;

View File

@@ -10,10 +10,8 @@ module.exports = {
* @type {Record<string, string>}
*/
versions: {},
// eslint-disable-next-line jsdoc/no-restricted-syntax
/**
* @param {Function} fn function
*/
// eslint-disable-next-line jsdoc/reject-function-type
/** @param {Function} fn function */
nextTick(fn) {
// eslint-disable-next-line prefer-rest-params
const args = Array.prototype.slice.call(arguments, 1);