Breaking
- Require Node.js 12.20 (#472) 826b4ad
- This package is now pure ESM. Please read this.
- Remove the
/browser
sub-export 287e361- Browser support is now included by default.
- Moved from a default export to named exports:
require('file-type').fromBuffer
→import {fileTypeFromBuffer} from 'file-type'
require('file-type').fromFile
→import {fileTypeFromFile} from 'file-type'
require('file-type').fromStream
→import {fileTypeFromStream} from 'file-type'
require('file-type').fromTokenizer
→import {fileTypeFromTokenizer} from 'file-type'
require('file-type').stream
→import {fileTypeStream} from 'file-type'
require('file-type').extensions
→import {supportedExtensions} from 'file-type'
require('file-type').mimeTypes
→import {supportedMimeTypes} from 'file-type'
Improvements
- Improve WebM detection (#486) b23be62
- Improve parsing TIFF files (#482) 82c9ccb
- Detect both raw and BDAV versions of MPEG-2 Transport Streams (#497) 4ce6838
- Detect XML UTF-16-BE & UTF-16-LE via pattern matching (#490) a2cf2b3
- Support XML encoding with UTF-8 including BOM field (#491) 8bca6b4