Commit 1c6f210
committed
fix(@angular-devkit/core): use performance.now instead of Date.now for timestamp in tmp file names
Use performance.now instead of Date.now for timestamps 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 performance.now instead of Date.now should not run into
this issue as it is has microsecond precision.1 parent 51272f7 commit 1c6f210
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