csv-parse
Advanced tools
Comparing version 4.8.2 to 4.8.3
204
CHANGELOG.md
@@ -6,12 +6,16 @@ | ||
* skip_lines_with_empty_values: rename to skip_records_with_empty_values | ||
* skip_lines_with_error: rename to skip_records_with_error | ||
* relax: rename to relax_quotes_when_unquoted | ||
* max_comment_size: new option | ||
* `skip_lines_with_empty_values`: rename to skip_records_with_empty_values | ||
* `skip_lines_with_error`: rename to skip_records_with_error | ||
* `relax`: rename to relax_quotes_when_unquoted | ||
* `max_comment_size`: new option | ||
* promise: new API module | ||
* errors: finish normalisation of all errors | ||
## Version 4.8.3 | ||
* `errors`: handle undefined captureStackTrace | ||
## Version 4.8.2 | ||
* relax_column_count: ts definitions for less and more | ||
* `relax_column_count`: ts definitions for less and more | ||
@@ -24,6 +28,6 @@ ## Version 4.8.1 | ||
* relax_column_count: new less and more options | ||
* `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 | ||
* errors: rename `CSV_INCONSISTENT_RECORD_LENGTH` | ||
* errors: rename `CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH` | ||
@@ -33,17 +37,17 @@ ## Version 4.7.0 | ||
New Feature: | ||
* on_record: user function to alter and filter records | ||
* `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 | ||
* `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 | ||
@@ -62,4 +66,4 @@ | ||
* errors: don't stringify/parse undefined and null values | ||
* errors: expose CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE | ||
* errors: expose CSV_MAX_RECORD_SIZE | ||
* errors: expose `CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE` | ||
* errors: expose `CSV_MAX_RECORD_SIZE` | ||
@@ -72,3 +76,3 @@ ## Version 4.6.3 | ||
* context: null column when columns number inferieur to record length | ||
* context: null column when columns number inferior to record length | ||
@@ -81,7 +85,7 @@ ## Version 4.6.1 | ||
* skip_lines_with_empty_values: handle non string value | ||
* `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: expose `INVALID_OPENING_QUOTE` | ||
@@ -91,7 +95,7 @@ ## Version 4.5.0 | ||
* 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 | ||
* 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` | ||
@@ -115,3 +119,3 @@ ## Version 4.4.7 | ||
* bom: detection when buffer smaller than bom | ||
* package: remove deprecated @types/should dependency | ||
* package: remove deprecated `@types/should` dependency | ||
* package: update file path | ||
@@ -125,3 +129,3 @@ | ||
* bom: parsing for BOM character #239 | ||
* `bom`: parsing for BOM character #239 | ||
* ts: add sync definition | ||
@@ -133,3 +137,3 @@ * package: replace npm ignore with file field | ||
Fix: | ||
* columns: allows returning an array of string, undefined, null or false | ||
* `columns`: allows returning an array of string, undefined, null or false | ||
@@ -139,9 +143,9 @@ ## Version 4.4.0 | ||
New features: | ||
* options: new bom option | ||
* options: new `bom` option | ||
## Version 4.3.4 | ||
* columns: enrich error message when provided as literal object | ||
* cast: handle undefined columns | ||
* skip_lines_with_error: new sample | ||
* `columns`: enrich error message when provided as literal object | ||
* `cast`: handle undefined columns | ||
* `skip_lines_with_error`: new sample | ||
@@ -170,19 +174,19 @@ ## Version 4.3.3 | ||
New features: | ||
* objname: accept a buffer | ||
* `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 | ||
* `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 | ||
@@ -192,4 +196,4 @@ ## Version 4.2.0 | ||
Fix: | ||
* record_delimiter: fix multi bytes with skip_empty_lines and from_line | ||
* rtrim: accept tab | ||
* `record_delimiter`: fix multi bytes with `skip_empty_lines` and `from_line` | ||
* `rtrim`: accept tab | ||
@@ -200,8 +204,8 @@ ## Version 4.1.0 | ||
* options: accept snake case and camel case | ||
* cast: dont call cast for non column-mappable fields | ||
* `cast`: dont call cast for non column-mappable fields | ||
Fix: | ||
* cast: ensure column is a string and not an array | ||
* `cast`: ensure column is a string and not an array | ||
* stream: handle empty input streams | ||
* cast: function may return non-string values | ||
* `cast`: function may return non-string values | ||
* stream: pass stream options without modification | ||
@@ -212,3 +216,3 @@ | ||
Fix: | ||
* relax_column_count: handle records with more columns | ||
* `relax_column_count`: handle records with more columns | ||
@@ -237,9 +241,9 @@ ## Version 4.0.0 | ||
* 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 | ||
* `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 | ||
* `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 | ||
* `comment_lines`: count the number of commented lines with no records | ||
* callback: pass undefined instead of null | ||
@@ -254,3 +258,3 @@ | ||
* max_limit_on_data_read: update error msg | ||
* `max_limit_on_data_read`: update error msg | ||
* src: simplify detection for more data | ||
@@ -265,4 +269,4 @@ * lines: test empty line account for 1 line | ||
* rowDelimiter: fix overlap with delimiter | ||
* internal: rename rowDelimiterLength to rowDelimiterMaxLength | ||
* `rowDelimiter`: fix overlap with delimiter | ||
* internal: rename rowDelimiterLength to `rowDelimiterMaxLength` | ||
@@ -290,3 +294,3 @@ ## Version 3.1.2 | ||
Breaking changes: | ||
* columns: skip empty values when null, false or undefined | ||
* `columns`: skip empty values when null, false or undefined | ||
@@ -303,9 +307,9 @@ Cleanup: | ||
* to: ignore future records when to is reached | ||
* `to`: ignore future records when to is reached | ||
## Version 2.4.0 | ||
* trim: after and before quote | ||
* `trim`: after and before quote | ||
* tests: compatibility with Node.js 10 | ||
* trim: handle quote followed by escape | ||
* `trim`: handle quote followed by escape | ||
* parser: set nextChar to null instead of empty | ||
@@ -316,15 +320,15 @@ * travis: run against node 8 and 10 | ||
* cast: pass the header property | ||
* auto_parse: deprecated message on tests | ||
* cast: inject lines property | ||
* `cast`: pass the header property | ||
* `auto_parse`: deprecated message on tests | ||
* `cast`: inject lines property | ||
## Version 2.2.0 | ||
* cast: deprecate auto_parse | ||
* auto_parse: function get context as second argument | ||
* `cast`: deprecate `auto_parse` | ||
* `auto_parse`: function get context as second argument | ||
## Version 2.1.0 | ||
* skip_lines_with_error: DRYed implementation | ||
* skip_lines_with_error: Go process the next line on error | ||
* `skip_lines_with_error`: DRYed implementation | ||
* `skip_lines_with_error`: Go process the next line on error | ||
* events: register and write not blocking | ||
@@ -377,4 +381,4 @@ * test: prefix names by group membership | ||
* options: auto_parse as a user function | ||
* options: auto_parse_date as a user function | ||
* options: `auto_parse` as a user function | ||
* options: `auto_parse_date` as a user function | ||
* test: should require handled by mocha | ||
@@ -386,3 +390,3 @@ * package: coffeescript 2 and use semver tilde | ||
* relax_column_count: honors count while preserving skipped_line_count | ||
* `relax_column_count`: honors count while preserving skipped_line_count | ||
* api: improve argument validation | ||
@@ -412,3 +416,3 @@ | ||
* skip default row delimiters when quoted #58 | ||
* auto_parse: cleaner implementation | ||
* `auto_parse`: cleaner implementation | ||
* src: isolate internal variables | ||
@@ -422,3 +426,3 @@ | ||
* rowDelimiters: fix all last month issues | ||
* `rowDelimiters`: fix all last month issues | ||
@@ -431,5 +435,5 @@ ## v1.1.10 | ||
* rowDelimiter: simplification | ||
* `rowDelimiter`: simplification | ||
* fix regression when trim and skip_empty_lines activated #122 | ||
* auto_parse = simplify internal function | ||
* `auto_parse` = simplify internal function | ||
@@ -439,11 +443,11 @@ ## V1.1.8 | ||
* src: trailing whitespace and empty headers #120 | ||
* rowDelimiter: adding support for multiple row delimiters #119 | ||
* Remove unnecessary argument: Parser.prototype.\__write #114 | ||
* `rowDelimiter`: adding support for multiple row delimiters #119 | ||
* Remove unnecessary argument: `Parser.prototype.__write` #114 | ||
## v1.1.7 | ||
* skip_lines_with_empty_values: support space and tabs #108 | ||
* `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 | ||
* `skip_lines_with_empty_values` option | ||
* write test illustrating column function throwing an error #98 | ||
@@ -459,3 +463,3 @@ * added ability to skip columns #50 | ||
* empty_line_count counter and renamed skipped to skipped_line_count | ||
* `empty_line_count` counter and renamed skipped to `skipped_line_count` | ||
* skipped line count | ||
@@ -465,3 +469,3 @@ | ||
* avoid deoptimization due to wrong charAt index #103 | ||
* avoid de-optimisation due to wrong charAt index #103 | ||
* parser writing before assigning listeners | ||
@@ -471,3 +475,3 @@ | ||
* column: stop on column count error #100 | ||
* `columns`: stop on column count error #100 | ||
@@ -484,13 +488,13 @@ ## v1.1.2 | ||
* travis: add nodejs 6 | ||
* columns: fix line error #97 | ||
* `columns`: fix line error #97 | ||
## v1.1.0 | ||
* relax_column_count: default to false (strict) | ||
* `relax_column_count`: default to false (strict) | ||
## v1.0.6 | ||
* relax_column_count: backward compatibility for 1.0.x | ||
* relax_column_count: introduce new option | ||
* columns: detect column length and fix lines count | ||
* `relax_column_count`: backward compatibility for 1.0.x | ||
* `relax_column_count`: introduce new option | ||
* `columns`: detect column length and fix lines count | ||
@@ -503,3 +507,3 @@ ## v1.0.5 | ||
* travis: test nodejs versions 4, 5 | ||
* max_limit_on_data_read: new option | ||
* `max_limit_on_data_read`: new option | ||
* removing the duplicate files in test and samples #86 | ||
@@ -511,3 +515,3 @@ * option argument to accept the number of bytes can be read #86 | ||
* sync: support objname | ||
* sync: support `objname` | ||
@@ -532,3 +536,3 @@ ## v1.0.3 | ||
* auto_parse: work on all fields, rename to “is_*” | ||
* auto_parse: simplify test | ||
* `auto_parse`: work on all fields, rename to “is_*” | ||
* `auto_parse`: simplify test |
@@ -1248,3 +1248,7 @@ "use strict"; | ||
_this2 = _possibleConstructorReturn(this, _getPrototypeOf(CsvError).call(this, message)); | ||
Error.captureStackTrace(_assertThisInitialized(_this2), CsvError); | ||
if (Error.captureStackTrace !== undefined) { | ||
Error.captureStackTrace(_assertThisInitialized(_this2), CsvError); | ||
} | ||
_this2.code = code; | ||
@@ -1251,0 +1255,0 @@ |
@@ -1028,3 +1028,5 @@ | ||
super(message) | ||
Error.captureStackTrace(this, CsvError) | ||
if(Error.captureStackTrace !== undefined){ | ||
Error.captureStackTrace(this, CsvError) | ||
} | ||
this.code = code | ||
@@ -1031,0 +1033,0 @@ for(const context of contexts){ |
{ | ||
"version": "4.8.2", | ||
"version": "4.8.3", | ||
"name": "csv-parse", | ||
@@ -26,4 +26,5 @@ "description": "CSV parsing implementing the Node.js `stream.Transform` API", | ||
}, | ||
"author": "David Worms <david@adaltas.com> (https://www.adaltas.com)", | ||
"contributors": [ | ||
"David Worms <david@adaltas.com> (http://www.adaltas.com)", | ||
"David Worms <david@adaltas.com> (https://www.adaltas.com)", | ||
"Will White (https://github.com/willwhite)", | ||
@@ -30,0 +31,0 @@ "Justin Latimer (https://github.com/justinlatimer)", |
130509
2674