4.0.0
Remove
- [BREAKING] Remove builtin
multipart/form-dataencoder and all related methods. You need check if your HTTP client supports spec-compliant FormData in Node.js and if it don't, then you can suggest them to implementmultipart/form-dataencoding or useform-data-encoderpackage; - [BREAKING] Remove support for
BufferandReadStream(the one you might create withfs.createReadStream), you can useBlob,fileFromPathandfileFromPathSyncto replace them. Other async data sources are still supported - see documentation for more information; - Remove
polyfillentry points; - Remove unused helpers and reduce overall size of the project.
Update
- [BREAKING] Set minimal required Node.js version to 12.20;
- [BREAKING] Separate
fileFromPathfunctions from main entry point:
- import {fileFromPath, fileFromPathSync} from "formdata-node"
+ import {fileFromPath, fileFromPathSync} from "formdata-node/file-from-path"This subpath is NOT available in browsers!
- [BREAKING] Expose
isFilefrom file-from-path subpath;
- import {isFileLike} from "formdata-node"
+ import {isFile} from "formdata-node/file-from-path"- [BREAKING] Rename
FormDataFieldValuetype toFormDataEntryValue(TypeScript specific); - Fix message for the error thrown when
filenameargument passed with non-File value toset()orappend(); - Improved documentation.
Closes #42
All changes: v3.7.0...v4.0.0