MCPcopy
hub / github.com/webpack/webpack / createProjectFsInfo

Function createProjectFsInfo

test/FileSystemInfo.unittest.js:1186–1205  ·  view source on GitHub ↗
(/** @type {IFs} */ fs)

Source from the content-addressed store, hash-verified

1184 };
1185
1186 const createProjectFsInfo = (/** @type {IFs} */ fs) => {
1187 /** @type {import("../lib/logging/Logger").Logger & Record<string, (...args: unknown[]) => unknown>} */
1188 const logger =
1189 /** @type {import("../lib/logging/Logger").Logger & Record<string, (...args: unknown[]) => unknown>} */ (
1190 /** @type {unknown} */ ({
1191 error: (/** @type {unknown[]} */ ...args) => {
1192 throw new Error(util.format(...args));
1193 }
1194 })
1195 );
1196 for (const method of ["warn", "info", "log", "debug"]) {
1197 logger[method] = () => {};
1198 }
1199 return new FileSystemInfo(
1200 /** @type {import("../lib/util/fs").InputFileSystem} */ (
1201 /** @type {unknown} */ (fs)
1202 ),
1203 { logger, hashFunction: "sha256" }
1204 );
1205 };
1206
1207 it("collects files, directories and resolve results across cjs/esm", (done) => {
1208 const fs = createProjectFs();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected