@oh-my-pi/pi-utils 18.4.11 → 18.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +2 -2
- package/src/temp.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.4.12] - 2026-10-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed multi-second temp directory removal stalls on Windows by forcing a major GC before the first deletion retry ([#13044](https://github.com/can1357/oh-my-pi/pull/13044) by [@jchanghong023](https://github.com/jchanghong023)).
|
|
10
|
+
|
|
5
11
|
## [18.4.11] - 2026-10-02
|
|
6
12
|
|
|
7
13
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-utils",
|
|
3
|
-
"version": "18.4.
|
|
3
|
+
"version": "18.4.12",
|
|
4
4
|
"description": "Shared utilities for pi packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@oh-my-pi/pi-natives": "18.4.
|
|
60
|
+
"@oh-my-pi/pi-natives": "18.4.12"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/bun": "^1.3.14"
|
package/src/temp.ts
CHANGED
|
@@ -94,6 +94,11 @@ export async function removeWithRetries(target: string): Promise<void> {
|
|
|
94
94
|
return;
|
|
95
95
|
} catch (err) {
|
|
96
96
|
if (!shouldRetryRemove(err, attempt)) throw err;
|
|
97
|
+
// bun on Windows finalizes SQLite's db/-wal/-shm file and directory
|
|
98
|
+
// handles on GC, so a closed database can still block deletion for
|
|
99
|
+
// seconds. One forced major collection on the first retry releases
|
|
100
|
+
// them immediately instead of burning the retry window.
|
|
101
|
+
if (attempt === 0) Bun.gc(true);
|
|
97
102
|
await Bun.sleep(kRemoveRetryDelayMs);
|
|
98
103
|
}
|
|
99
104
|
}
|
|
@@ -106,6 +111,7 @@ export function removeSyncWithRetries(target: string): void {
|
|
|
106
111
|
return;
|
|
107
112
|
} catch (err) {
|
|
108
113
|
if (!shouldRetryRemove(err, attempt)) throw err;
|
|
114
|
+
if (attempt === 0) Bun.gc(true);
|
|
109
115
|
sleepSync(kRemoveRetryDelayMs);
|
|
110
116
|
}
|
|
111
117
|
}
|