Repository navigation
Commit 11df252
committed
π fix: create the temporary directory atomically
`randomUUID()` then `ensureDir()` names a directory and creates it as two
steps, and `ensureDir` succeeds on one that already exists β so neither
half rules out handing back a directory this call did not create. `mkdtemp`
does both at once and fails rather than adopting.
The test fixtures move to `@effectionx/fs` for the operations it provides β
`writeTextFile`, `readTextFile`, `exists`, `rm` β and to a resource whose
`ensure` removes the fixture, instead of synchronous try/finally. Node stays
only where there is no equivalent: `mkdtemp`, `realpath`, and asking whether a
pid is alive.
The specification no longer says import consults built-ins before the
filesystem. That sentence decided the precedence question #202 owns, in the
same paragraph that deferred it. What is contracted is that a built-in
resolves with no path and no search directory; a collision with a
repository-local name is unspecified, and where the lookup happens to sit is
incidental.1 parent 2309be3 commit 11df252
4 files changed
Lines changed: 179 additions & 205 deletions
File tree
- packages/core
- src/components
- tests
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | | - | |
40 | | - | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments