edfcore 0.4.89 → 0.4.91
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/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/io/blob.d.ts +5 -0
- package/dist/io/blob.d.ts.map +1 -1
- package/dist/io/blob.js +5 -0
- package/dist/io/blob.js.map +1 -1
- package/dist/io/bytes.d.ts +5 -0
- package/dist/io/bytes.d.ts.map +1 -1
- package/dist/io/bytes.js +5 -0
- package/dist/io/bytes.js.map +1 -1
- package/docs/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/io/blob.ts +5 -0
- package/src/io/bytes.ts +5 -0
package/dist/constants.d.ts
CHANGED
|
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
|
|
|
109
109
|
readonly reserved: 224;
|
|
110
110
|
};
|
|
111
111
|
/** Published package version. Kept in sync with package.json by a test. */
|
|
112
|
-
export declare const VERSION = "0.4.
|
|
112
|
+
export declare const VERSION = "0.4.91";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/dist/io/blob.d.ts
CHANGED
|
@@ -10,5 +10,10 @@
|
|
|
10
10
|
* contract is verified rather than assumed.
|
|
11
11
|
*/
|
|
12
12
|
import type { BlobLike, ByteSource } from '../types.js';
|
|
13
|
+
/**
|
|
14
|
+
* A `ByteSource` over a `Blob` or `File` — the browser entry point, and what an
|
|
15
|
+
* `<input type="file">` hands you. Reads are ranged, so opening a file the user picked costs the
|
|
16
|
+
* header rather than the recording.
|
|
17
|
+
*/
|
|
13
18
|
export declare function blobSource(blob: BlobLike): ByteSource;
|
|
14
19
|
//# sourceMappingURL=blob.d.ts.map
|
package/dist/io/blob.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/io/blob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAe,MAAM,aAAa,CAAC;AAGrE,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAerD"}
|
|
1
|
+
{"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/io/blob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAe,MAAM,aAAa,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAerD"}
|
package/dist/io/blob.js
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
* contract is verified rather than assumed.
|
|
11
11
|
*/
|
|
12
12
|
import { assertExactRead, assertReadRange, throwIfAborted } from './source.js';
|
|
13
|
+
/**
|
|
14
|
+
* A `ByteSource` over a `Blob` or `File` — the browser entry point, and what an
|
|
15
|
+
* `<input type="file">` hands you. Reads are ranged, so opening a file the user picked costs the
|
|
16
|
+
* header rather than the recording.
|
|
17
|
+
*/
|
|
13
18
|
export function blobSource(blob) {
|
|
14
19
|
const byteLength = blob.size;
|
|
15
20
|
return {
|
package/dist/io/blob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.js","sourceRoot":"","sources":["../../src/io/blob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/E,MAAM,UAAU,UAAU,CAAC,IAAc;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;IAE7B,OAAO;QACL,UAAU;QACV,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,MAAc,EAAE,OAAqB;YAC9D,cAAc,CAAC,OAAO,CAAC,CAAC;YACxB,eAAe,CAAC,MAAM,EA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
|
package/dist/io/bytes.d.ts
CHANGED
|
@@ -7,5 +7,10 @@
|
|
|
7
7
|
* and this adapter retains nothing the caller does not already hold.
|
|
8
8
|
*/
|
|
9
9
|
import type { ByteSource } from '../types.js';
|
|
10
|
+
/**
|
|
11
|
+
* A `ByteSource` over bytes already in memory, for a file you fetched yourself or a fixture in a
|
|
12
|
+
* test. The signedness of the view is checked at construction rather than at first read: an
|
|
13
|
+
* `Int8Array` has one byte per element and would decode into plausible, wrong sample values.
|
|
14
|
+
*/
|
|
10
15
|
export declare function byteSource(bytes: ArrayBuffer | Uint8Array): ByteSource;
|
|
11
16
|
//# sourceMappingURL=bytes.d.ts.map
|
package/dist/io/bytes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/io/bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,aAAa,CAAC;AAkC3D,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAoCtE"}
|
|
1
|
+
{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/io/bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,aAAa,CAAC;AAkC3D;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAoCtE"}
|
package/dist/io/bytes.js
CHANGED
|
@@ -41,6 +41,11 @@ function describe(value) {
|
|
|
41
41
|
* reason and this one was missed.
|
|
42
42
|
*/
|
|
43
43
|
const BUFFER_TAGS = new Set(['[object ArrayBuffer]', '[object SharedArrayBuffer]']);
|
|
44
|
+
/**
|
|
45
|
+
* A `ByteSource` over bytes already in memory, for a file you fetched yourself or a fixture in a
|
|
46
|
+
* test. The signedness of the view is checked at construction rather than at first read: an
|
|
47
|
+
* `Int8Array` has one byte per element and would decode into plausible, wrong sample values.
|
|
48
|
+
*/
|
|
44
49
|
export function byteSource(bytes) {
|
|
45
50
|
// Refused at CONSTRUCTION, because the alternative is worse than an error. `new Uint8Array(x)`
|
|
46
51
|
// accepts almost anything: a string, a plain object and `null` all yield an empty array, and a
|
package/dist/io/bytes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src/io/bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5F;;;GAGG;AACH,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAC5C,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzF,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IACjD,6FAA6F;IAC7F,iDAAiD;IACjD,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC3D,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CA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.
|
|
|
6
6
|
edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
|
|
7
7
|
defect; those are called out below.
|
|
8
8
|
|
|
9
|
+
## 0.4.91
|
|
10
|
+
|
|
11
|
+
- **Added** a docblock to `byteSource` naming the check that happens at construction. A typed
|
|
12
|
+
array of the wrong signedness passes a length test and then decodes into plausible, wrong
|
|
13
|
+
samples, which is why the refusal is up front rather than at first read.
|
|
14
|
+
|
|
15
|
+
## 0.4.90
|
|
16
|
+
|
|
17
|
+
- **Added** a docblock to `blobSource`. It is the browser entry point and the first call most
|
|
18
|
+
visitors write, and hovering it showed nothing — the module comment above explains the shim, not
|
|
19
|
+
what the function is for.
|
|
20
|
+
|
|
9
21
|
## 0.4.89
|
|
10
22
|
|
|
11
23
|
- **Added** a docblock to `FormatAnnotationsOptions` stating the property that makes `maxItems`
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/io/blob.ts
CHANGED
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
import type { BlobLike, ByteSource, ReadOptions } from '../types.js';
|
|
14
14
|
import { assertExactRead, assertReadRange, throwIfAborted } from './source.js';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* A `ByteSource` over a `Blob` or `File` — the browser entry point, and what an
|
|
18
|
+
* `<input type="file">` hands you. Reads are ranged, so opening a file the user picked costs the
|
|
19
|
+
* header rather than the recording.
|
|
20
|
+
*/
|
|
16
21
|
export function blobSource(blob: BlobLike): ByteSource {
|
|
17
22
|
const byteLength = blob.size;
|
|
18
23
|
|
package/src/io/bytes.ts
CHANGED
|
@@ -42,6 +42,11 @@ function describe(value: unknown): string {
|
|
|
42
42
|
*/
|
|
43
43
|
const BUFFER_TAGS = new Set(['[object ArrayBuffer]', '[object SharedArrayBuffer]']);
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* A `ByteSource` over bytes already in memory, for a file you fetched yourself or a fixture in a
|
|
47
|
+
* test. The signedness of the view is checked at construction rather than at first read: an
|
|
48
|
+
* `Int8Array` has one byte per element and would decode into plausible, wrong sample values.
|
|
49
|
+
*/
|
|
45
50
|
export function byteSource(bytes: ArrayBuffer | Uint8Array): ByteSource {
|
|
46
51
|
// Refused at CONSTRUCTION, because the alternative is worse than an error. `new Uint8Array(x)`
|
|
47
52
|
// accepts almost anything: a string, a plain object and `null` all yield an empty array, and a
|