Repository navigation
fs-safe 0.21.2
Highlights
requiremode confines mutations under hostile concurrency: withFS_SAFE_NATIVE_MODE=require(orconfigureFsSafeNative({ mode: "require" })), remove, recursive remove,mkdir, writable-open creation and overwritemovenow run through retained, identity-checked native parents: descriptor-relativeunlinkat,mkdiratandrenameat2on POSIX, and handle-relative operations on Windows. An adversarial race fuzzer observed no outside or denied-path effects across about 2.8 million racing calls on Linux (with and withoutopenat2), macOS and Windows.autokeeps its documented best-effort paths and performance. See the operation/platform matrix. (#744, #751, #750, #752)- Watch on macOS: entry scopes use identity-checked kqueue descriptors instead of recursive FSEvents streams, ending overflow storms for shallow ancestor scopes above busy trees. (#753)
- Faster watch scans: watch readiness and reconciliation are 27–34% faster on large trees. (#747)
Fixes
- Watch cancellation: a subscription's
signalcloses it even when another abort listener stops event propagation. (#738) - Walk cancellation: walks stop without yielding the current entry when a synchronous filter aborts the signal. (#739)
- Writes with
mkdir: false: the JavaScript fallback writes through existing in-root parent aliases using the same guarded walk, instead of rejecting them. (#740) - Descriptor exhaustion: native writes that fail with
EMFILE/ENFILEreporthelper-failedwith the exhaustion code, the indeterminate publication outcome and the preserved stage, instead of a misleading path error. (#742) - Walk memory:
walkDirectory()andwalkDirectorySync()stop reading a directory oncemaxEntriesis reached instead of enumerating it completely first.Root.walk()sorted mode stays deterministic. (#743)
Compatibility
- In
requiremode, the operations above now reject withhelper-unavailablewhere no confining native primitive exists, instead of silently falling back to JavaScript. Examples are recursive removal on Linux withoutopenat2and recursive directory removal on Windows. Useautofor the best-effort fallback. Theserequire-mode mutations also do more identity-checked work and are slower than before, whileautois unchanged. (#744, #751, #750) - Create-only writes to an existing directory report
already-existsin every implementation (previouslynot-fileon some Windows paths). WithmutationSymlinksomitted, Windows native and legacy JavaScript writes still differ for final links and parent junctions; setmutationSymlinks: "reject"for uniform behavior. (#745)
Published packages
| Package | Registry tarball | Verified integrity | Provenance |
|---|---|---|---|
| @openclaw/fs-safe-linux-x64-gnu@0.21.2 | tgz | sha512-ew5c+nBG/I/6ub6iTRtWxhYRzEJaIFat+rIVIHXErCPgOqFUcMdGxHKfLlkOXgYa5kavcRwWVgN2e/a3BMpSew== |
verified attestation |
| @openclaw/fs-safe-linux-x64-musl@0.21.2 | tgz | sha512-5ArSwa/lpMobnmV7nbwettiYCim146vbnwW3NrYATrXT6tK/pTfQFUp3Es9px3nbbvZ+Cg49NdxlQq4+Lce2gg== |
verified attestation |
| @openclaw/fs-safe-linux-arm64-gnu@0.21.2 | tgz | sha512-OIJUzIP6ZgCKF56TkMtyBtQ3EE/JyzQNeARRcDNrq9nZKqVSWLb1I1OXxW3XfeufXuLquaNO6w+wRkUKGpawRQ== |
verified attestation |
| @openclaw/fs-safe-linux-arm64-musl@0.21.2 | tgz | sha512-+hVS8c4ARX0f6BZU33e997YjytT2lJDY8e/37Y/B9vZySm92wQvR2Z+D2PG/94c5X/guH1sxXZAT1y8mZ++hYw== |
verified attestation |
| @openclaw/fs-safe-darwin-x64@0.21.2 | tgz | sha512-CDgHTssC+GoCYWrwmnje7K73fEq67fC4EUfRmYNd/r7DuAYMLhdiIhsxop8kYx3NFKIbcVXW7MmgqtVfx8zDfA== |
verified attestation |
| @openclaw/fs-safe-darwin-arm64@0.21.2 | tgz | sha512-mie3RqEyhQ7eeJvxHj/X+1zlZr5geBlWX9tdsfiZPTw5uZ+DtnYykXyMa8yBtTZN1qBKm9SF97hqWdJoLpNH7w== |
verified attestation |
| @openclaw/fs-safe-win32-x64-msvc@0.21.2 | tgz | sha512-JMXU14K/unt+R8NR7LayMme9BufjJqloJUhfcF59/qDlsjWEX0QYGe32byqT1rvyzyiGCw9Sx3lFTzzHI49eTg== |
verified attestation |
| @openclaw/fs-safe@0.21.2 | tgz | sha512-KP1cys7gJTCCFFsnp9HBQScSh+zDEqK+b89Ubc/kQI82U0TuJ1SY6MlwRnT7JPDn8Q06CmBlvaZqWGjzBnhnew== |
verified attestation |
Release proof: GitHub Actions run.