3.0.0
Breaking
- Drop Node v10 support. Since its end-of-life is near, I set Node v12 as minimal required version ahead of time.
- The project has been rewritten from the ground up on TypeScript. So, the overall experience for TypeScript users have to be improved.
- Default import has been removed, since
formdata-nodeexposes few more classes and helpers:FormData,FileandfileFromPathSync. 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- Removed support for
ReadableStreamandReadableas field's value. Since the browser-sideFormDatadoesn't allow to use streams as values, I also decided to remove them fromformdata-node. But you are still able to useReadStreamas value – they will automatically converted to File, there's no moreoption.sizeparameter inFormData#{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