Version 6 of the csv package for Node.js is released along its sub projects. Here are the latest versions:
csvversion6.0.0, latest version was5.5.3
csv-generateversion4.0.0, latest version was3.4.3
csv-parseversion5.0.0, latest version was4.16.3
csv-stringifyversion6.0.0, latest version was5.6.5
stream-transformversion4.0.0, latest version was2.1.3
There has been a lot of commits since the last package was released, around 100, way to many to my opinion. Most of the efforts were on migrating to ECMAScript modules (ESM) and providing a robust build infrastructure based on Rollup. The website has been updated and enriched with many examples.
Before presenting the new features, here are the breaking changes first. Some module names have changed depending on your targeted environment. The documentation now provides extensive information and samples on this topic. Also, some options were renamed in the csv-parse package. There aren’t too many:
- CommonJS users shall update the path to the sync modules, from
package_name/lib/synctopackage_name/sync. - Imports are always destructed, eg
import parse from 'csv-parse', there are now default exports. - In the
csv-parsepackage, optionrelaxwas renamedrelax_quotes. - In the
csv-parsepackage, optionskip_lines_with_empty_valueswas renamedskip_records_with_empty_values. - In the
csv-parsepackage, optionskip_lines_with_errorwas renamedskip_records_with_error. - In the
csv-parsepackage, errorCSV_RECORD_DONT_MATCH_COLUMNS_LENGTHwas renamedCSV_RECORD_INCONSISTENT_COLUMNS. - In the
csv-parsepackage, errorINCONSISTENT_RECORD_LENGTHwas renamedRECORD_INCONSISTENT_FIELDS_LENGTH.
Here are the main features:
- All projects and modules are now written as ECMAScript modules.
- Transparent usage between CommonJS and ESM with package.json
exportsproperty - Wrote many samples integrated with the documentation website
- Replace the browser distribution with the IIFE distribution generated by Rollup
- New UMD distribution
- Integrate lint rules on all js and coffee files
- Backport compatibility with Node.js 8 in
csv-stringify - In
csv-parse, print current buffer with optionsskip_line_with_errorsandraw - In
csv-parse, optionobjnamecan now refer to index position - A few TypeScript enhancements
Here is a quick example illustrating some of the changes, using the csv-parse/lib/sync module. In the previous release, the code looked like:
const parse = require('csv-parse/lib/sync');
const records = parse('a, "b" ,c',
relax: true
);
In the latest release, the updated code is now:
// `parse` is now destructured, it is consistent with
// `const parse = require('csv/sync');` if you are using the `csv` package.
// Also, the path to the sync module is now 'csv-parse/sync'
const parse = require('csv-parse/sync');
const records = parse('a, "b" ,c',
// `relax` was renamed `relax_quotes`, this is one of the few options from
// `csv-parse` which were renamed.
relax_quotes: true
);
Please report bugs and propose features to the CSV repository on GitHub.

More Stories
Level Up Instantly: The Fastest Way to Buy Free Fire Diamonds in 2025
What Are the Benefits of Yext SEO for Businesses?
Exhibit Fabrication: Elevating Your Brand Presence at Every Event