file-type
22.2.0 · 14 Oct 2026MIT51.4M / weekRepositoryHomepagenpmAtom feed
Upgrading file-type from 15.0.0 to 21.3.1
54 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- breaking21.0.0
- breaking21.0.0
- breaking21.0.0
- breaking21.0.0
- breaking21.0.0
- breaking21.0.0
- breaking20.0.0
- breaking20.0.0
- breaking19.0.0
- breaking19.0.0
Security
1 advisory still affects 21.3.1
- file-type: ZIP Decompression Bomb DoS via [Content_Types].xml entrymoderate · GHSA-j47w-4g3g-c36v
Upgrading to 21.3.2 clears it.
Fixes 2 advisories affecting 15.0.0
- file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-headermoderate · GHSA-5v7r-6r5c-r473
- file-type vulnerable to Infinite Loop via malformed MKV filehigh · GHSA-mhxj-85r3-2x55
- 21.3.1
Fix infinite loop in ASF parser on malformed input (github.com/sindresorhus/file-type/security/advi…) 319abf8
- 17.1.3
Release by release
21.3.1nothing new or fixed in the note
- new
Add support for Mach-O Universal (aka "Fat") binaries and additional architectures (#779) d223491
- new
- new
Add support for SPSS data files (#787) 889f638
- new
Add support for JMP (#784) 093dba0
- new
- fixed
Fix handling of partial Gunzip file (#783) 710e053
- fixed
- new
Add support for
.tar.gz(gunzipped tarball file) (#763) eda03a7 - new
Add support for Windows registry (.reg) files 0db61ec 7d2ddcf
- new
Add support for Windows registry hive file (
.dat) (#767) f8d62be - fixed
Handle partial unzip (#773) 7ad3a90
- new
- new
Allow options to be directly passed to exported functions (#752) d264029
- new
Add
mpegOffsetToleranceoption (#646) c40840a - fixed
Fix detection of some PAX TAR formats (#762) 574d0d6
- new
- new
Add support Office PowerPoint 2007 (macro-enabled) slide show (#747) f1b4c7a
- new
- new
Add workaround for using
bundleras the module-resolution in TypeScript (#744) 90bfe33
- new
10 other lines we could not sort, mostly version bumps
- 20.1.0
Improve WebP detection (#733) ef486f1
- 19.1.0
Replace Buffer usage with Uint8Array (#633) 00e051bceaf0791ffc1b08b36aee196ccdd95606
- 19.1.0
Please note that fileTypeFromBlob(blob) is streaming the Blob instead of buffering, which require at least Node.js ≥ 20.
- 17.1.2
Improve decoding of mime-type in ZIP file (#546) 1b10a71
- 17.0.1
Update
strtok3&token-typesdependencies for explicitnode:bufferimports (#507) b27fb5f - 16.5.3
Upgrade dependencies 3b08ab1
- 16.5.2
Lock
strtok3dependency - 16.5.0
Remove ASAR 240 bytes of JSON payload length limitation (#453) 07101ac
- 16.5.0
Remove an unnecessary dependency (#458) 3df0ed1
- 16.2.0
Improve PDF / AI (Adobe Illustrator) recognition (#396) 9736aa3
2 internal lines (docs, tests, tooling) left out.