Releases: coston/json-to-csv-export
Releases · coston/json-to-csv-export
v3.1.0
v3.0.1
RFC-4180 Compliance
Breaking Change
- Default Delimiter Change: The default delimiter has been switched from semicolon (;) to comma (,), in compliance with RFC-4180. This change may affect users relying on the previous default delimiter. Please update your configurations accordingly. For more details, see the discussion here.
New Features and Improvements
- RFC-4180 Compliance: The library now adheres to RFC-4180 rules, ensuring that cell values are wrapped in double-quotes only when they contain a quote, comma (or semicolon if using a semicolon as the delimiter), or carriage-return/newline. This improvement reduces the total file size by avoiding unnecessary quote wrapping and adds stability to generated files, preventing issues with values containing delimiters or newline characters, which are valid for CSV but could previously cause output errors.
Other Updates
- Testing Enhancements: Additional tests have been added to ensure that the generated Blob used in CSV downloads is correctly formatted.
Acknowledgments
Thank you @zachelrath for delivering RFC-4180 compliance ⭐
Updates
- feat(#61)!: Change default delimiter to comma (#64) d1221b8
- chore(deps): Bump postcss and next (#54) 7c6a93f
- chore(deps-dev): Bump @babel/traverse from 7.20.12 to 7.23.2 (#56) 08c5449
- chore: Increase Node compatibility ec243d8
- chore: Increase Node version compatibility eca2d64
For a full list of changes, see the compare view.
cjs and esm exports
- chore: specify node engines d11e8f6
- chore: update ts config 754f694
- chore: sort scripts 6e32295
- docs: update demo page 92d177d
- docs: update demo url a57c52a
- docs: cleanup 050ae05
- docs: build ce2d5e6
- chore: fix build settings e83fa9c
- docs: add demo page (#53) 4ea108a
- chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#52) b45059d
- chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 (#48) dce98c5
- chore(deps): bump json5 and mdx-go (#46) 9febe1c
- chore(deps): bump qs from 6.5.2 to 6.5.3 (#44) 72285b1
- chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#43) 013a3bd
v2.1.1
feat: BOM support for special characters in Excel
Output esm and cjs
v2.0.2 2.0.2
Output esm and cjs
- chore: output esm and cjs e07e472
fix: build to TS commonjs
- fix: build to commonjs 99f91d9
Named parameters and Typescript
Description
Thanks to @dnim for updating the lib to TS and refactoring the function to take named parameters for a simpler developer experience when working when specifying customized behavior.
Breaking Changes
- Named parameters are now required for passing custom
data
,filename
, anddelimeter
props. - Support for the IE
navigator.msSaveBlob
method was removed from the code (as it was removed in new versions of TypeScript). - File name can be provided without
.csv
extension, it will be added automatically
Migration Steps
- update to the new version (2.x)
- map arguments on object props. I.e:
const props = {
data: data,
filename: filename,
delimiter: delimiter
}
csvDownload(props);