@componentor/fs 3.0.50 → 3.0.51
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/dist/index.js +90 -14
- package/dist/index.js.map +1 -1
- package/dist/workers/repair.worker.js +90 -14
- package/dist/workers/repair.worker.js.map +1 -1
- package/dist/workers/server.worker.js +90 -14
- package/dist/workers/server.worker.js.map +1 -1
- package/dist/workers/sync-relay.worker.js +90 -14
- package/dist/workers/sync-relay.worker.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +6 -0
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -604,6 +604,12 @@ Make sure `opfsSync` is enabled (it's `true` by default). Files are mirrored to
|
|
|
604
604
|
|
|
605
605
|
See [CHANGELOG.md](./CHANGELOG.md) for the full version history.
|
|
606
606
|
|
|
607
|
+
### v3.0.51 (2026)
|
|
608
|
+
|
|
609
|
+
**Fixes:**
|
|
610
|
+
- Fix O(N²) regression introduced in 3.0.49. The implicit-directory guard added then (`isImplicitDirectory(path)` in `write`, `symlink`, `link`, `copy`, plus several stat-side methods) called `rebuildImplicitDirs` — O(N×depth) over all pathIndex entries — on every invocation, and `pathIndexGen` was bumped on every mutation, so the cache was always invalid by the next call. Batch workloads (Vite optimize, pnpm install, Strapi unpacks of thousands of files) went quadratic. Measured on a 5000-file write benchmark: **3.0.48 baseline 26 ms → 3.0.50 1725 ms (66× slower) → 3.0.51 23 ms (back to baseline)**
|
|
611
|
+
- Replace the on-demand rebuild with an incrementally maintained `descCount` map. `isImplicitDirectory(P)` is now O(1): `!pathIndex.has(P) && descCount[P] > 0`. Maintenance is O(depth) per pathIndex mutation, behind two helpers (`setPathIndex`, `deletePathIndex`) that wrap the 12 mutation sites
|
|
612
|
+
|
|
607
613
|
### v3.0.50 (2026)
|
|
608
614
|
|
|
609
615
|
**Fixes:**
|