@zenfs/core 2.5.3 → 2.5.5
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/package.json +5 -5
- package/scripts/{test.ts → test.js} +19 -9
- package/types/uint8array.d.ts +0 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenfs/core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "A filesystem, anywhere",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"bin": {
|
|
17
17
|
"make-index": "scripts/make-index.js",
|
|
18
|
-
"zenfs-test": "scripts/test.
|
|
18
|
+
"zenfs-test": "scripts/test.js",
|
|
19
19
|
"zci": "scripts/ci-cli.js"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"globals": "^17.3.0",
|
|
87
87
|
"prettier": "^3.2.5",
|
|
88
88
|
"tsx": "^4.19.1",
|
|
89
|
-
"typedoc": "^0.28.
|
|
90
|
-
"typescript": "^
|
|
91
|
-
"typescript-eslint": "^8.
|
|
89
|
+
"typedoc": "^0.28.18",
|
|
90
|
+
"typescript": "^6.0.0",
|
|
91
|
+
"typescript-eslint": "^8.58.0"
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -149,8 +149,11 @@ mkdirSync(options.coverage, { recursive: true });
|
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Generate the command used to run the tests
|
|
152
|
+
* @param {string} profileName
|
|
153
|
+
* @param {...string} rest
|
|
154
|
+
* @returns {string}
|
|
152
155
|
*/
|
|
153
|
-
function makeCommand(profileName
|
|
156
|
+
function makeCommand(profileName, ...rest) {
|
|
154
157
|
const command = [
|
|
155
158
|
'tsx --trace-deprecation',
|
|
156
159
|
options.inspect ? '--inspect' : '',
|
|
@@ -168,7 +171,10 @@ function makeCommand(profileName: string, ...rest: string[]): string {
|
|
|
168
171
|
return command;
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
|
|
174
|
+
/**
|
|
175
|
+
* @param {number} ms
|
|
176
|
+
*/
|
|
177
|
+
function duration(ms) {
|
|
172
178
|
ms = Math.round(ms);
|
|
173
179
|
let unit = 'ms';
|
|
174
180
|
|
|
@@ -182,14 +188,18 @@ function duration(ms: number) {
|
|
|
182
188
|
|
|
183
189
|
const nRuns = Number.isSafeInteger(parseInt(options.runs)) ? parseInt(options.runs) : 1;
|
|
184
190
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
+
/**
|
|
192
|
+
* @typedef {object} RunTestOptions
|
|
193
|
+
* @property {string} name
|
|
194
|
+
* @property {string[]} args
|
|
195
|
+
* @property {string} [statusName]
|
|
196
|
+
* @property {() => boolean} [shouldSkip]
|
|
197
|
+
*/
|
|
191
198
|
|
|
192
|
-
|
|
199
|
+
/**
|
|
200
|
+
* @param {RunTestOptions} config
|
|
201
|
+
*/
|
|
202
|
+
async function runTests(config) {
|
|
193
203
|
const statusName = config.statusName || config.name;
|
|
194
204
|
|
|
195
205
|
const command = makeCommand(config.name, ...config.args);
|
package/types/uint8array.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
See:
|
|
3
|
-
https://developer.mozilla.org/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64
|
|
4
|
-
https://github.com/microsoft/TypeScript/pull/61696
|
|
5
|
-
https://github.com/microsoft/TypeScript/issues/61695
|
|
6
|
-
|
|
7
|
-
@todo Remove when TypeScript 5.9 is released
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
interface Uint8ArrayConstructor {
|
|
11
|
-
/**
|
|
12
|
-
* Creates a new `Uint8Array` from a base64-encoded string.
|
|
13
|
-
* @param string The base64-encoded string.
|
|
14
|
-
* @param options If provided, specifies the alphabet and handling of the last chunk.
|
|
15
|
-
* @returns A new `Uint8Array` instance.
|
|
16
|
-
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
|
|
17
|
-
* chunk is inconsistent with the `lastChunkHandling` option.
|
|
18
|
-
*/
|
|
19
|
-
fromBase64: (string: string) => Uint8Array;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Creates a new `Uint8Array` from a base16-encoded string.
|
|
23
|
-
* @returns A new `Uint8Array` instance.
|
|
24
|
-
*/
|
|
25
|
-
fromHex: (string: string) => Uint8Array;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
29
|
-
/**
|
|
30
|
-
* Converts the `Uint8Array` to a base64-encoded string.
|
|
31
|
-
* @param options If provided, sets the alphabet and padding behavior used.
|
|
32
|
-
* @returns A base64-encoded string.
|
|
33
|
-
*/
|
|
34
|
-
toBase64: () => string;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Sets the `Uint8Array` from a base64-encoded string.
|
|
38
|
-
* @param string The base64-encoded string.
|
|
39
|
-
* @param options If provided, specifies the alphabet and handling of the last chunk.
|
|
40
|
-
* @returns An object containing the number of bytes read and written.
|
|
41
|
-
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
|
|
42
|
-
* chunk is inconsistent with the `lastChunkHandling` option.
|
|
43
|
-
*/
|
|
44
|
-
setFromBase64?: (string: string) => {
|
|
45
|
-
read: number;
|
|
46
|
-
written: number;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Converts the `Uint8Array` to a base16-encoded string.
|
|
51
|
-
* @returns A base16-encoded string.
|
|
52
|
-
*/
|
|
53
|
-
toHex: () => string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Sets the `Uint8Array` from a base16-encoded string.
|
|
57
|
-
* @param string The base16-encoded string.
|
|
58
|
-
* @returns An object containing the number of bytes read and written.
|
|
59
|
-
*/
|
|
60
|
-
setFromHex?: (string: string) => {
|
|
61
|
-
read: number;
|
|
62
|
-
written: number;
|
|
63
|
-
};
|
|
64
|
-
}
|