MCPcopy
hub / github.com/webpack/webpack / nodeDone

Method nodeDone

lib/MultiCompiler.js:494–522  ·  view source on GitHub ↗
(node, err, stats)

Source from the content-addressed store, hash-verified

492 * @returns {void}
493 */
494 const nodeDone = (node, err, stats) => {
495 if (errored) return;
496 if (err) {
497 errored = true;
498 return asyncLib.each(
499 nodes,
500 (node, callback) => {
501 if (node.compiler.watching) {
502 node.compiler.watching.close(callback);
503 } else {
504 callback();
505 }
506 },
507 () => callback(err)
508 );
509 }
510 node.result = stats;
511 running--;
512 if (node.state === "running") {
513 node.state = "done";
514 for (const child of node.children) {
515 if (child.state === "blocked") queue.enqueue(child);
516 }
517 } else if (node.state === "running-outdated") {
518 node.state = "blocked";
519 queue.enqueue(node);
520 }
521 processQueue();
522 };
523 /**
524 * Node invalid from parent.
525 * @param {Node} node node

Callers

nothing calls this directly

Calls 4

processQueueFunction · 0.70
callbackFunction · 0.50
closeMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected