Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Invalid row index doesn't reflect original row count #130 #266

Closed
wants to merge 24 commits into from
Closed

Fix: Invalid row index doesn't reflect original row count #130 #266

wants to merge 24 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 17, 2019

A detailed report of the issue is reported in #130 .

Changes in this PR:

Previously an invalid row would reduce the total count of parsed rows (passed to the event-handler of end). This caused the row number passed to the event-handler of data-invalid to be incorrect.

This PR changes the value of rowCount passed to the event-handler of end to be the total number of rows in the csv file and passes the absolute rowNumber to the event-handler of data-invalid.
Existing tests were updated to reflect the change.

montera82 and others added 24 commits January 31, 2019 17:59
### Description
Fix grammar to make doc more professional
Fix grammar to make doc more professional
Install safer-buffer polyfill to maintain compatibility with node < 6. See
https://nodejs.org/de/docs/guides/buffer-constructor-deprecation/#variant-2
Also, lock our node 4 to a known working version
* Updated to Node 8
* Rewrote in Typescript
* Calling the library as a function has been removed in favor of `csv.parse`.
  * `csv()` change to `csv.parse()`
* Deprecated `fromString` in favor of `parseString`
  * `csv.fromString()` change to `csv.parseString()`
* Deprecated `fromStream` in favor of `parseStream`a
    * `csv.fromStream()` change to `csv.parseStream()`
* Deprecated`fromPath` in favor of `parseFile`
    * `csv.fromPath()` change to `csv.parseFile()`

# Conflicts:
#	.travis.yml
#	Gruntfile.js
#	History.md
#	lib/formatter/formatter.js
#	lib/formatter/formatter_stream.js
#	package-lock.json
#	package.json
* Update lodash to address #260
Update lodash to v4.17.13
* Added tests for alternate encoding
doug-martin added a commit that referenced this pull request Jul 28, 2019
* [FIXED] Invalid row index doesn't reflect original row count #130 #266 - @chrwnsk
@doug-martin doug-martin mentioned this pull request Jul 28, 2019
@doug-martin
Copy link
Contributor

I cherry-picked your change to clean up the history, and issued a new PR #268. Ill close this once I publish the new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants