2.0.0
Breaking
- Drop CommonJS support. The package is now ESM only;
- Remove Encoderfrom exports;
- Remove deprecated isFormDataLikehelper. UseisFormDatainstead.
Update
- Minimal required Node.js version is 14.18;
- Headers in FormDataEncoder.headersproperty can be accessed in case-insensitive manner. TypeScript users still have correct TS typings, but only for original and lowercased keys (for exampleContent-Typeandcontent-type);
- FormDatainstance will be preserved in array inside of- FormDataEncoderinstance (previously it held a reference to given- FormDatainstance);
- Deprecate isFileLikehelper. UseisFileinstead;
- Deprecate FormDataEncoder.getContentLength()method. The content-length is now static value, so this method makes no sense. UseFormDataEncoder.contentLengthorFormDataEncoder.headers["content-length"]instead.
Add
- Expose FormDataEncoderHeaderstype.
All changes: v1.7.2...v2.0.0