- skip_lines_with_error: rename to skip_records_with_error
- max_comment_size: new option
- promise: new API module
New features:
- options: new bom option
- columns: enrich error message when provided as literal object
- cast: handle undefined columns
- skip_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 managements:
- babel: include .babelrc to git
New features:
- objname: accept a buffer
Minor enhancements:
- to_line: validation refinements
- trim, ltrim, rtrim: validation refinements
- to: validation refinements
- from_line: validation refinements
- objname: validation refinements
- from: validation refinements
- escape: validation refinements
- skip_empty_lines: validation refinements
- skip_lines_with_empty_values: validation refinements
- skip_lines_with_error: validation refinements
- relax_column_count: validation refinements
- relax: validation refinements
- delimiter: validation refinements
- max_record_size: validation refinements
Fix:
- record_delimiter: fix multi bytes with skip_empty_lines and from_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: respect
ltrim
andrtrim
when defined - delimiter: may be a Buffer
- delimiter: 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 property
- auto_parse: deprecated message on tests
- cast: inject lines property
- cast: deprecate auto_parse
- auto_parse: function get context as second argument
- skip_lines_with_error: DRYed implementation
- skip_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 to skipped_line_count
- skipped line count
- avoid deoptimization due to wrong charAt index #103
- parser writing before assigning listeners
- column: 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.x
- relax_column_count: introduce new option
- columns: 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