2.0.0
Breaking
- Drop CommonJS support. The package is now ESM only;
- Remove
Encoder
from exports; - Remove deprecated
isFormDataLike
helper. UseisFormData
instead.
Update
- Minimal required Node.js version is 14.18;
- Headers in
FormDataEncoder.headers
property can be accessed in case-insensitive manner. TypeScript users still have correct TS typings, but only for original and lowercased keys (for exampleContent-Type
andcontent-type
); FormData
instance will be preserved in array inside ofFormDataEncoder
instance (previously it held a reference to givenFormData
instance);- Deprecate
isFileLike
helper. UseisFile
instead; - Deprecate
FormDataEncoder.getContentLength()
method. The content-length is now static value, so this method makes no sense. UseFormDataEncoder.contentLength
orFormDataEncoder.headers["content-length"]
instead.
Add
- Expose
FormDataEncoderHeaders
type.
All changes: v1.7.2...v2.0.0