memfs 4.57.5 → 4.57.7

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/docs/fsa.md CHANGED
@@ -32,12 +32,12 @@ fsa(
32
32
 
33
33
  The context controls behaviour:
34
34
 
35
- | Option | Default | Meaning |
36
- | ------------------- | -------- | ----------------------------------------------------------------- |
37
- | `mode` | `'read'` | `'read'` or `'readwrite'`. Write operations require `'readwrite'` |
38
- | `separator` | `'/'` | Path separator used by `core.toJSON` / `fromJSON` |
39
- | `syncHandleAllowed` | `false` | Enables `createSyncAccessHandle()` on file handles |
40
- | `locks` | --- | A `FileLockManager` controlling concurrent-write locks |
35
+ | Option | Meaning |
36
+ | ------------------- | --------------------------------------------------------------------------- |
37
+ | `mode` | `'read'` (default) or `'readwrite'`. Write operations require `'readwrite'` |
38
+ | `separator` | Path separator used by `core.toJSON` / `fromJSON`. Defaults to `'/'` |
39
+ | `syncHandleAllowed` | Enables `createSyncAccessHandle()` on file handles. Defaults to `false` |
40
+ | `locks` | A `FileLockManager` controlling concurrent-write locks |
41
41
 
42
42
  `core` is a `Superblock` --- the same in-memory store that backs `Volume` ---
43
43
  so you can serialize and seed the filesystem directly:
@@ -56,6 +56,13 @@ const readme = await docs.getFileHandle('readme.txt');
56
56
  await (await readme.getFile()).text(); // 'Welcome!'
57
57
  ```
58
58
 
59
+ ```jj.aside
60
+ The in-memory FSA filesystem and a `Volume` are backed by the same `Superblock`
61
+ storage engine, so one store can be driven through *both* APIs at once: hand
62
+ `fsa()`'s `core` to `new Volume(core)` and the same files are visible through
63
+ the Node `fs` API and through FSA handles simultaneously.
64
+ ```
65
+
59
66
  ## Directory handles
60
67
 
61
68
  A directory handle (`FileSystemDirectoryHandle`) supports the standard async
package/docs/index.ts CHANGED
@@ -26,7 +26,7 @@ export const page: LibPage = {
26
26
  src: async () => (await import('./volumes.md')).default,
27
27
  },
28
28
  {
29
- name: 'File System (Access)',
29
+ name: 'File System Access',
30
30
  subtitle: 'An in-memory implementation of the browser File System (Access) (FSA) API.',
31
31
  // @ts-ignore
32
32
  src: async () => (await import('./fsa.md')).default,
package/docs/text.md CHANGED
@@ -3,9 +3,7 @@
3
3
  - **Node's [`fs` module](https://nodejs.org/api/fs.html)** --- a drop-in
4
4
  replacement you can use anywhere the `fs` module is expected (tests, mocks,
5
5
  bundlers, sandboxes). Files live in memory instead of on disk.
6
- - **The browser [File System Access (FSA) API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)**
7
- --- the same `FileSystemDirectoryHandle` interface a browser exposes, backed
8
- by memory.
6
+ - **The browser [File System Access (FSA) API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)** --- the same `FileSystemDirectoryHandle` interface a browser exposes, backed by memory.
9
7
 
10
8
  It also ships adapters that translate _between_ those two APIs, so you can run `fs`-based
11
9
  code in the browser on top of a real directory, or expose an `fs`-like filesystem through
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memfs",
3
- "version": "4.57.5",
3
+ "version": "4.57.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -128,14 +128,14 @@
128
128
  "tslib": "2"
129
129
  },
130
130
  "dependencies": {
131
- "@jsonjoy.com/fs-core": "4.57.5",
132
- "@jsonjoy.com/fs-fsa": "4.57.5",
133
- "@jsonjoy.com/fs-node": "4.57.5",
134
- "@jsonjoy.com/fs-node-builtins": "4.57.5",
135
- "@jsonjoy.com/fs-node-to-fsa": "4.57.5",
136
- "@jsonjoy.com/fs-node-utils": "4.57.5",
137
- "@jsonjoy.com/fs-print": "4.57.5",
138
- "@jsonjoy.com/fs-snapshot": "4.57.5",
131
+ "@jsonjoy.com/fs-core": "4.57.7",
132
+ "@jsonjoy.com/fs-fsa": "4.57.7",
133
+ "@jsonjoy.com/fs-node": "4.57.7",
134
+ "@jsonjoy.com/fs-node-builtins": "4.57.7",
135
+ "@jsonjoy.com/fs-node-to-fsa": "4.57.7",
136
+ "@jsonjoy.com/fs-node-utils": "4.57.7",
137
+ "@jsonjoy.com/fs-print": "4.57.7",
138
+ "@jsonjoy.com/fs-snapshot": "4.57.7",
139
139
  "@jsonjoy.com/json-pack": "^1.11.0",
140
140
  "@jsonjoy.com/util": "^1.9.0",
141
141
  "glob-to-regex.js": "^1.0.1",