Skip to content

v5.0.0

Latest

Choose a tag to compare

@JoernBerkefeld JoernBerkefeld released this 29 Oct 11:21

Breaking Changes

  • Empty-record skipping is enabled by default in the parser, file validation and CLI. It now includes delimiter-only and quoted-empty records; quoted whitespace remains data. Set skipEmptyLines: false or use csv-parser input.csv --no-skip-empty-lines to preserve empty records. Strict physical widths still apply, except for skipped unquoted blank/whitespace-only lines. Nonboolean empty-skipping options are rejected.

Features

  • Opt-in sanitizeRightPadding removes only a contiguous suffix of exactly empty source header names. Interior unnamed columns, named columns and deliberately named mapped headers remain. Any nonempty discarded cell, including whitespace, fails before value mapping; strict widths use the original physical schema.
  • validateFiles and replayFiles support ordered multipart preflight/replay with frozen schema, retained-boundary and cleanup metadata. Optional file-only sanitizeBottom removes the final empty-record suffix across the logical set. Parts are parsed independently, without buffering the empty suffix or modifying sources.

Ordinary streams do not trim bottom records and may emit earlier rows before a later padding error. Complete preflight before destructive work; keep source bytes and deterministic mappings unchanged between validation and replay. Strict delimiter/quoted-empty width errors and enabled strict quote errors remain fatal at EOF. Native ESM and Node.js ^22.22.2 || >=24.15.0 support are unchanged.

Full Changelog: v4.3.0...v5.0.0