MCPcopy
hub / github.com/webpack/webpack / checkDependencies

Method checkDependencies

lib/NormalModule.js:1870–1901  ·  view source on GitHub ↗
(deps)

Source from the content-addressed store, hash-verified

1868 * @param {FileSystemDependencies} deps deps
1869 */
1870 const checkDependencies = (deps) => {
1871 for (const dep of deps) {
1872 if (!ABSOLUTE_PATH_REGEXP.test(dep)) {
1873 if (nonAbsoluteDependencies === undefined) {
1874 nonAbsoluteDependencies = new Set();
1875 }
1876 nonAbsoluteDependencies.add(dep);
1877 deps.delete(dep);
1878 try {
1879 const depWithoutGlob = dep.replace(/[\\/]?\*.*$/, "");
1880 const absolute = join(
1881 compilation.fileSystemInfo.fs,
1882 /** @type {string} */
1883 (this.context),
1884 depWithoutGlob
1885 );
1886 if (absolute !== dep && ABSOLUTE_PATH_REGEXP.test(absolute)) {
1887 (depWithoutGlob !== dep
1888 ? /** @type {NonNullable<KnownNormalModuleBuildInfo["contextDependencies"]>} */
1889 (
1890 /** @type {NormalModuleBuildInfo} */
1891 (this.buildInfo).contextDependencies
1892 )
1893 : deps
1894 ).add(absolute);
1895 }
1896 } catch (_err) {
1897 // ignore
1898 }
1899 }
1900 }
1901 };
1902 const buildInfo = /** @type {NormalModuleBuildInfo} */ (this.buildInfo);
1903 const fileDependencies =
1904 /** @type {NonNullable<KnownNormalModuleBuildInfo["fileDependencies"]>} */

Callers

nothing calls this directly

Calls 5

joinFunction · 0.85
testMethod · 0.45
addMethod · 0.45
deleteMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected