@zenfs/core 0.0.9 → 0.0.11
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/browser.min.js +1 -1
- package/dist/browser.min.js.map +2 -2
- package/dist/utils.d.ts +1 -7
- package/dist/utils.js +2 -2
- package/package.json +4 -3
package/dist/utils.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
2
|
/**
|
|
4
3
|
* Grab bag of utility functions used across the code.
|
|
5
4
|
*/
|
|
6
5
|
import { FileSystem } from './filesystem.js';
|
|
7
6
|
import { Cred } from './cred.js';
|
|
8
7
|
import type { BaseBackendConstructor } from './backends/backend.js';
|
|
9
|
-
import type { TextEncoder as TextEncoderType, TextDecoder as TextDecoderType } from 'node:util';
|
|
10
8
|
/**
|
|
11
9
|
* Synchronous recursive makedir.
|
|
12
10
|
* @internal
|
|
@@ -27,15 +25,11 @@ export declare function toPromise(fn: (...fnArgs: unknown[]) => unknown): (...ar
|
|
|
27
25
|
/**
|
|
28
26
|
* @internal
|
|
29
27
|
*/
|
|
30
|
-
export declare const setImmediate:
|
|
28
|
+
export declare const setImmediate: (callback: () => unknown) => void;
|
|
31
29
|
/**
|
|
32
30
|
* @internal
|
|
33
31
|
*/
|
|
34
32
|
export declare const ROOT_NODE_ID: string;
|
|
35
|
-
declare global {
|
|
36
|
-
const TextEncoder: typeof TextEncoderType;
|
|
37
|
-
const TextDecoder: typeof TextDecoderType;
|
|
38
|
-
}
|
|
39
33
|
export declare const encode: (input?: string) => Uint8Array;
|
|
40
34
|
export declare const decode: (input?: ArrayBuffer | NodeJS.ArrayBufferView, options?: {
|
|
41
35
|
stream?: boolean;
|
package/dist/utils.js
CHANGED
|
@@ -212,8 +212,8 @@ export const setImmediate = typeof globalThis.setImmediate == 'function' ? globa
|
|
|
212
212
|
* @internal
|
|
213
213
|
*/
|
|
214
214
|
export const ROOT_NODE_ID = '/';
|
|
215
|
-
export const encode = new TextEncoder().encode;
|
|
216
|
-
export const decode = new TextDecoder().decode;
|
|
215
|
+
export const encode = new globalThis.TextEncoder().encode;
|
|
216
|
+
export const decode = new globalThis.TextDecoder().decode;
|
|
217
217
|
/**
|
|
218
218
|
* Generates a random ID.
|
|
219
219
|
* @internal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenfs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "A filesystem in your browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist",
|
|
@@ -42,13 +42,14 @@
|
|
|
42
42
|
"build:docs": "typedoc --out docs --name ZenFS src/index.ts",
|
|
43
43
|
"prepublishOnly": "npm run build"
|
|
44
44
|
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@types/node": "^14.0.0"
|
|
47
|
+
},
|
|
45
48
|
"devDependencies": {
|
|
46
49
|
"@jest/globals": "^29.5.0",
|
|
47
50
|
"@types/jest": "^29.5.1",
|
|
48
|
-
"@types/node": "^14.18.62",
|
|
49
51
|
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
50
52
|
"@typescript-eslint/parser": "^5.55.0",
|
|
51
|
-
"buffer": "~5.1.0",
|
|
52
53
|
"cross-env": "^7.0.3",
|
|
53
54
|
"esbuild": "^0.17.18",
|
|
54
55
|
"eslint": "^8.36.0",
|