All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
5.6.0 (2024-11-21)
5.5.6 (2024-05-13)
5.5.5 (2024-02-28)
5.5.4 (2024-02-27)
Note: Version bump only for package csv-parse
5.5.3 (2023-12-08)
5.5.2 (2023-10-09)
Note: Version bump only for package csv-parse
5.5.1 (2023-10-05)
- csv-parse: premature close error (c6473a9)
5.5.0 (2023-08-25)
- csv-demo-ts-cjs-node16: upgrade module definition after latest typescript (87fe919)
5.4.1 (2023-08-24)
5.4.0 (2023-05-26)
5.3.10 (2023-05-04)
Note: Version bump only for package csv-parse
5.3.9 (2023-04-30)
Note: Version bump only for package csv-parse
5.3.8 (2023-04-16)
Note: Version bump only for package csv-parse
5.3.7 (2023-04-16)
Note: Version bump only for package csv-parse
5.3.6 (2023-03-03)
Note: Version bump only for package csv-parse
5.3.5 (2023-02-08)
5.3.4 (2023-01-31)
5.3.3 (2022-11-28)
5.3.2 (2022-11-08)
5.3.1 (2022-10-12)
- csv-parse: build from previus commit (29a0916)
- csv-parse: record_delimiter and non default encoding (fix #365) (16fdb2d)
5.3.0 (2022-07-10)
5.2.2 (2022-07-01)
5.2.1 (2022-06-29)
5.2.0 (2022-06-14)
5.1.0 (2022-05-24)
- wg stream api (8a5eb7d)
5.0.4 (2021-12-29)
- correct exports in package.json with webpack (154eafb)
- csv-demo-webpack-ts: remove polyfill (47a99bd)
- csv-demo-webpack-ts: simplify export paths (8d63a14)
- esm exports in package.json files (c48fe47), closes #308
5.0.3 (2021-11-19)
- expose browser esm modules (eb87355)
5.0.2 (2021-11-18)
- csv-parse: buffer unsafe allocation (35c1f4a)
5.0.1 (2021-11-15)
- remove samples from publicatgion (12c221d)
5.0.0 (2021-11-15)
See also CSV package for Node.js version 6 (11/15/2021)
- esm migration (b5c0d4b)
CommonJS consumers must change
require('csv-parse/lib/sync')
torequire('csv-parse/sync')
- csv-parse: rename group_columns_by_name option 74334cf
- csv-parse: rename RECORD_INCONSISTENT_FIELDS_LENGTH 7b55f05
- csv-parse: rename RECORD_DONT_MATCH_COLUMNS_LENGTH fb391c9
- csv-parse: rename skip_records_with_error 0376af7
- csv-parse: rename skip_records_with_empty_values aa432c1
- csv-parse: rename relax to relax_quotes 9fffd50
- csv-parse: export csv error class in sync (fc89380)
- csv-parse: ts callback CsvError argument (899dc67)
- export original lib esm modules (be25349)
- fallback to setTimeout is setImmediate is undefined (3d6a2d0)
- refer to esm files in dist (b780fbd)
- backport support for node 14 (dbfeb78)
- backward support for node 8 (496231d)
- csv-parse: improve record_delimiter validation (67b7da8)
- csv-parse: objname index (015b936)
- csv-parse: skip_line_with_errors used with raw print current buffer (fix #292) (2741990)
- csv-parse: ts type encoding with BufferEncoding (39a4388)
- export ts types in sync (890bf8d)
- replace ts types with typesVersions (acb41d5)
4.16.2 (2021-08-27)
Note: Version bump only for package csv-parse
Note: Version bump only for package csv-parse
- fix: info print the number of encountered line when emited
- feat: cast expose context.empty_lines
- fix: handle empty column names properly
- feat: enforce usage of columns with columns_duplicates_to_array
- fix: update error message with invalid column type
- fix: handle cast value 0 fix #315
- feat: lib/browser compatibility with ES5
- docs: browser demo fix #302
- fix: browserify export parse instead of stringify
- fix: skip_empty_lines don't interfere with from_line
- feat: new ignore_last_delimiters option, solve #193
- feat: generate browser compatible lib
- refactor: rename raw to record
- docs: comment about trimable chars
- refactor: move isCharTrimable
- fix(skip_lines_with_error): work with relax_column_count (#303)
- sample: async iterator
- sample: promises
- package: latest dependencies
- ts: enable strict mode
- package: mocha inside package declaration
- on_record: expose info.error when relax_column_count is activated
- raw: move tests
- package: latest dependencies
- encoding: buffer, detection and options samples
- encoding: return buffer when null or false
- encoding: support boolean values
- api: remove commented code
New features:
- encoding: auto-detect from the bom
- encoding: new option
- bom: multi bom encoding
Fixes & enhancements:
- delimiter: fix buffer size computation
- quote: compatibility with buffer size
- api: partial cache for needMoreData
- escape: support multiple characters
- quote: support multiple characters
- api: fix internal argument name
New feature:
- ts: error types
- ts: support camelcase options (fix #287)
New feature:
- escape: disabled when null or false
Project management:
- travis: test node version 14
Project management:
- mistake in the release
Minor improvements:
- columns_duplicates_to_array: error and type
New feature:
- columns_duplicates_to_array: new option
Project management:
- samples: new file recipie
Minor improvements:
- delimiter: update ts definition
- delimiter: new sample
New Feature:
- delimiter: accept multiple values
Fix:
- sync: disregard emitted null records
New Feature:
- trim: support form feed character
Minor improvements:
- src: cache length in loops
- trim: new sample
- to_line: simple sample
- comment: simple sample
- bom: sample with hidden bom
- bom: test behavior with the column option
- api: fix regression in browser environments
- api: fix input string with output stream
- on_record: catch and handle user errors
- ts: fix
types
declaration
- ts: fix
types
declaration to a single file
errors
: handle undefined captureStackTrace
relax_column_count
: ts definitions for less and more
- package: move pad dependency to dev
relax_column_count
: new less and more options- columns: skip empty records before detecting headers
- errors: rename
CSV_INCONSISTENT_RECORD_LENGTH
- errors: rename
CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH
New Feature:
on_record
: user function to alter and filter records
Minor improvements:
- test: ensure every sample is valid
from_line
: honours inferred column namesfrom_line
: new sample- errors: expose
CSV_INVALID_ARGUMENT
- errors: expose
CSV_INVALID_COLUMN_DEFINITION
- errors: expose
CSV_OPTION_COLUMNS_MISSING_NAME
- errors: expose
CSV_INVALID_OPTION_BOM
- errors: expose
CSV_INVALID_OPTION_CAST
- errors: expose
CSV_INVALID_OPTION_CAST_DATE
- errors: expose
CSV_INVALID_OPTION_COLUMNS
- errors: expose
CSV_INVALID_OPTION_COMMENT
- errors: expose
CSV_INVALID_OPTION_DELIMITER
- error: fix call to supper
Project management:
- package: contributing
- package: code of conduct
- context: column is null when cast force the context creation, fix #260
- errors: don't stringify/parse undefined and null values
- errors: expose
CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE
- errors: expose
CSV_MAX_RECORD_SIZE
- lint: integrate eslint
- context: null column when columns number inferior to record length
- src: set const in for loop
skip_lines_with_empty_values
: handle non string value- errors: add context information
- tests: new error assertion framework
- buffer: serialize to json as string
- errors: expose
INVALID_OPENING_QUOTE
- errors: start normalizing errors with unique codes and context
- errors: expose
CSV_INVALID_CLOSING_QUOTE
- errors: expose
CSV_QUOTE_NOT_CLOSED
- errors: expose
CSV_INVALID_RECORD_LENGTH_DONT_PREVIOUS_RECORDS
- errors: expose
CSV_INVALID_RECORD_LENGTH_DONT_MATCH_COLUMNS
- errors: expose
CSV_INVALID_COLUMN_MAPPING
- travis: remove node.js 8 and add 12
- destroy: test inside readable event
- security: remove regexp vulnerable to DOS in cast option, npm report 69742
- ts: add buffer as allowed type for input, fix #248
- package: latest dependencies
- bom: detection when buffer smaller than bom
- package: remove deprecated
@types/should
dependency - package: update file path
- package: fix files declaration
bom
: parsing for BOM character #239- ts: add sync definition
- package: replace npm ignore with file field
Fix:
columns
: allows returning an array of string, undefined, null or false
New features:
- options: new
bom
option
columns
: enrich error message when provided as literal objectcast
: handle undefined columnsskip_lines_with_error
: new sample
Fix: columns: fix es5 generation
Fix:
- columns: immutable option
Minor enhancements:
- ts: distribute definitions with es5
- ts: unused MatcherFunc type
Project management:
- babel: include .babelrc to git
New features:
objname
: accept a buffer
Minor enhancements:
to_line
: validation refinementstrim
, ltrim, rtrim: validation refinementsto
: validation refinementsfrom_line
: validation refinementsobjname
: validation refinementsfrom
: validation refinementsescape
: validation refinementsskip_empty_lines
: validation refinementsskip_lines_with_empty_values
: validation refinementsskip_lines_with_error
: validation refinementsrelax_column_count
: validation refinementsrelax
: validation refinementsdelimiter
: validation refinementsmax_record_size
: validation refinements
Fix:
record_delimiter
: fix multi bytes withskip_empty_lines
andfrom_line
rtrim
: accept tab
New features:
- options: accept snake case and camel case
cast
: dont call cast for non column-mappable fields
Fix:
cast
: ensure column is a string and not an array- stream: handle empty input streams
cast
: function may return non-string values- stream: pass stream options without modification
Fix:
relax_column_count
: handle records with more columns
This is a complete rewrite based with a Buffer implementation. There are no major breaking changes but it introduces multiple minor breaking changes:
- option
rowDelimiter
is nowrecord_delimiter
- option
max_limit_on_data_read
is nowmax_record_size
- drop the record event
- normalise error message as
{error type}: {error description}
- state values are now isolated into the
info
object count
is nowinfo.records
lines
is nowinfo.lines
empty_line_count
is nowinfo.empty_lines
skipped_line_count
is nowinfo.invalid_field_length
context.count
is cast function is nowcontext.records
- drop support for deprecated options
auto_parse
andauto_parse_date
- drop emission of the
record
event - in
raw
option, therow
property is renamedrecord
- default value of
max_record_size
is now0
(unlimited) - remove the
record
event, use thereadable
event andthis.read()
instead
New features:
- new options
info
,from_line
andto_line
trim
: respectltrim
andrtrim
when defineddelimiter
: may be a Bufferdelimiter
: handle multiple bytes/characters- callback: export info object as third argument
cast
: catch error in user functions- ts: mark info as readonly with required properties
comment_lines
: count the number of commented lines with no records- callback: pass undefined instead of null
API management:
- Multiple tests have been rewritten with easier data sample
- Source code is now written in ES6 instead of CoffeeScript
- package: switch to MIT license
max_limit_on_data_read
: update error msg- src: simplify detection for more data
- lines: test empty line account for 1 line
- options: extract default options
- package: add a few keywords
- src: precompute escapeIsQuote
- travis: test against Node.js 11
rowDelimiter
: fix overlap with delimiter- internal: rename rowDelimiterLength to
rowDelimiterMaxLength
- readme: fix links to project website
- src: generate code
- package: move to csv.js.org
- samples: new cast sample
- package: upgrade to babel 7
- samples: new mixed api samples
- samples: new column script
- samples: update syntax
- package: improve ignore files
Breaking changes:
columns
: skip empty values when null, false or undefined
Cleanup:
- sync: refactor internal variables
- index: use destructuring assignment for deps
- typescript: make definition header more relevant
to
: ignore future records when to is reached
trim
: after and before quote- tests: compatibility with Node.js 10
trim
: handle quote followed by escape- parser: set nextChar to null instead of empty
- travis: run against node 8 and 10
cast
: pass the header propertyauto_parse
: deprecated message on testscast
: inject lines property
cast
: deprecateauto_parse
auto_parse
: function get context as second argument
skip_lines_with_error
: DRYed implementationskip_lines_with_error
: Go process the next line on error- events: register and write not blocking
- test: prefix names by group membership
- events: emit record
- raw: test to ensure it preserve columns
- package: latest dependencies (28 march 2018)
- raw: ensure tests call and success
- package: ignore npm and yarn lock files
- sync: handle errors on last line
- package: move babel to dev dependencies
- package: es5 backward compatibility
- package: ignore yarn lock file
- package: only remove js files in lib
- source: remove unreferenced variables #179
- package: start running tests in preversion
- package: new release workflow
This major version use CoffeeScript 2 which produces a modern JavaScript syntax (ES6, or ES2015 and later) and break the compatibility with versions of Node.js lower than 7.6 as well as the browsers. It is however stable in term of API.
- package: use CoffeeScript 2
- package: revert to CoffeeScript 1
Irrelevant release, forgot to generate the coffee files.
- package: preserve compatibility with Node.js < 7.6
- options:
auto_parse
as a user function - options:
auto_parse_date
as a user function - test: should require handled by mocha
- package: coffeescript 2 and use semver tilde
- options: ensure objectMode is cloned
relax_column_count
: honors count while preserving skipped_line_count- api: improve argument validation
- sync: catch err on write
- relax: handle double quote
- src: group state variable initialisation
- package: update repo url
- quote: disabled when null, false or empty
- src: remove try/catch
- src: optimize estimation for row delimiter length
- lines: improve tests
- src: use in instead of multiple is
- src: string optimization
- skip default row delimiters when quoted #58
auto_parse
: cleaner implementation- src: isolate internal variables
- options: new to and from options
rowDelimiters
: fix all last month issues
- regression with trim and last empty field #123
rowDelimiter
: simplification- fix regression when trim and skip_empty_lines activated #122
auto_parse
= simplify internal function
- src: trailing whitespace and empty headers #120
rowDelimiter
: adding support for multiple row delimiters #119- Remove unnecessary argument:
Parser.prototype.__write
#114
skip_lines_with_empty_values
: support space and tabs #108- test: remove coverage support
- test: group by api, options and properties
skip_lines_with_empty_values
option- write test illustrating column function throwing an error #98
- added ability to skip columns #50
- reduce substr usage
- new raw option
empty_line_count
counter and renamed skipped toskipped_line_count
- skipped line count
- avoid de-optimisation due to wrong charAt index #103
- parser writing before assigning listeners
columns
: stop on column count error #100
- make the parser more sensitive to input
- test case about the chunks of multiple chars without quotes
- test about data emission with newline
- stream: call end if data instance of buffer
- travis: add nodejs 6
columns
: fix line error #97
relax_column_count
: default to false (strict)
relax_column_count
: backward compatibility for 1.0.xrelax_column_count
: introduce new optioncolumns
: detect column length and fix lines count
- fix quotes tests that used data with inconsistent number of #73
- add tests for inconsistent number of columns #73
- throw an error when a column is missing #73
- travis: test nodejs versions 4, 5
max_limit_on_data_read
: new option- removing the duplicate files in test and samples #86
- option argument to accept the number of bytes can be read #86
- avoid unwanted parsing when there is wrong delimiter or row delimiter #86
- sync: support
objname
- sync: please older versions of node.js
- sync: new sample
- sync: new module
- removed global variable record on stream.js example #70
- api: accept buffer with 3 arguments #57
- package: latest dependencies
- spectrum: bypass regression test
auto_parse
: work on all fields, rename to “is_*”auto_parse
: simplify test