Commit 22fc782
committed
fix(run-multiple): avoid temp.mjs filename collision across forked processes
When run-multiple forks N concurrent processes, each process transpiles the
same .ts files (config, helpers, includes) to identically named *.temp.mjs
files. A process that finishes first deletes its temp file, causing other
processes that haven't imported it yet to fail with "Cannot find module
*.temp.mjs".
Fix: embed process.pid in the temp filename so every worker writes its own
isolated copy. Cleanup still works because allTempFiles is built from
transpiledFiles.values(), which already contains the pid-suffixed paths.
The .includes('.temp.mjs') substring check in step/base.js continues to
match the new *.{pid}.temp.mjs filenames.
Fixes #56421 parent eba4a62 commit 22fc782
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
389 | 391 | | |
390 | 392 | | |
391 | 393 | | |
| |||
0 commit comments