Skip to content

3.0.0

Choose a tag to compare

@octet-stream octet-stream released this 05 Apr 17:52

Breaking

  1. Drop Node v10 support. Since its end-of-life is near, I set Node v12 as minimal required version ahead of time.
  2. The project has been rewritten from the ground up on TypeScript. So, the overall experience for TypeScript users have to be improved.
  3. Default import has been removed, since formdata-node exposes few more classes and helpers: FormData, File and fileFromPathSync. Also, for TypeScript users there are few types available now. In brief:
import FormData from "formdata-node" // < 3.x version

import {FormData, File, fileFromPathSync} from "formdata-node" // >= 3.x version
  1. Removed support for ReadableStream and Readable as field's value. Since the browser-side FormData doesn't allow to use streams as values, I also decided to remove them from formdata-node. But you are still able to use ReadStream as value – they will automatically converted to File, there's no more option.size parameter in FormData#{append,set}() too.

Add

  • The package will have both CommonJS and ESM entry points. Node.js should pick up the one you need depending on your environment, but feel free to open an issue is something is broken.

Update

  • Documentation improvements and fixes

All changes: v2.5.0...v3.0.0