Skip to content

stury 0.0.3

Choose a tag to compare

@github-actions github-actions released this 26 Oct 12:45
· 146 commits to main since this release
Immutable release. Only release title and notes can be modified.

Library

  • Record_Read (json and csv) reads each record of one type; CSV can now decode a stream one record at a time.
  • csv.validate_records lists every refused record, as json.validate_records does (core.Record_Fault).
  • csv.query, find and find_column answer paths like JSON's (core.Answer), honouring duplicates.
  • One Read_Opts per format (dialect, strictness, duplicates, limits, and CSV's no_header, which
    replaces header) is taken before the allocator. The JSON edits take dialect before the allocator.
  • One read error: scan, find, request_init and build return Maybe(Error); parse_path and query
    return Maybe(Path_Error). Scan_Error, Request_Error, Capacity, Parse_Error, Prepared and the
    public render_error_to_writer are removed.
  • Renamed: Encode_Error/Encode_Opts to Marshal_Error/Marshal_Opts; the csv destroy procedures are one
    csv.destroy. core/bits and core/path are folded into core. json.records_from and
    json.Record_Reader are removed.
  • Refused instead of misread: an unknown tag flag or unspellable tag (.Bad_Tag), an unsorted or overlapping
    edit list (.Bad_Edit), a Number with no finite value in marshal (.Non_Finite), a CSV cell that
    underflows in get_float, and an edit of a CSV column name two columns share.

Command line

  • stury fmt formats or transcodes files, keeping every number, string, key and comment as written
    (--check, --in-place).
  • --csv, --tsv, --ndjson and --jsonc are removed: use --from and --to.
  • Parse errors at the end of the input name jq's column; --seq reads its files as one stream; debug and
    stderr lines flush in order with the output.
  • Windows: filter arguments are read as UTF-8, -L takes an absolute path, and strftime gives %s, %k and %l.