MCPcopy
hub / github.com/webpack/webpack / addCacheDependencies

Method addCacheDependencies

lib/NormalModule.js:2223–2248  ·  view source on GitHub ↗

* Adds the provided file dependencies to the module. * @param {FileSystemDependencies} fileDependencies set where file dependencies are added to * @param {FileSystemDependencies} contextDependencies set where context dependencies are added to * @param {FileSystemDependencies} missingDependenci

(
		fileDependencies,
		contextDependencies,
		missingDependencies,
		buildDependencies
	)

Source from the content-addressed store, hash-verified

2221 * @param {FileSystemDependencies} buildDependencies set where build dependencies are added to
2222 */
2223 addCacheDependencies(
2224 fileDependencies,
2225 contextDependencies,
2226 missingDependencies,
2227 buildDependencies
2228 ) {
2229 const { snapshot, buildDependencies: buildDeps } =
2230 /** @type {NormalModuleBuildInfo} */ (this.buildInfo);
2231 if (snapshot) {
2232 fileDependencies.addAll(snapshot.getFileIterable());
2233 contextDependencies.addAll(snapshot.getContextIterable());
2234 missingDependencies.addAll(snapshot.getMissingIterable());
2235 } else {
2236 const {
2237 fileDependencies: fileDeps,
2238 contextDependencies: contextDeps,
2239 missingDependencies: missingDeps
2240 } = /** @type {NormalModuleBuildInfo} */ (this.buildInfo);
2241 if (fileDeps !== undefined) fileDependencies.addAll(fileDeps);
2242 if (contextDeps !== undefined) contextDependencies.addAll(contextDeps);
2243 if (missingDeps !== undefined) missingDependencies.addAll(missingDeps);
2244 }
2245 if (buildDeps !== undefined) {
2246 buildDependencies.addAll(buildDeps);
2247 }
2248 }
2249
2250 /**
2251 * Updates the hash with the data contributed by this instance.

Callers

nothing calls this directly

Calls 4

getFileIterableMethod · 0.80
getContextIterableMethod · 0.80
getMissingIterableMethod · 0.80
addAllMethod · 0.45

Tested by

no test coverage detected