Skip to content

4.1.0

Choose a tag to compare

@octet-stream octet-stream released this 09 Sep 15:42

Add

  • Port Blob from fetch-blob@3 and replace fetch-blob@2 package with our own implementation. Note that formdata-node will switch back to use fetch-blob once we drop CommonJS. Our Blob implementation should be compatible with fetch-blob, so you can use either of them in FormData values. In terms of usage nothing is changed - you can import Blob as from formdata-node package:
import {FormData, Blob} from "formdata-node" // This will now import our own Blob implementation instead of `node-fetch@2`

const form = new FormData()

form.set("file", new Blob(["Some ", "content"]))
  • This release also introduces a new dependency: web-streams-polyfill, so the overall installation size will increase by ≈393KB.

All changes: v4.0.1...v4.1.0