Releases: sindresorhus/file-type
Releases Β· sindresorhus/file-type
v16.5.4
v17.1.4
v17.1.3
- Fix: Malformed MKV could cause an infinite loop 2c4d120
- CVE-2022-36313
- Also backported to 16.5.4
v17.1.2
v17.1.1
v17.1.0
v17.0.2
v17.0.1
v17.0.0
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