(node, err, stats)
| 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 |
nothing calls this directly
no test coverage detected