Skip to content

Releases: sindresorhus/file-type

v13.0.2

07 Jan 16:44
Compare
Choose a tag to compare

v13.0.1

07 Jan 11:16
Compare
Choose a tag to compare

v13.0.0...v13.0.1

v13.0.0

07 Jan 09:08
Compare
Choose a tag to compare

Breaking

  • Require Node.js 10 0b97a85
  • Rewrite the API and make it async (#286) 8f981c3
    • Why: To be non-blocking, to be able to accept a stream as input, and improved file type detection.
    • Migrate:
-const fileType = require('file-type');
+const FileType = require('file-type');

-console.log(fileType(buffer));
+console.log(await FileType.fromBuffer(buffer));
  • Browser supports was moved into a sub-module:
    • Migrate:
-const fileType = require('file-type');
+const fileType = require('file-type/browser');

Enhancements

v12.4.2...v13.0.0

v12.4.2

20 Dec 00:29
Compare
Choose a tag to compare

v12.4.1...v12.4.2

v12.4.1

19 Dec 13:09
Compare
Choose a tag to compare
  • Fix extensions and mimeTypes TypeScript types (#270) eff47af

v12.4.0...v12.4.1

v12.4.0

31 Oct 18:18
Compare
Choose a tag to compare

v12.3.1...v12.4.0

v12.3.1

22 Oct 04:04
Compare
Choose a tag to compare

v12.3.0...v12.3.1

v12.3.0

03 Sep 15:59
Compare
Choose a tag to compare

v12.2.0...v12.3.0

v12.2.0

18 Aug 12:24
Compare
Choose a tag to compare
  • Add fileType.extensions and fileType.mimeTypes properties, so you can check what extension/mime-types this package supports (#229) bca081b
  • Make Buffer usage optional again (for improved browser support) (#232) dc611b4
  • Reduce msi false-positives (#225) 702f795

v12.1.0...v12.2.0

v12.1.0

26 Jul 11:30
Compare
Choose a tag to compare

v12.0.1...v12.1.0