Skip to content

Latest commit

 

History

History
110 lines (56 loc) · 4.91 KB

CHANGELOG.md

File metadata and controls

110 lines (56 loc) · 4.91 KB

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

5.0.0 (2023-09-07)

⚠ BREAKING CHANGES

    • parseValue now receives the escaped value and an additional argument quoted
  • utility function unescapeValue is removed

Features

  • parseValue now receives the escaped value and an additional argument quoted (fbc13bc)
  • support dot notation like coordinates.1 for headers to parse into a nested array (67c2685)

Bug Fixes

  • change the nested CSV benchmark to not use nested arrays (not supported by all libraries) (14c45bd)
  • create unique column names in case of duplicates (ac5c247)

4.0.0 (2023-06-02)

⚠ BREAKING CHANGES

  • The API is now generic, so you can use the library like json2csv<User>(...) and csv2json<User>(...). The typings of the value getters and setters (getValue and setValue) is changed, and the type of NestedObject is changed.

Features

  • improved TypeScript support (fixes #2) (9ec74ae)

3.0.4 (2023-05-31)

Bug Fixes

  • workaround for TypeScript throwing an error regarding a circular reference (see #2) (219df1a)

3.0.3 (2023-04-03)

Bug Fixes

  • escape double quotes in column names (72519a9)

3.0.2 (2023-03-09)

Bug Fixes

  • make the build-in parseValue robust against invalid json arrays and objects (4faa963)

3.0.1 (2023-03-08)

Bug Fixes

  • negative values not being parsed into numbers when converting a csv file to json (8a99af7)

3.0.0 (2023-03-07)

⚠ BREAKING CHANGES

  • Dropped the flattenArray option, use flatten: isObjectOrArray instead. Also, the utility function isObjectOrArray is now strict and does not return true for classes.

Features

  • change flatten into a boolean or callback again and make it strict, not matching classes (5d99eb6)
  • export utility functions isObject and isObjectAndArray (ecdf273)
  • performance improvement (b6b2528)
  • performance improvement in parsing a CSV file (baef63a)
  • use the esm output instead of src in the benchmarks (is faster) (cefeeb6)

2.0.0 (2023-03-06)

⚠ BREAKING CHANGES

  • you can no longer pass a callback value to flatten. Use flattenArray instead.

  • chore: enable benchmarking multiple file sizes again

  • chore: a bit more refactoring in collectNestedPaths

  • chore: add a unit test for Date

Features

Bug Fixes

  • benchmark validation on linux (some libraries output \n on linux and \r\n on windows) (aa1bcfa)
  • flattening not always working when having mixed contents (15b97b0)
  • getting a nested property failing when iterating over a null value (759f199)

1.0.0 (2023-02-21)

Features

  • first version