edfcore 0.6.56 → 0.6.58
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/source.d.ts +7 -2
- package/dist/io/source.d.ts.map +1 -1
- package/dist/io/source.js +7 -2
- package/dist/io/source.js.map +1 -1
- package/docs/CHANGELOG.md +31 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/io/source.ts +7 -2
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.6.
|
|
112
|
+
export declare const VERSION = "0.6.58";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/dist/io/source.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `ByteSource` contract guard.
|
|
3
3
|
*
|
|
4
|
-
* Layer 5, and the only file in `io/` that imports
|
|
5
|
-
* about EDF.
|
|
4
|
+
* Layer 5, and the only file in `io/` that imports nothing from `io/`: every adapter here calls
|
|
5
|
+
* into this one and it calls into none of them. Nothing here knows anything about EDF.
|
|
6
|
+
*
|
|
7
|
+
* It said "the only file in `io/` that imports an error class" until 0.6.58, which `bytes.ts`,
|
|
8
|
+
* `http.ts` and `read.ts` each disprove by raising one of their own. What is true is the
|
|
9
|
+
* dependency direction, and it is the load-bearing half: a guard the adapters could not all
|
|
10
|
+
* reach would be a contract checked in some of them.
|
|
6
11
|
*
|
|
7
12
|
* The contract is one sentence — a read resolves with EXACTLY `length` bytes or rejects, it
|
|
8
13
|
* never pads and never truncates — and it is *checked on every call*, including calls into a
|
package/dist/io/source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/io/source.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/io/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA0B5E;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAE/D;AAMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAYhG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAuBxF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAE1D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAKnE;AAmDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,UAAU,CAS9E"}
|
package/dist/io/source.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `ByteSource` contract guard.
|
|
3
3
|
*
|
|
4
|
-
* Layer 5, and the only file in `io/` that imports
|
|
5
|
-
* about EDF.
|
|
4
|
+
* Layer 5, and the only file in `io/` that imports nothing from `io/`: every adapter here calls
|
|
5
|
+
* into this one and it calls into none of them. Nothing here knows anything about EDF.
|
|
6
|
+
*
|
|
7
|
+
* It said "the only file in `io/` that imports an error class" until 0.6.58, which `bytes.ts`,
|
|
8
|
+
* `http.ts` and `read.ts` each disprove by raising one of their own. What is true is the
|
|
9
|
+
* dependency direction, and it is the load-bearing half: a guard the adapters could not all
|
|
10
|
+
* reach would be a contract checked in some of them.
|
|
6
11
|
*
|
|
7
12
|
* The contract is one sentence — a read resolves with EXACTLY `length` bytes or rejects, it
|
|
8
13
|
* never pads and never truncates — and it is *checked on every call*, including calls into a
|
package/dist/io/source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/io/source.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/io/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,qBAAqB,EAAE,4BAA4B,CAAC,CAAC,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,gBAAgB,CAAC,QAAiB;IACzC,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,QAAoB,EAAE,MAAc,EAAE,MAAc;IAClF,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAClD,IAAI,cAAc,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC;IAC/C,MAAM,GAAG,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M,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAe;IAC9C,MAAM,SAAS,GAAG,MAAqE,CAAC;IACxF,IAAI,OAAO,SAAS,EAAE,IAAI,KAAK,UAAU,IAAI,OAAO,SAAS,CAAC,UAAU,KAAK,QAAQ;QAAE,OAAO;IAC9F,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,IAAI,cAAc,CACtB,mFAAmF;QACjF,GAAG,QAAQ,WAAW,UAAU,CAAC,MAAM,CAAC,GAAG,EAC7C,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAClC,CAAC;AACJ,CAAC"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,37 @@ alone does not tell you whether you were affected.
|
|
|
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.6.58
|
|
10
|
+
|
|
11
|
+
- **Fixed** `io/source.ts` describing itself as "the only file in `io/` that imports an error
|
|
12
|
+
class". Four of the six do: `bytes.ts` and `http.ts` raise `EdfSourceError` for their own
|
|
13
|
+
failures, `read.ts` raises `EdfBudgetError` and `EdfRangeError`, and this file raises
|
|
14
|
+
`EdfSourceError` for a contract violation.
|
|
15
|
+
- The sentence was a claim about the whole directory, made in the file a reader opens to learn
|
|
16
|
+
how the directory is arranged. What is true is the dependency direction, and it is the half the
|
|
17
|
+
design rests on: `source.ts` imports nothing from `io/`, and every other file in `io/` imports
|
|
18
|
+
it. That is what makes `assertExactRead` reachable from every adapter — including one a caller
|
|
19
|
+
wrote, which is the property the guard exists for.
|
|
20
|
+
- The test counts both halves out of the directory, so a new adapter that skipped the guard fails
|
|
21
|
+
it, and so does a `source.ts` that grows an import from a sibling.
|
|
22
|
+
|
|
23
|
+
## 0.6.57
|
|
24
|
+
|
|
25
|
+
- **Fixed** "the cache never sees a header", said on `large-files.md`, `api-sources.md` and
|
|
26
|
+
`data-sources.md` as the reason `cachedSource` aligns blocks on bytes rather than on records.
|
|
27
|
+
It wraps a `ByteSource`, so every read `openEdf` issues goes through it, the header's two
|
|
28
|
+
included. What it never does is PARSE one, which is what leaves it with no record size.
|
|
29
|
+
- `large-files.md` refuted itself twenty lines further down, in the paragraph that makes the
|
|
30
|
+
cache's best argument: "The first was already resident because the header read at open pulled
|
|
31
|
+
it in, so the reads that come with opening a file are not wasted." Both sentences sit on the
|
|
32
|
+
page a reader consults while choosing `blockBytes`.
|
|
33
|
+
- `types.ts`, beside the option, already carried the qualified version — "never sees a header to
|
|
34
|
+
learn a record size from". That is the shape of 0.6.48: the docblock keeps the qualifier and
|
|
35
|
+
the pages drop it.
|
|
36
|
+
- The new test measures it rather than quoting it. A 4 KiB block turns the header's two reads
|
|
37
|
+
into one underlying read, and reading the same bytes again costs nothing — which is only
|
|
38
|
+
possible if the cache saw them.
|
|
39
|
+
|
|
9
40
|
## 0.6.56
|
|
10
41
|
|
|
11
42
|
- **Fixed** the onset guidance in `src/tal/annotations.ts`, which told a reader to compare on the
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/io/source.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `ByteSource` contract guard.
|
|
3
3
|
*
|
|
4
|
-
* Layer 5, and the only file in `io/` that imports
|
|
5
|
-
* about EDF.
|
|
4
|
+
* Layer 5, and the only file in `io/` that imports nothing from `io/`: every adapter here calls
|
|
5
|
+
* into this one and it calls into none of them. Nothing here knows anything about EDF.
|
|
6
|
+
*
|
|
7
|
+
* It said "the only file in `io/` that imports an error class" until 0.6.58, which `bytes.ts`,
|
|
8
|
+
* `http.ts` and `read.ts` each disprove by raising one of their own. What is true is the
|
|
9
|
+
* dependency direction, and it is the load-bearing half: a guard the adapters could not all
|
|
10
|
+
* reach would be a contract checked in some of them.
|
|
6
11
|
*
|
|
7
12
|
* The contract is one sentence — a read resolves with EXACTLY `length` bytes or rejects, it
|
|
8
13
|
* never pads and never truncates — and it is *checked on every call*, including calls into a
|