Skip to content

Commit

Permalink
Merge pull request #268 from C2FO/8.2.0-rc
Browse files Browse the repository at this point in the history
v8.2.0
  • Loading branch information
doug-martin authored Jul 28, 2019
2 parents 06bffe5 + 5932254 commit 30c3a99
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v3.2.0

* [FIXED] Invalid row index doesn't reflect original row count [#130](https://github.com/C2FO/fast-csv/issues/130) [#266](https://github.com/C2FO/fast-csv/pull/266) - [@chrwnsk](https://github.com/chrwnsk)

# v3.1.0

* Skip trailing whitespace after a quoted field [#223](https://github.com/C2FO/fast-csv/pull/223) - [@peet](https://github.com/peet)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fast-csv",
"version": "3.1.0",
"version": "3.2.0",
"description": "CSV parser and writer",
"main": "./build/src/index.js",
"types": "./build/src/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion src/parser/CsvParserStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export default class CsvParserStream extends Transform {
return cb(new Error('expected transform result'));
}
if (!transformResult.isValid) {
this.rowCount -= 1;
this.emit('data-invalid', transformResult.row, nextRowCount, transformResult.reason);
} else if (!transformResult.row) {
this.rowCount -= 1;
Expand Down
6 changes: 3 additions & 3 deletions test/parser/CsvParsingStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('CsvParserStream', () => {
.then(({ count, rows, invalidRows }) => {
assert.deepStrictEqual(rows, expectedRows);
assert.deepStrictEqual(invalidRows, expectedInvalidRows);
assert.strictEqual(count, rows.length);
assert.strictEqual(count, rows.length + invalidRows.length);
});
});

Expand Down Expand Up @@ -280,7 +280,7 @@ describe('CsvParserStream', () => {
.then(({ count, rows, invalidRows }) => {
assert.deepStrictEqual(invalidRows, invalidValid[1]);
assert.deepStrictEqual(rows, invalidValid[0]);
assert.strictEqual(count, invalidValid[0].length);
assert.strictEqual(count, invalidValid[0].length + invalidValid[1].length);
});
});

Expand All @@ -294,7 +294,7 @@ describe('CsvParserStream', () => {
.then(({ count, rows, invalidRows }) => {
assert.deepStrictEqual(invalidRows, invalidValid[1]);
assert.deepStrictEqual(rows, invalidValid[0]);
assert.strictEqual(count, invalidValid[0].length);
assert.strictEqual(count, invalidValid[0].length + invalidValid[1].length);
});
});

Expand Down

0 comments on commit 30c3a99

Please sign in to comment.