Skip to content

Releases: mholt/PapaParse

4.2.0

16 Mar 16:58
Compare
Choose a tag to compare

This release adds support for parsing NodeStreams, so papaparse can be used directly on NodeJS.

Thanks to @LeviticusMB for implementing this.

4.1.0

16 Jan 20:44
Compare
Choose a tag to compare

This release is comprised mainly of internal re-factorings, but a few minor behavioral things changed. Most users will not be broken with this release:

  • fastMode is automatically enabled if no quotes (") are found in the input. Fast mode can be forced on or off by explicitly setting it to true or false, respectively.
  • The config object used to be checked for validity across all its fields, but this was a watering hole for bugs and no exceptions were thrown. We removed that logic and now expect the user to pass in valid config settings. Passing in bad values will probably result in errors during parsing.

The internal refactoring that took place should help prepare Papa Parse for a possible direct Node.js port in the future. The overall number of lines of code was reduced by about 10%.

Papa Parse 4

19 Nov 15:30
Compare
Choose a tag to compare

Papa Parse 4 sports a new core parser, completely rewritten from scratch, and is now the fastest CSV parser for the browser. Notable features include:

  • 5x to 10x speed boost thanks to a new parsing algorithm
  • Fast mode for even faster parsing, as long as the input has no quoted fields
  • You can now pause, resume, and abort parsing within the chunk callback
  • keepEmptyRows is replaced with skipEmptyLines. New default behavior is to keep empty lines unless you specify otherwise.
  • Comments can now start with more than a single character (like "//" instead of just "#")
  • Got rid of errors that weren't helpful; now any errors that are generated are always cause for concern
  • Bug fixes

See the docs and the blog post for more information.

3.1.2

02 Sep 15:47
Compare
Choose a tag to compare

Minor but important fixes for bugs that snuck into 3.1.

3.1

01 Sep 19:24
Compare
Choose a tag to compare
3.1

Several improvements and bug fixes.

New

  • Pause, resume, and abort parsing. The step callback now receives a ParserHandle as an argument:
step: function(results, handle) {
    // pausing makes the parse function asynchronous if it wasn't already
    handle.pause();
    // save a reference to it, then resume later:
    handle.resume();
    // you can also abort entirely:
    handle.abort();
}
  • New chunk config callback. For parsing files only. Instead of being invoked for every row of parsed data, it is only invoked with every chunk of a file that is loaded. It receives by argument the results of the entire chunk.
  • New keepEmptyRows config property. If true, rows that are empty (blank or contain only whitespace) will be preserved.
  • New error config property. For use if FileReader encounters an error while opening a file.
  • New truncated meta property. Results meta now indicates, when using preview, whether the results were truncated. The value will only be true if the preview does not consume the entire input.
  • New Papa.DefaultDelimiter setting. Set to a comma (',') by default, this value is used if a delimiter is not set and the delimiter cannot be automatically detected.

Fixed or changed

  • A bug in Firefox prevents FileReader from being used in a worker thread. Until they release that fix, FileReaderSync is used as a workaround. Note that FileReaderSync is not as performant. This workaround will be removed as soon as possible.
  • When converting JSON to CSV, a null value is now treated as an empty string rather than throwing an exception.
  • When using preview with header enabled, the preview value specifies how many rows of data, not how many rows total. In other words, 1 is added to the preview value. (For instance, before, preview: 10 with header: true would parse only 9 rows of data because the first was the header row. Now, 11 total rows are parsed to compensate for the header row.)
  • Handling a certain edge case of escaped quotes in fields correctly
  • Now firing complete callback properly when parsing with a worker thread

Plus a few other minor improvements or internal changes.

3.0

16 Jul 00:38
Compare
Choose a tag to compare
3.0

Lots of improvements and new features.

Added:

  • Download and parse files
  • Stream files over the network
  • "Unparse" utility (convert JSON to CSV)
  • Worker thread support
  • Option to skip commented lines
  • Callback for when all files are complete

Improved/changed:

  • Structure of results
  • jQuery dependency removed but still available
  • Handling of misplaced quotes
  • Internals refactored
  • Better delimiter detection