Releases: octet-stream/form-data
Releases · octet-stream/form-data
4.3.1
Update
- Fix typings to allow
Fileconstructor to takeIterable<unknown>asfileBitsargument; - Improvements for in-code documentation.
All changes: v4.3.0...v4.3.1
4.3.0
Update
- Support custom FormData implementations in
instanceoftest viaSymbol.hasInstancemethod; - Expose
package.jsonusingexportsfield (#46); - Deprecate
entriesargument inFormDataconstructor, because it is not spec-compliant.
All changes: v4.2.4...v4.3.0
4.2.4
Update
- Improve type casting for
lastModifiedoption inFileconstructor; - Add Comparison section to readme.md;
All changes: v4.2.3...v4.2.4
4.2.3
Update
- Minor improvements for
Blob.stream()method; - Documentation improvements;
- Mark package as side effect free.
All changes: v4.2.2...v4.2.3
4.2.2
Update
- Deprecate
FileOptionsinterface in favour ofFilePropertyBag; - Documentation improvements;
All changes: v4.2.1...v4.2.2
4.2.1
Update
- Update typings for FileLike interface and improve documentation.
All changes: v4.2.0...v4.2.1
4.2.0
Update
- Replace entry point in
modulefield in package.json, so it will now point to browser entry point. This should fix the issue with Rollup module resolution. See: #44
All changes: v4.1.0...v4.2.0
4.1.0
Add
- Port
Blobfromfetch-blob@3and replacefetch-blob@2package with our own implementation. Note thatformdata-nodewill switch back to usefetch-blobonce we drop CommonJS. OurBlobimplementation should be compatible withfetch-blob, so you can use either of them inFormDatavalues. In terms of usage nothing is changed - you can importBlobas fromformdata-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
4.0.1
Update
- Improvements for
Fileclass spec-compliancy: Make sureFile.nameandFile.lastModifiedproperties read-only in runtime; - Cast
nameargument inFileconstructor tostring; - Improve
lastModifiedoption normalization inFileconstructor to mimic browsers implementation behaviour: WhenlastModifiedoption isNaNit is interpreted as0in browsers; - Improve
filenameargument normalization forFormData.set()andFormData.append()methods.
All changes: v4.0.0...v4.0.1
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