@jarenjs/josl 0.87.0 → 0.89.0

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/FORMAT.md CHANGED
@@ -224,6 +224,8 @@ information that cannot be recovered downstream:
224
224
  - A trailing terminator does not produce a final empty record.
225
225
  - A quoted cell is never trimmed and never coerced: the quotes are the
226
226
  author marking the content as text.
227
+ - Header names remain text even with `typed: true`; coercion applies only
228
+ to data rows, in both whole-document and streaming reads.
227
229
  - A missing column is **absent**, not empty — `undefined` says the record
228
230
  did not carry it, `''` would claim it carried nothing.
229
231
  - `typed: true` promotes an integer beyond 2^53 to bigint rather than
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jarenjs/josl",
3
3
  "private": false,
4
- "version": "0.87.0",
4
+ "version": "0.89.0",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "types": "./dist/types/index.d.ts",
@@ -99,6 +99,6 @@
99
99
  "./package.json": "./package.json"
100
100
  },
101
101
  "dependencies": {
102
- "@jarenjs/core": "^0.87.0"
102
+ "@jarenjs/core": "^0.89.0"
103
103
  }
104
104
  }
@@ -819,7 +819,7 @@ export class CsvMachine {
819
819
  cell = trimAscii(cell);
820
820
  if (cell.length === 0)
821
821
  return this.emptyAsNull ? null : cell;
822
- return this.typed ? coerceCsvValue(cell) : cell;
822
+ return this.typed && !(this.wantHeader && this.headerFields === null) ? coerceCsvValue(cell) : cell;
823
823
  }
824
824
 
825
825
  // A quoted cell is never trimmed — the quotes are the author saying the