@depup/memfs 4.56.11-depup.1 → 4.57.1-depup.0
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/README.md +4 -4
- package/changes.json +3 -3
- package/lib/index.d.ts +12 -4
- package/lib/index.js +9 -4
- package/lib/index.js.map +1 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/memfs
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [memfs](https://www.npmjs.com/package/memfs) @ 4.
|
|
17
|
-
| Processed | 2026-03-
|
|
16
|
+
| Original | [memfs](https://www.npmjs.com/package/memfs) @ 4.57.1 |
|
|
17
|
+
| Processed | 2026-03-21 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 6 |
|
|
20
20
|
|
|
@@ -22,8 +22,8 @@ npm install @depup/memfs
|
|
|
22
22
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
|
-
| @jsonjoy.com/json-pack | ^1.11.0 | ^18.
|
|
26
|
-
| @jsonjoy.com/util | ^1.9.0 | ^18.
|
|
25
|
+
| @jsonjoy.com/json-pack | ^1.11.0 | ^18.1.0 |
|
|
26
|
+
| @jsonjoy.com/util | ^1.9.0 | ^18.1.0 |
|
|
27
27
|
| glob-to-regex.js | ^1.0.1 | ^1.2.0 |
|
|
28
28
|
| thingies | ^2.5.0 | ^2.6.0 |
|
|
29
29
|
| tree-dump | ^1.0.3 | ^1.1.0 |
|
package/changes.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"bumped": {
|
|
3
3
|
"@jsonjoy.com/json-pack": {
|
|
4
4
|
"from": "^1.11.0",
|
|
5
|
-
"to": "^18.
|
|
5
|
+
"to": "^18.1.0"
|
|
6
6
|
},
|
|
7
7
|
"@jsonjoy.com/util": {
|
|
8
8
|
"from": "^1.9.0",
|
|
9
|
-
"to": "^18.
|
|
9
|
+
"to": "^18.1.0"
|
|
10
10
|
},
|
|
11
11
|
"glob-to-regex.js": {
|
|
12
12
|
"from": "^1.0.1",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"to": "^2.8.1"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"timestamp": "2026-03-
|
|
28
|
+
"timestamp": "2026-03-21T20:08:07.017Z",
|
|
29
29
|
"totalUpdated": 6
|
|
30
30
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Stats, Dirent, Volume, StatWatcher, FSWatcher } from '@jsonjoy.com/fs-node';
|
|
2
2
|
import type { IWriteStream } from '@jsonjoy.com/fs-node';
|
|
3
|
-
import { DirectoryJSON, NestedDirectoryJSON } from '@jsonjoy.com/fs-core';
|
|
3
|
+
import { DirectoryJSON, NestedDirectoryJSON, type IProcess } from '@jsonjoy.com/fs-core';
|
|
4
4
|
import { constants } from '@jsonjoy.com/fs-node-utils';
|
|
5
5
|
import type { FsPromisesApi } from '@jsonjoy.com/fs-node-utils';
|
|
6
6
|
import type * as misc from '@jsonjoy.com/fs-node-utils/lib/types/misc';
|
|
7
7
|
export { DirectoryJSON, NestedDirectoryJSON, Volume };
|
|
8
|
+
export type { IProcess };
|
|
8
9
|
export declare const vol: Volume;
|
|
9
10
|
export interface IFs extends Volume {
|
|
10
11
|
constants: typeof constants;
|
|
@@ -19,17 +20,24 @@ export interface IFs extends Volume {
|
|
|
19
20
|
}
|
|
20
21
|
export declare function createFsFromVolume(vol: Volume): IFs;
|
|
21
22
|
export declare const fs: IFs;
|
|
23
|
+
/** Options for creating a memfs instance. */
|
|
24
|
+
export interface MemfsOptions {
|
|
25
|
+
/** Custom working directory for resolving relative paths. Defaults to `'/'`. */
|
|
26
|
+
cwd?: string;
|
|
27
|
+
/** Custom `process`-like object for controlling platform, uid, gid, and cwd behavior. */
|
|
28
|
+
process?: IProcess;
|
|
29
|
+
}
|
|
22
30
|
/**
|
|
23
31
|
* Creates a new file system instance.
|
|
24
32
|
*
|
|
25
33
|
* @param json File system structure expressed as a JSON object.
|
|
26
34
|
* Use `null` for empty directories and empty string for empty files.
|
|
27
|
-
* @param
|
|
28
|
-
* relative to
|
|
35
|
+
* @param cwdOrOpts Current working directory (string) or options object.
|
|
36
|
+
* The JSON structure will be created relative to the cwd path.
|
|
29
37
|
* @returns A `memfs` file system instance, which is a drop-in replacement for
|
|
30
38
|
* the `fs` module.
|
|
31
39
|
*/
|
|
32
|
-
export declare const memfs: (json?: NestedDirectoryJSON,
|
|
40
|
+
export declare const memfs: (json?: NestedDirectoryJSON, cwdOrOpts?: string | MemfsOptions) => {
|
|
33
41
|
fs: IFs;
|
|
34
42
|
vol: Volume;
|
|
35
43
|
};
|
package/lib/index.js
CHANGED
|
@@ -45,13 +45,18 @@ exports.fs = createFsFromVolume(exports.vol);
|
|
|
45
45
|
*
|
|
46
46
|
* @param json File system structure expressed as a JSON object.
|
|
47
47
|
* Use `null` for empty directories and empty string for empty files.
|
|
48
|
-
* @param
|
|
49
|
-
* relative to
|
|
48
|
+
* @param cwdOrOpts Current working directory (string) or options object.
|
|
49
|
+
* The JSON structure will be created relative to the cwd path.
|
|
50
50
|
* @returns A `memfs` file system instance, which is a drop-in replacement for
|
|
51
51
|
* the `fs` module.
|
|
52
52
|
*/
|
|
53
|
-
const memfs = (json = {},
|
|
54
|
-
const
|
|
53
|
+
const memfs = (json = {}, cwdOrOpts = '/') => {
|
|
54
|
+
const opts = typeof cwdOrOpts === 'string' ? { cwd: cwdOrOpts } : cwdOrOpts;
|
|
55
|
+
// When no explicit cwd is given but a custom process is provided, let the
|
|
56
|
+
// Superblock use that process's cwd(). Otherwise default to '/' so the
|
|
57
|
+
// convenience function keeps its opinionated virtual-root default.
|
|
58
|
+
const cwd = opts.cwd ?? (opts.process ? undefined : '/');
|
|
59
|
+
const vol = fs_node_1.Volume.fromNestedJSON(json, cwd, { process: opts.process });
|
|
55
60
|
const fs = createFsFromVolume(vol);
|
|
56
61
|
return { fs, vol };
|
|
57
62
|
};
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAoCA,gDA+BC;AAnED,kDAS8B;AASe,uFAf3C,gBAAM,OAe2C;AANnD,8DAAuD;AAIvD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,yBAAS,CAAC;AAK7C,kBAAkB;AACL,QAAA,GAAG,GAAG,IAAI,gBAAM,EAAE,CAAC;AAchC,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAT,yBAAS,EAAE,KAAK,EAAL,eAAK,EAAE,MAAM,EAAN,gBAAM,EAAgB,CAAC;IAE9E,mBAAmB;IACnB,KAAK,MAAM,MAAM,IAAI,8BAAoB;QAAE,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,UAAU;YAAE,EAAE,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrH,KAAK,MAAM,MAAM,IAAI,2BAAiB;QAAE,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,UAAU;YAAE,EAAE,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAElH,EAAE,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IACjC,EAAE,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAC7B,EAAE,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAC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CAAC;IAC1F,0EAA0E;IAC1E,uEAAuE;IACvE,mEAAmE;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,gBAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACxE,MAAM,EAAE,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;AACrB,CAAC,CAAC;AAZW,QAAA,KAAK,SAYhB;AAKF,MAAM,CAAC,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,UAAE,EAAE,CAAC;AAC9C,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/memfs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.57.1-depup.0",
|
|
4
4
|
"description": "In-memory file-system with Node's fs API. (with updated dependencies)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"memfs",
|
|
@@ -130,16 +130,16 @@
|
|
|
130
130
|
"tslib": "2"
|
|
131
131
|
},
|
|
132
132
|
"dependencies": {
|
|
133
|
-
"@jsonjoy.com/fs-core": "4.
|
|
134
|
-
"@jsonjoy.com/fs-fsa": "4.
|
|
135
|
-
"@jsonjoy.com/fs-node": "4.
|
|
136
|
-
"@jsonjoy.com/fs-node-builtins": "4.
|
|
137
|
-
"@jsonjoy.com/fs-node-to-fsa": "4.
|
|
138
|
-
"@jsonjoy.com/fs-node-utils": "4.
|
|
139
|
-
"@jsonjoy.com/fs-print": "4.
|
|
140
|
-
"@jsonjoy.com/fs-snapshot": "4.
|
|
141
|
-
"@jsonjoy.com/json-pack": "^18.
|
|
142
|
-
"@jsonjoy.com/util": "^18.
|
|
133
|
+
"@jsonjoy.com/fs-core": "4.57.1",
|
|
134
|
+
"@jsonjoy.com/fs-fsa": "4.57.1",
|
|
135
|
+
"@jsonjoy.com/fs-node": "4.57.1",
|
|
136
|
+
"@jsonjoy.com/fs-node-builtins": "4.57.1",
|
|
137
|
+
"@jsonjoy.com/fs-node-to-fsa": "4.57.1",
|
|
138
|
+
"@jsonjoy.com/fs-node-utils": "4.57.1",
|
|
139
|
+
"@jsonjoy.com/fs-print": "4.57.1",
|
|
140
|
+
"@jsonjoy.com/fs-snapshot": "4.57.1",
|
|
141
|
+
"@jsonjoy.com/json-pack": "^18.1.0",
|
|
142
|
+
"@jsonjoy.com/util": "^18.1.0",
|
|
143
143
|
"glob-to-regex.js": "^1.2.0",
|
|
144
144
|
"thingies": "^2.6.0",
|
|
145
145
|
"tree-dump": "^1.1.0",
|
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
"changes": {
|
|
150
150
|
"@jsonjoy.com/json-pack": {
|
|
151
151
|
"from": "^1.11.0",
|
|
152
|
-
"to": "^18.
|
|
152
|
+
"to": "^18.1.0"
|
|
153
153
|
},
|
|
154
154
|
"@jsonjoy.com/util": {
|
|
155
155
|
"from": "^1.9.0",
|
|
156
|
-
"to": "^18.
|
|
156
|
+
"to": "^18.1.0"
|
|
157
157
|
},
|
|
158
158
|
"glob-to-regex.js": {
|
|
159
159
|
"from": "^1.0.1",
|
|
@@ -174,8 +174,8 @@
|
|
|
174
174
|
},
|
|
175
175
|
"depsUpdated": 6,
|
|
176
176
|
"originalPackage": "memfs",
|
|
177
|
-
"originalVersion": "4.
|
|
178
|
-
"processedAt": "2026-03-
|
|
177
|
+
"originalVersion": "4.57.1",
|
|
178
|
+
"processedAt": "2026-03-21T20:08:24.264Z",
|
|
179
179
|
"smokeTest": "passed"
|
|
180
180
|
}
|
|
181
181
|
}
|