@openclaw/fs-safe 0.8.4 → 0.8.5
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 +39 -3
- package/dist/move-path.js +1 -1
- package/docs/atomic.md +2 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,22 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.8.5 - 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- **Strict moves stay strict:** a move started with hardlink rejection keeps that policy throughout asynchronous preparation and copying, even when the caller reuses or changes its options object.
|
|
10
|
+
|
|
11
|
+
### Safe moves
|
|
12
|
+
|
|
13
|
+
- Preserve the admitted `sourceHardlinks` policy through staged-copy fallback. A late hardlink is still rejected before destination publication, with the source and its alias preserved, instead of being accepted after an in-flight options change.
|
|
14
|
+
- Document when move policy is captured and how it relates to the existing per-mutation authority checks and destination-publication receipts.
|
|
15
|
+
|
|
5
16
|
## 0.8.4 - 2026-09-07
|
|
6
17
|
|
|
18
|
+
### Highlights
|
|
19
|
+
|
|
20
|
+
- **Faster reads and writes:** metadata checks avoid unnecessary event-loop round-trips while data I/O stays asynchronous; reconstructible data can explicitly opt out of fsync with `durable: false`.
|
|
21
|
+
- **Inspect TARs without extracting:** the new bounded archive inspection API uses the same native/WASM admission and canonical planner as extraction.
|
|
22
|
+
|
|
23
|
+
### Filesystem performance and durability
|
|
24
|
+
|
|
25
|
+
- Run metadata checks inside async operations synchronously (microseconds each), cutting event-loop round-trips per read/write while data I/O remains asynchronous and native canonical path spelling is preserved, including Windows short paths.
|
|
26
|
+
- Add `durable` to Root write/create/writeJson/createJson/append options and Root defaults; `durable: false` skips file and parent fsync for reconstructible data (default unchanged: durable).
|
|
27
|
+
|
|
28
|
+
### Archive inspection and compatibility
|
|
29
|
+
|
|
7
30
|
- Add bounded `inspectTarArchive` with complete native/WASM admission and the same canonical extraction planner, preserving effective member identities without materializing an output tree.
|
|
8
31
|
- Preserve inherited and getter-backed extraction options on the WASM TAR path, matching native and ZIP handling for destinations, filters, stripping, and modes.
|
|
32
|
+
|
|
33
|
+
### Validation
|
|
34
|
+
|
|
9
35
|
- Apply the existing filesystem-test worker cap locally as well as in CI, and drain archive publication fixtures before resetting hooks or cleaning restricted directories after timeouts.
|
|
10
|
-
- Add `durable` to Root write/create/writeJson/createJson/append options and Root defaults; `durable: false` skips file and parent fsync for reconstructible data (default unchanged: durable).
|
|
11
|
-
- Run metadata checks inside async operations synchronously (microseconds each), cutting event-loop round-trips per read/write while data I/O remains asynchronous and native canonical path spelling is preserved, including Windows short paths.
|
|
12
36
|
|
|
13
37
|
## 0.8.3 - 2026-09-06
|
|
14
38
|
|
|
39
|
+
### Highlights
|
|
40
|
+
|
|
41
|
+
- **Safer cancellable moves:** callers can guard every source removal and retain an exact destination-publication receipt for recovery after later failures, including Windows and cross-device fallbacks.
|
|
42
|
+
- **Less filesystem overhead:** reads and writes make fewer calls while preserving their existing boundary and identity checks.
|
|
43
|
+
|
|
44
|
+
### Move authority and recovery
|
|
45
|
+
|
|
15
46
|
- Add optional synchronous move authority checks before renames and each copied-source removal, plus an exact bigint destination-publication receipt for caller-owned recovery after later failure; retain cross-device and Windows `EPERM` copy fallbacks and the existing `Promise<void>` contract.
|
|
16
47
|
|
|
17
|
-
|
|
48
|
+
### Filesystem performance and durability
|
|
49
|
+
|
|
18
50
|
- Reduce filesystem calls per read and write while retaining boundary, hardlink, hook, retry, and post-mutation identity checks.
|
|
19
51
|
- Skip native publication's extra mode-only file fsync for modes that retain owner read/write when staging permissions have not widened; after a crash, a file may retain staged `0o600` instead of the wider requested mode, while restrictive modes retain the extra fsync.
|
|
52
|
+
|
|
53
|
+
### Tooling and maintenance
|
|
54
|
+
|
|
20
55
|
- Add 1 MiB read/write and existing-mode inheritance benchmarks, with native-mode metadata and per-case iteration counts.
|
|
56
|
+
- Simplify internals without changing public behavior: remove unused string/home helpers, `resolveUserPath`, `createBoundedReadStream`, `sidecarLockPayloadIsStale`, and `tarManifestEntryCost`; share filesystem utilities and merge private modules.
|
|
21
57
|
|
|
22
58
|
## 0.8.2 - 2026-09-05
|
|
23
59
|
|
package/dist/move-path.js
CHANGED
|
@@ -289,7 +289,7 @@ export async function movePathWithCopyFallback(options) {
|
|
|
289
289
|
const unregisterStaged = registerTempPathForExit(staged, { recursive: true });
|
|
290
290
|
try {
|
|
291
291
|
const manifest = await copyEntryWithManifest(sourcePath, staged, {
|
|
292
|
-
sourceHardlinks:
|
|
292
|
+
sourceHardlinks: rejectHardlinks ? "reject" : "allow",
|
|
293
293
|
...(rejectHardlinks ? { budget: { discovered: 1 } } : {}),
|
|
294
294
|
}, sourceIdentity);
|
|
295
295
|
const cleanupState = createCleanupCopiedEntryState(sourcePath, manifest);
|
package/docs/atomic.md
CHANGED
|
@@ -200,6 +200,8 @@ await movePathWithCopyFallback({
|
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
Use it when source and destination might live on different filesystems (containers, tmpfs, separate volumes).
|
|
203
|
+
The hardlink policy is captured when the move starts. Changing or reusing the
|
|
204
|
+
options object later does not change the policy of an in-flight move.
|
|
203
205
|
`sourceHardlinks: "reject"` performs a recursive preflight capped at 50,000
|
|
204
206
|
entries before any mutation. Because link count and rename cannot be one atomic
|
|
205
207
|
portable operation, this mode always commits a fresh inode/tree through the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/fs-safe",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Capability-style filesystem roots for Node.js apps that handle untrusted relative paths.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"filesystem",
|
|
@@ -156,13 +156,13 @@
|
|
|
156
156
|
"archive:producer-smoke": "node scripts/archive-producer-smoke.mjs"
|
|
157
157
|
},
|
|
158
158
|
"optionalDependencies": {
|
|
159
|
-
"@openclaw/fs-safe-darwin-arm64": "0.8.
|
|
160
|
-
"@openclaw/fs-safe-darwin-x64": "0.8.
|
|
161
|
-
"@openclaw/fs-safe-linux-arm64-gnu": "0.8.
|
|
162
|
-
"@openclaw/fs-safe-linux-arm64-musl": "0.8.
|
|
163
|
-
"@openclaw/fs-safe-linux-x64-gnu": "0.8.
|
|
164
|
-
"@openclaw/fs-safe-linux-x64-musl": "0.8.
|
|
165
|
-
"@openclaw/fs-safe-win32-x64-msvc": "0.8.
|
|
159
|
+
"@openclaw/fs-safe-darwin-arm64": "0.8.5",
|
|
160
|
+
"@openclaw/fs-safe-darwin-x64": "0.8.5",
|
|
161
|
+
"@openclaw/fs-safe-linux-arm64-gnu": "0.8.5",
|
|
162
|
+
"@openclaw/fs-safe-linux-arm64-musl": "0.8.5",
|
|
163
|
+
"@openclaw/fs-safe-linux-x64-gnu": "0.8.5",
|
|
164
|
+
"@openclaw/fs-safe-linux-x64-musl": "0.8.5",
|
|
165
|
+
"@openclaw/fs-safe-win32-x64-msvc": "0.8.5",
|
|
166
166
|
"jszip": "^3.10.1"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|