Skip to content

Releases: octet-stream/form-data

v6.0.3

24 Oct 21:55
87a3756
Compare
Choose a tag to compare

Patch Changes

v6.0.2

24 Oct 17:37
9d245db
Compare
Choose a tag to compare

Patch Changes

v6.0.1

24 Oct 17:33
8598984
Compare
Choose a tag to compare

Patch Changes

v6.0.0

24 Oct 17:28
d2f3cda
Compare
Choose a tag to compare

Major Changes

5.0.1

30 May 15:09
Compare
Choose a tag to compare

Update

  • Update package.json for bundler module resolution (#63)

All changes: v5.0.0...v5.0.1

5.0.0

23 Aug 12:31
Compare
Choose a tag to compare

Breaking

  • Removed CommonJS support. This package is native ESM from now on;
  • Drop Node.js v12 support. Minimal version is 14.17;
  • Remove entries argument from FormData constructor.

Update

  • Port fixes from fetch-blob for FileFromPath.slice() method;
  • Improved types compatibility with addition of File.webkitRelatedPath property (See v4.4.0 release for more info);
  • Improve normalization for File values in FormData.{append,set}() methods (See v4.4.0 release for more info);
  • Fix instanceof checks for File (See v4.4.0 release for more info);
  • Update web-streams-polyfill to 4.0.0-beta.3 (#59).

v4.3.3...v5.0.0

4.4.1

22 Aug 09:50
Compare
Choose a tag to compare

Update

  • Bump web-streams-polyfill to 4.0.0-beta.3 (#59)

All changes: v4.4.0...v4.4.1

4.4.0

19 Aug 16:35
Compare
Choose a tag to compare

Update

  • Backport File.webkitRelativePath property for better types compatibility with native FormData

  • Backport improvements for instanceof checks on File object: It now will recognize File-ish objects and Files as File instance, but not Blob or Blob-ish objects:

    Old behaviour:

    import {Blob, File} from "formdata-node"
    
    const file = new File(["File content"], "file.txt")
    const blob = new Blob()
    
    file instanceof Blob // -> true
    file instanceof File // -> true
    
    blob instanceof Blob // -> true
    blob instanceof File // -> true
    
    const fileLike = {
      [Symbol.toStringTag]: "File",
      name: "file.txt",
      stream() { }
    }
    
    const blobLike = {
      [Symbol.toStringTag]: "Blob",
      stream() { }
    }
    
    fileLike instanceof Blob // -> true
    fileLike instanceof File // -> true
    
    blobLike instanceof Blob // -> true
    blobLike instanceof File // -> true

    New behaviour:

    import {Blob, File} from "formdata-node"
    
    const file = new File(["File content"], "file.txt")
    const blob = new Blob()
    
    file instanceof Blob // -> true
    file instanceof File // -> true
    
    blob instanceof Blob // -> true
    blob instanceof File // -> false
    
    const fileLike = {
      [Symbol.toStringTag]: "File",
      name: "file.txt",
      stream() { }
    }
    
    const blobLike = {
      [Symbol.toStringTag]: "Blob",
      stream() { }
    }
    
    fileLike instanceof Blob // -> true
    fileLike instanceof File // -> true
    
    blobLike instanceof Blob // -> true
    blobLike instanceof File // -> false
  • Backport File values normalization for better alignment with the spec. FormData instances will store Files added via .set() and .append() methods as is.

    Old behaviour:

    import {FormData, File} from "formdata-node"
    
    const file = new File(["File content"], "file.txt")
    const form = new FormData()
    
    form.set("file", file) // will create a new File, then store that new object
    form.get("file") === file // -> false
    
    form.set("file", file, "renamed-file.txt") // will also create a new File (with the new name), then store that new object
    form.get("file") === file // -> false

    New behaviour:

    import {FormData, File} from "formdata-node"
    
    const file = new File(["File content"], "file.txt")
    const form = new FormData()
    
    form.set("file", file) // will store this File instance as is
    form.get("file") === file // -> true
    
    form.set("file", file, "renamed-file.txt") // will create a new File (with the new name), then store that new object
    form.get("file") === file // -> false

All changes: v4.3.3...v4.4.0

4.3.3

12 Jun 01:31
b7b3444
Compare
Choose a tag to compare

Update

  • Remove duplicate row from comparison table (#53)

All changes: v4.3.2...v4.3.3

4.3.2

03 Jan 23:25
Compare
Choose a tag to compare

Update

  • Fix the way how the package exposes typings for the upcoming TypeScript version. Thanks to @jaydenseric for this fix. More information here: #48;
  • Improve documentation for fileFromPath and fileFromPathSync functions.

All changes: v4.3.1...v4.3.2