Skip to content

2.0.0

Compare
Choose a tag to compare
@octet-stream octet-stream released this 22 May 01:40

Breaking

  • Drop CommonJS support. The package is now ESM only;
  • Remove Encoder from exports;
  • Remove deprecated isFormDataLike helper. Use isFormData 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 example Content-Type and content-type);
  • FormData instance will be preserved in array inside of FormDataEncoder instance (previously it held a reference to given FormData instance);
  • Deprecate isFileLike helper. Use isFile instead;
  • Deprecate FormDataEncoder.getContentLength() method. The content-length is now static value, so this method makes no sense. Use FormDataEncoder.contentLength or FormDataEncoder.headers["content-length"] instead.

Add

  • Expose FormDataEncoderHeaders type.

All changes: v1.7.2...v2.0.0