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:
74
node_modules/webpack/lib/FileSystemInfo.js
generated
vendored
74
node_modules/webpack/lib/FileSystemInfo.js
generated
vendored
@@ -25,6 +25,7 @@ const processAsyncTree = require("./util/processAsyncTree");
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
||||
/** @typedef {import("../declarations/WebpackOptions").HashFunction} HashFunction */
|
||||
/** @typedef {import("./util/fs").JsonObject} JsonObject */
|
||||
/** @typedef {import("./util/fs").IStats} IStats */
|
||||
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
|
||||
/**
|
||||
@@ -43,6 +44,7 @@ const builtinModules = new Set(nodeModule.builtinModules);
|
||||
|
||||
let FS_ACCURACY = 2000;
|
||||
|
||||
/** @type {Set<string>} */
|
||||
const EMPTY_SET = new Set();
|
||||
|
||||
const RBDT_RESOLVE_INITIAL = 0;
|
||||
@@ -60,6 +62,9 @@ const RBDT_FILE_DEPENDENCIES = 9;
|
||||
|
||||
const INVALID = Symbol("invalid");
|
||||
|
||||
// eslint-disable-next-line jsdoc/ts-no-empty-object-type
|
||||
/** @typedef {{ }} ExistenceOnlyTimeEntry */
|
||||
|
||||
/**
|
||||
* @typedef {object} FileSystemInfoEntry
|
||||
* @property {number} safeTime
|
||||
@@ -767,6 +772,7 @@ class SnapshotOptimization {
|
||||
continue;
|
||||
}
|
||||
// Extract common timestamps from both snapshots
|
||||
/** @type {Set<string> | Map<string, T>} */
|
||||
let commonMap;
|
||||
if (this._isSet) {
|
||||
commonMap = new Set();
|
||||
@@ -818,6 +824,7 @@ class SnapshotOptimization {
|
||||
// Incomplete snapshot, that can't be used
|
||||
continue;
|
||||
}
|
||||
/** @type {Set<string> | Map<string, T>} */
|
||||
let commonMap;
|
||||
if (this._isSet) {
|
||||
commonMap = new Set();
|
||||
@@ -1401,22 +1408,30 @@ class FileSystemInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ReadonlyMap<string, FileTimestamp>} map timestamps
|
||||
* @param {ReadonlyMap<string, FileSystemInfoEntry | ExistenceOnlyTimeEntry | "ignore" | null>} map timestamps
|
||||
* @param {boolean=} immutable if 'map' is immutable and FileSystemInfo can keep referencing it
|
||||
* @returns {void}
|
||||
*/
|
||||
addFileTimestamps(map, immutable) {
|
||||
this._fileTimestamps.addAll(map, immutable);
|
||||
this._fileTimestamps.addAll(
|
||||
/** @type {ReadonlyMap<string, FileTimestamp>} */
|
||||
(map),
|
||||
immutable
|
||||
);
|
||||
this._cachedDeprecatedFileTimestamps = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ReadonlyMap<string, ContextTimestamp>} map timestamps
|
||||
* @param {ReadonlyMap<string, ContextFileSystemInfoEntry | ExistenceOnlyTimeEntry | "ignore" | null>} map timestamps
|
||||
* @param {boolean=} immutable if 'map' is immutable and FileSystemInfo can keep referencing it
|
||||
* @returns {void}
|
||||
*/
|
||||
addContextTimestamps(map, immutable) {
|
||||
this._contextTimestamps.addAll(map, immutable);
|
||||
this._contextTimestamps.addAll(
|
||||
/** @type {ReadonlyMap<string, ContextTimestamp>} */
|
||||
(map),
|
||||
immutable
|
||||
);
|
||||
this._cachedDeprecatedContextTimestamps = undefined;
|
||||
}
|
||||
|
||||
@@ -1889,7 +1904,7 @@ class FileSystemInfo {
|
||||
for (const modulePath of module.paths) {
|
||||
if (childPath.startsWith(modulePath)) {
|
||||
const subPath = childPath.slice(modulePath.length + 1);
|
||||
const packageMatch = /^(@[^\\/]+[\\/])[^\\/]+/.exec(
|
||||
const packageMatch = /^@[^\\/]+[\\/][^\\/]+/.exec(
|
||||
subPath
|
||||
);
|
||||
if (packageMatch) {
|
||||
@@ -1954,9 +1969,11 @@ class FileSystemInfo {
|
||||
const context = dirname(this.fs, path);
|
||||
const source = /** @type {Buffer} */ (content).toString();
|
||||
const [imports] = lexer.parse(source);
|
||||
/** @type {Set<string>} */
|
||||
const added = new Set();
|
||||
for (const imp of imports) {
|
||||
try {
|
||||
/** @type {string} */
|
||||
let dependency;
|
||||
if (imp.d === -1) {
|
||||
// import ... from "..."
|
||||
@@ -2043,6 +2060,7 @@ class FileSystemInfo {
|
||||
return callback(err);
|
||||
}
|
||||
resolveFiles.add(packageJson);
|
||||
/** @type {JsonObject} */
|
||||
let packageData;
|
||||
try {
|
||||
packageData = JSON.parse(
|
||||
@@ -2054,7 +2072,9 @@ class FileSystemInfo {
|
||||
}
|
||||
const depsObject = packageData.dependencies;
|
||||
const optionalDepsObject = packageData.optionalDependencies;
|
||||
/** @type {Set<string>} */
|
||||
const allDeps = new Set();
|
||||
/** @type {Set<string>} */
|
||||
const optionalDeps = new Set();
|
||||
if (typeof depsObject === "object" && depsObject) {
|
||||
for (const dep of Object.keys(depsObject)) {
|
||||
@@ -2172,15 +2192,17 @@ class FileSystemInfo {
|
||||
* @param {Error | typeof INVALID=} err error or invalid flag
|
||||
* @returns {void}
|
||||
*/
|
||||
(err) => {
|
||||
if (err === INVALID) {
|
||||
return callback(null, false);
|
||||
/** @type {import("neo-async").ErrorCallback<Error | typeof INVALID>} */ (
|
||||
(err) => {
|
||||
if (err === INVALID) {
|
||||
return callback(null, false);
|
||||
}
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
return callback(null, true);
|
||||
}
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
return callback(null, true);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2492,6 +2514,7 @@ class FileSystemInfo {
|
||||
);
|
||||
for (const path of capturedDirectories) {
|
||||
const cache = this._contextHashes.get(path);
|
||||
/** @type {undefined | null | string} */
|
||||
let resolved;
|
||||
if (
|
||||
cache !== undefined &&
|
||||
@@ -2533,6 +2556,7 @@ class FileSystemInfo {
|
||||
for (const path of capturedDirectories) {
|
||||
const cache = this._contextTimestamps.get(path);
|
||||
if (cache === "ignore") continue;
|
||||
/** @type {undefined | null | ResolvedContextFileSystemInfoEntry} */
|
||||
let resolved;
|
||||
if (
|
||||
cache !== undefined &&
|
||||
@@ -2653,6 +2677,7 @@ class FileSystemInfo {
|
||||
*/
|
||||
const process = (set, fn) => {
|
||||
if (set.size === 0) return;
|
||||
/** @type {Set<string>} */
|
||||
const captured = new Set();
|
||||
for (const file of set) {
|
||||
if (file.startsWith(path)) captured.add(file);
|
||||
@@ -3068,6 +3093,7 @@ class FileSystemInfo {
|
||||
for (const [path, ts] of contextTimestamps) {
|
||||
const cache = this._contextTimestamps.get(path);
|
||||
if (cache === "ignore") continue;
|
||||
/** @type {undefined | null | ResolvedContextFileSystemInfoEntry} */
|
||||
let resolved;
|
||||
if (
|
||||
cache !== undefined &&
|
||||
@@ -3117,6 +3143,7 @@ class FileSystemInfo {
|
||||
*/
|
||||
const processContextHashSnapshot = (path, hash) => {
|
||||
const cache = this._contextHashes.get(path);
|
||||
/** @type {undefined | null | string} */
|
||||
let resolved;
|
||||
if (
|
||||
cache !== undefined &&
|
||||
@@ -3165,20 +3192,13 @@ class FileSystemInfo {
|
||||
} else {
|
||||
const cache = this._contextTimestamps.get(path);
|
||||
if (cache === "ignore") continue;
|
||||
/** @type {undefined | null | ResolvedContextFileSystemInfoEntry} */
|
||||
let resolved;
|
||||
if (
|
||||
cache !== undefined &&
|
||||
(resolved = getResolvedTimestamp(cache)) !== undefined
|
||||
) {
|
||||
if (
|
||||
!checkContext(
|
||||
path,
|
||||
/** @type {ResolvedContextFileSystemInfoEntry | null} */
|
||||
(resolved),
|
||||
tsh,
|
||||
false
|
||||
)
|
||||
) {
|
||||
if (!checkContext(path, resolved, tsh, false)) {
|
||||
processContextHashSnapshot(path, tsh && tsh.hash);
|
||||
}
|
||||
} else {
|
||||
@@ -3298,6 +3318,7 @@ class FileSystemInfo {
|
||||
return callback(/** @type {WebpackError} */ (err));
|
||||
}
|
||||
const stat = /** @type {IStats} */ (_stat);
|
||||
/** @type {FileSystemInfoEntry} */
|
||||
let ts;
|
||||
if (stat.isDirectory()) {
|
||||
ts = {
|
||||
@@ -3576,6 +3597,7 @@ class FileSystemInfo {
|
||||
});
|
||||
},
|
||||
reduce: (files, tsEntries) => {
|
||||
/** @type {undefined | Symlinks} */
|
||||
let symlinks;
|
||||
|
||||
const hash = createHash(this._hashFunction);
|
||||
@@ -3725,6 +3747,7 @@ class FileSystemInfo {
|
||||
* @returns {ContextHash} reduced hash
|
||||
*/
|
||||
reduce: (files, fileHashes) => {
|
||||
/** @type {undefined | Symlinks} */
|
||||
let symlinks;
|
||||
const hash = createHash(this._hashFunction);
|
||||
|
||||
@@ -3867,6 +3890,7 @@ class FileSystemInfo {
|
||||
* @returns {ContextTimestampAndHash} tsh
|
||||
*/
|
||||
reduce: (files, results) => {
|
||||
/** @type {undefined | Symlinks} */
|
||||
let symlinks;
|
||||
|
||||
const tsHash = createHash(this._hashFunction);
|
||||
@@ -3997,9 +4021,8 @@ class FileSystemInfo {
|
||||
return callback(/** @type {WebpackError} */ (err));
|
||||
}
|
||||
const set = new Set(
|
||||
/** @type {string[]} */ (elements).map((element) =>
|
||||
join(this.fs, path, element)
|
||||
)
|
||||
/** @type {string[]} */
|
||||
(elements).map((element) => join(this.fs, path, element))
|
||||
);
|
||||
callback(null, set);
|
||||
});
|
||||
@@ -4058,6 +4081,7 @@ class FileSystemInfo {
|
||||
}
|
||||
return callback(/** @type {WebpackError} */ (err));
|
||||
}
|
||||
/** @type {JsonObject} */
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(/** @type {Buffer} */ (content).toString("utf8"));
|
||||
|
||||
Reference in New Issue
Block a user