skip_lines_with_empty_values
: rename to skip_records_with_empty_valuesskip_lines_with_error
: rename to skip_records_with_errorrelax
: rename to relax_quotes_when_unquotedmax_comment_size
: new optionMinor 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
types
declarationtypes
declaration to a single fileerrors
: handle undefined captureStackTracerelax_column_count
: ts definitions for less and morerelax_column_count
: new less and more optionsCSV_INCONSISTENT_RECORD_LENGTH
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 names
* from_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
CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE
CSV_MAX_RECORD_SIZE
skip_lines_with_empty_values
: handle non string valueINVALID_OPENING_QUOTE
CSV_INVALID_CLOSING_QUOTE
CSV_QUOTE_NOT_CLOSED
CSV_INVALID_RECORD_LENGTH_DONT_PREVIOUS_RECORDS
CSV_INVALID_RECORD_LENGTH_DONT_MATCH_COLUMNS
CSV_INVALID_COLUMN_MAPPING
@types/should
dependencybom
: parsing for BOM character #239Fix:
* 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 sampleFix:
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 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:
rowDelimiter
is now record_delimiter
max_limit_on_data_read
is now max_record_size
{error type}: {error description}
info
objectcount
is now info.records
lines
is now info.lines
empty_line_count
is now info.empty_lines
skipped_line_count
is now info.invalid_field_length
context.count
is cast function is now context.records
auto_parse
and auto_parse_date
record
eventraw
option, the row
property is renamed record
max_record_size
is now 0
(unlimited)record
event, use the readable
event and this.read()
insteadNew features:
* new options info
, from_line
and to_line
* trim
: respect ltrim
and rtrim
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 msgrowDelimiter
: fix overlap with delimiterrowDelimiterMaxLength
Breaking changes:
* columns
: skip empty values when null, false or undefined
Cleanup:
* sync: refactor internal variables
* index: use destructuring assignment for deps
to
: ignore future records when to is reachedtrim
: after and before quotetrim
: handle quote followed by escapecast
: pass the header propertyauto_parse
: deprecated message on testscast
: inject lines propertycast
: deprecate auto_parse
auto_parse
: function get context as second argumentskip_lines_with_error
: DRYed implementationskip_lines_with_error
: Go process the next line on errorThis 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.
Irrelevant release, forgot to generate the coffee files.
auto_parse
as a user functionauto_parse_date
as a user functionrelax_column_count
: honors count while preserving skipped_line_countauto_parse
: cleaner implementationrowDelimiters
: fix all last month issuesrowDelimiter
: simplificationauto_parse
= simplify internal functionrowDelimiter
: adding support for multiple row delimiters #119Parser.prototype.__write
#114skip_lines_with_empty_values
: support space and tabs #108skip_lines_with_empty_values
optionempty_line_count
counter and renamed skipped to skipped_line_count
columns
: stop on column count error #100columns
: fix line error #97relax_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 countmax_limit_on_data_read
: new optionobjname
auto_parse
: work on all fields, rename to “is_*”auto_parse
: simplify test