MCPcopy
hub / github.com/webpack/webpack / _getUnresolvedContextTimestamp

Method _getUnresolvedContextTimestamp

lib/FileSystemInfo.js:1706–1715  ·  lib/FileSystemInfo.js::FileSystemInfo._getUnresolvedContextTimestamp

* Get unresolved context timestamp. Existence-only cache entries (`{}`) * are bypassed so the callback always receives a complete entry, "ignore" * or null. * @private * @param {string} path context path * @param {(err?: WebpackError | null, contextTimestamp?: ContextFileSystemInfoEntry |

(path, callback)

Source from the content-addressed store, hash-verified

1704 * @returns {void}
1705 */
1706 _getUnresolvedContextTimestamp(path, callback) {
1707 const cache = this._contextTimestamps.get(path);
1708 if (cache !== undefined && !isExistenceOnly(cache)) {
1709 return callback(
1710 null,
1711 /** @type {ContextFileSystemInfoEntry | class="st">"ignore" | null} */ (cache)
1712 );
1713 }
1714 this.contextTimestampQueue.add(path, callback);
1715 }
1716
1717 /**
1718 * Returns file hash.

Callers 2

_readContextTimestampMethod · 0.95

Calls 4

isExistenceOnlyFunction · 0.85
callbackFunction · 0.50
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected