@cosyte/astm 0.1.2 → 0.1.4
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/CHANGELOG.md +16 -0
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -29
- package/dist/index.d.ts +53 -29
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f471127: The documentation of `AstmMessage.classification` now says what it has always done: it classifies the whole parsed stream, not one message, so a `Q` in any message of a multi-message stream makes the whole stream read as a host query. To classify one message, call `classifyMessage(m.records)` on each message from `messages()`.
|
|
8
|
+
|
|
9
|
+
The type documentation of `AstmMessageClassification`, `AstmMessageKind`, `QueryRecord`, `UnsupportedRecord`, `classifyMessage` and `ASTM_RECORD_AMBIGUOUS_MESSAGE_KIND` says the same, and that warning's message text now reads "Stream carried both" rather than "Message carried both", because a `Q` in one message and an `R` in another raise it too. Classification, warning codes and every other value are unchanged.
|
|
10
|
+
|
|
11
|
+
## 0.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- fbebdf2: Checking whether a result value is numeric, the check behind the units-absent warning, now takes time linear in the value's length; a value padded with a long run of spaces held the parser for seconds (about 3.5 at 50,000 spaces), and the time grew with the square of the run.
|
|
16
|
+
|
|
17
|
+
Every value is classified exactly as before, so the same results warn.
|
|
18
|
+
|
|
3
19
|
## 0.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -620,9 +620,12 @@ var WARNING_CODES = {
|
|
|
620
620
|
*/
|
|
621
621
|
ASTM_RECORD_UNINTERPRETED_QUERY_STATUS: "ASTM_RECORD_UNINTERPRETED_QUERY_STATUS",
|
|
622
622
|
/**
|
|
623
|
-
*
|
|
624
|
-
*
|
|
623
|
+
* The stream carried **both** a `Q` (request) and an `R` (result) record: a contradictory shape. The
|
|
624
|
+
* stream is classified `host-query` (the `Q` **dominates**, so it is never read as a result set) and
|
|
625
625
|
* this warning flags the anomaly. Positional context only; no field value.
|
|
626
|
+
*
|
|
627
|
+
* Classification is folded over the whole stream, so a `Q` in one message and an `R` in another
|
|
628
|
+
* raise it too. `classifyMessage(m.records)` over `messages()` says which message carried which.
|
|
626
629
|
*/
|
|
627
630
|
ASTM_RECORD_AMBIGUOUS_MESSAGE_KIND: "ASTM_RECORD_AMBIGUOUS_MESSAGE_KIND",
|
|
628
631
|
/**
|
|
@@ -810,7 +813,7 @@ function uninterpretedQueryStatus(position) {
|
|
|
810
813
|
function ambiguousMessageKind(position) {
|
|
811
814
|
return {
|
|
812
815
|
code: WARNING_CODES.ASTM_RECORD_AMBIGUOUS_MESSAGE_KIND,
|
|
813
|
-
message: "
|
|
816
|
+
message: "Stream carried both a Q (request) and an R (result) record, classified host-query; Q dominates.",
|
|
814
817
|
position
|
|
815
818
|
};
|
|
816
819
|
}
|
|
@@ -1938,7 +1941,7 @@ function parseDateField(raw, recordIndex, recordType, fieldIndex, warnings) {
|
|
|
1938
1941
|
return date;
|
|
1939
1942
|
}
|
|
1940
1943
|
function isNumericValue(value) {
|
|
1941
|
-
return /^\s*[<>]
|
|
1944
|
+
return /^\s*(?:[<>]\s*)?-?\d+(?:\.\d+)?\s*$/u.test(value);
|
|
1942
1945
|
}
|
|
1943
1946
|
function fieldRaw(field) {
|
|
1944
1947
|
return field !== void 0 && field.raw.length > 0 ? field.raw : void 0;
|
|
@@ -3144,7 +3147,7 @@ function concatBytes3(chunks) {
|
|
|
3144
3147
|
}
|
|
3145
3148
|
|
|
3146
3149
|
// src/index.ts
|
|
3147
|
-
var VERSION = "0.1.
|
|
3150
|
+
var VERSION = "0.1.4";
|
|
3148
3151
|
|
|
3149
3152
|
exports.ABNORMAL_FLAG_CODES = ABNORMAL_FLAG_CODES;
|
|
3150
3153
|
exports.ABNORMAL_FLAG_VOCABULARY = ABNORMAL_FLAG_VOCABULARY;
|