Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 3.33 KB

CHANGELOG.md

File metadata and controls

60 lines (38 loc) · 3.33 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.2.0] - 2023-07-22

Major commits:

Changed

  • Busboy file stream errors are now caught and forwarded to the corresponding Pechkin file streams. Pechkin file stream is destroyed and the same error is thrown, with "Error in busboy file stream" prepended.

[2.1.0] - 2023-07-21

Major commits:

Changed

  • Cleanup process on request errors. Previously, only request.unpipe() was called on error. Now, an approach inspired by Multer source code was taken:
    • Unpipe the request stream from the parser

    • Remove all event listeners from the parser

    • Resume the request stream.

      • Why req.resume() and not req.pause()?

        • Pausing causes the internal Node.js TCP stack buffers to overflow, backpressure is propagated through the network, TCP congestion control kicks in, and may probably slow down the network (?)
        • Resuming doesn't consume any additional memory, and any CPU usage is negligible (networks are much slower than CPUs)
      • Why not req.destroy()?

        • I'm actually not sure. I think it's better to leave it up to the user to decide when and how to close the request. A simple res.end() should be enough.

[2.0.1] - 2023-07-13

Update documentation for NPM.

[2.0.0] - 2023-07-13

For migration guide, check comments on file system and S3 upload examples.

Major commits:

Added

Fixed

  • maxFileByteLength error handling: maxFileByteLength now works as expected and throws an error when the file size exceeds the limit. ByteLengthTruncateStream now directly throws the maxFileByteLength Error. Previously, only the byteLength property (the event handlers inside the promise creation) were responsible for throwing the length limit error; which meants that if you don't use and properly error-handle the byteLength promise, in case file byte length limit was reached, it'd trigger an unhandled promise rejection.

Removed