Commit 0d0040b
fix(@angular-devkit/core): use crypto.randomUUID instead of Date.now for unique string in tmp file names
Use crypto.randomUUID instead of Date.now for unique string in the tmpdir path name for a TempScopedNodeJsSyncHost to prevent naming conflicts.
When performaning tests on a fast enough machine which rely on this class, two instances can be instantiated within one second and can
cause failures because the path already exists that is attempted to be used. Using crypto.randomUUID should not run into this issue.
(cherry picked from commit 7595e1f)1 parent 0a2340b commit 0d0040b
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
0 commit comments