@quario/csv 0.6.0 → 0.7.1
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 +38 -24
- package/README.md +19 -4
- package/lib/index.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,57 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @quario/csv
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 0.7.1
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
### Patch Changes
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
- **Every published README says where the documentation is.** Each package now
|
|
8
|
+
carries a Documentation section pointing at the reference, at the report schema
|
|
9
|
+
that normatively specifies what a report may declare, and at the package's own
|
|
10
|
+
API. The paragraphs that used to end on an unstated contract — the event
|
|
11
|
+
stream's field semantics, the style vocabulary, page columns, the Content
|
|
12
|
+
Security Policy a fragment with images needs, the formula mangling, and each
|
|
13
|
+
target's own contract — link the page that states it. Every link is an absolute
|
|
14
|
+
URL, so it resolves from the npm package page as readily as from an installed
|
|
15
|
+
copy.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- quario@0.8.0
|
|
9
18
|
|
|
10
|
-
##
|
|
19
|
+
## 0.7.0
|
|
11
20
|
|
|
12
|
-
###
|
|
21
|
+
### Minor Changes
|
|
13
22
|
|
|
14
|
-
-
|
|
23
|
+
- **Styled runs flatten to their joined text.** A cell value written as a list of
|
|
24
|
+
styled runs writes the runs' text as one field. This target withdraws every
|
|
25
|
+
style, and a run's is no different.
|
|
15
26
|
|
|
16
|
-
##
|
|
27
|
+
## 0.6.0
|
|
17
28
|
|
|
18
|
-
###
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
- quario@0.6.0
|
|
33
|
+
|
|
34
|
+
## 0.5.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
19
37
|
|
|
20
38
|
- **Spans keep the record rectangular.** A cell covering several columns writes
|
|
21
39
|
its value in the first field it covers and leaves the rest empty, so every
|
|
22
40
|
record is the same width. This target reads no geometry, so there is nothing
|
|
23
41
|
here for a merge to mean.
|
|
24
42
|
|
|
25
|
-
##
|
|
43
|
+
## 0.4.0
|
|
26
44
|
|
|
27
|
-
###
|
|
45
|
+
### Minor Changes
|
|
28
46
|
|
|
29
|
-
-
|
|
47
|
+
- Updated dependencies
|
|
48
|
+
- quario@0.4.0
|
|
30
49
|
|
|
31
|
-
##
|
|
50
|
+
## 0.3.0
|
|
32
51
|
|
|
33
|
-
###
|
|
52
|
+
### Minor Changes
|
|
34
53
|
|
|
35
54
|
- **A table total emits N records.** Each `total-row` is one record, as
|
|
36
55
|
each data row is.
|
|
37
|
-
|
|
38
56
|
- **`format` is unread.** Bare interpolations stay `1000` / ISO dates, as
|
|
39
57
|
every other style is unread here.
|
|
40
|
-
|
|
41
58
|
- **`page.margin` and report-header `height` are unread.** This target has
|
|
42
59
|
no page to inset or pin on.
|
|
43
60
|
|
|
44
|
-
##
|
|
61
|
+
## 0.2.0
|
|
45
62
|
|
|
46
|
-
###
|
|
63
|
+
### Minor Changes
|
|
47
64
|
|
|
48
65
|
- **A split is one record, its slots the fields.** Slots are values beside
|
|
49
66
|
each other, which is what a record is. Slot widths go unread, as every width
|
|
50
67
|
is here. Images stay unread too, but a slot holding one still writes an
|
|
51
68
|
empty field, so the fields either side keep their positions.
|
|
52
|
-
|
|
53
|
-
### Changed
|
|
54
|
-
|
|
55
69
|
- **Display-text `Date`s join as ISO 8601 UTC.** A `Date` inside a mixed
|
|
56
70
|
cell (literal text plus interpolation) joined through `String(date)`, so
|
|
57
71
|
the field carried the host's timezone and locale. It now joins through the
|
|
@@ -59,9 +73,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
59
73
|
typed single-`Date` field has always used, so every `Date` in a CSV now
|
|
60
74
|
reads the same way.
|
|
61
75
|
|
|
62
|
-
##
|
|
76
|
+
## 0.1.0
|
|
63
77
|
|
|
64
|
-
###
|
|
78
|
+
### Minor Changes
|
|
65
79
|
|
|
66
80
|
- **CSV records in render order.** A bare interpolation stays typed text (a
|
|
67
81
|
number's decimal, a Date as ISO 8601 UTC); everything else is display text,
|
package/README.md
CHANGED
|
@@ -100,14 +100,18 @@ quoting.
|
|
|
100
100
|
**Display-text fields that would open as spreadsheet formulas are mangled.** A leading `=`,
|
|
101
101
|
`+`, `-`, `@`, TAB, or CR gets an apostrophe. A consumer that parses the file back does not
|
|
102
102
|
round-trip those fields. The XLSX target does the opposite: it writes an inert string and
|
|
103
|
-
does not mangle.
|
|
103
|
+
does not mangle. See
|
|
104
|
+
[The CSV target](https://getquario.com/docs/diving-deeper/csv-target/#design-decisions).
|
|
104
105
|
|
|
105
106
|
A hidden cell keeps its column slot as an empty field.
|
|
106
107
|
|
|
107
|
-
###
|
|
108
|
+
### Withdrawn, and the unread page bands
|
|
108
109
|
|
|
109
|
-
`style`, column `width`, slot `width`, page columns
|
|
110
|
-
|
|
110
|
+
`style`, column `width`, slot `width`, page columns and images are withdrawn: a record carries no
|
|
111
|
+
presentation, no width and no page, so there is nothing here for any of them to resolve against. An
|
|
112
|
+
image emits no record, though an image in a slot still writes its empty field. Page bands are the
|
|
113
|
+
one unread declaration — this target never calls their closures, so an expression inside one is
|
|
114
|
+
never evaluated and never raises here.
|
|
111
115
|
|
|
112
116
|
### Text shape
|
|
113
117
|
|
|
@@ -124,6 +128,17 @@ presence is normative. That a parser who stops before EOF will see it is best-ef
|
|
|
124
128
|
|
|
125
129
|
Same schema and data produce an identical string.
|
|
126
130
|
|
|
131
|
+
The full contract is [The CSV target](https://getquario.com/docs/diving-deeper/csv-target/),
|
|
132
|
+
with each declaration's fate in the
|
|
133
|
+
[support matrix](https://getquario.com/docs/reference/support-matrix/).
|
|
134
|
+
|
|
135
|
+
## Documentation
|
|
136
|
+
|
|
137
|
+
[The quario documentation](https://getquario.com/docs/) is the reference.
|
|
138
|
+
The [report schema](https://getquario.com/docs/reference/report-schema/) is the normative
|
|
139
|
+
specification of what a report may declare, and
|
|
140
|
+
[`@quario/csv`](https://getquario.com/docs/reference/csv/) is this package's own API.
|
|
141
|
+
|
|
127
142
|
## License
|
|
128
143
|
|
|
129
144
|
Commercial software with readable source. Free, unlimited, watermarked evaluation; per-developer
|
package/lib/index.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* banded walk onto records in render order. A cell that is one bare
|
|
5
5
|
* interpolation keeps a typed string (a number stays decimal, a Date ISO 8601
|
|
6
6
|
* UTC); every other cell is display text, then the formula-injection guard,
|
|
7
|
-
* then RFC 4180 quoting.
|
|
7
|
+
* then RFC 4180 quoting. Styled runs flatten to their joined text -- the join
|
|
8
|
+
* is over the cell's one `tokens` array, so a run needs no branch here.
|
|
9
|
+
* Styles, widths, page bands, and images go unread.
|
|
8
10
|
* The unlicensed marking is a trailing line, so record 1 stays the report's.
|
|
9
11
|
*/
|
|
10
12
|
import { display, text, typed, walk } from "quario";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quario/csv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "The CSV render target for quario — in the makings, not yet released",
|
|
5
5
|
"homepage": "https://getquario.com",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@arethetypeswrong/cli": "^0.18.3",
|
|
40
40
|
"@size-limit/preset-small-lib": "^13.0.3",
|
|
41
|
-
"quario": "^0.
|
|
41
|
+
"quario": "^0.8.0",
|
|
42
42
|
"size-limit": "^13.0.3",
|
|
43
43
|
"typescript": "^7.0.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"quario": "^0.
|
|
46
|
+
"quario": "^0.8.0"
|
|
47
47
|
},
|
|
48
48
|
"size-limit": [
|
|
49
49
|
{
|