file-type
22.3.0 · 29 Oct 2026MIT83.2M / weekRepositoryHomepagenpmAtom feed
Upgrading file-type From 20.5.0 to 22.3.0
16 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- Breaking22.0.0
- Breaking22.0.0
- Breaking22.0.0
- Breaking22.0.0
- Breaking22.0.0
- Breaking21.0.0
- Breaking21.0.0
- Breaking21.0.0
- Breaking21.0.0
- Breaking21.0.0
Security
Fixes 2 advisories affecting 20.5.0
- file-type affected by infinite loop in ASF parser on malformed input with zero-size sub-headermoderate · GHSA-5v7r-6r5c-r473
- file-type: ZIP Decompression Bomb DoS via [Content_Types].xml entrymoderate · GHSA-j47w-4g3g-c36v
- 21.3.2
Fix ZIP bomb in known-size ZIP probing (GHSA-j47w-4g3g-c36v) a155cd7
- 21.3.1
Fix infinite loop in ASF parser on malformed input (github.com/sindresorhus/file-type/security/advi…) 319abf8
Release by release
22.3.0nothing new or fixed in the note
- New
Add support for Core Audio Format (CAF) (#805) bde605a
- New
Add support for DSDIFF (#804) e49d5b7
- New
- Fixed
Fix streamed OOXML files being detected as zip (#801) 1347414
- Fixed
- New
Add support for ISO 9660 (.iso) (#796) a675457
- New
- Fixed
Fix ZIP detection on Node.js 24 for entries with a data descriptor f24af84
- Fixed
Fix UTF-16 LE text being detected as MPEG audio c891929
- Fixed
- Fixed
Work around esbuild resolving Node-only imports ce4262f
- Fixed
- Breaking
Requires Node.js 22
- Breaking
Dropped Node.js
stream.Readablesupport fromfileTypeFromStream()andfileTypeStream() - Breaking
Sub-exports (e.g.
file-type/core) have been removed. Import everything fromfile-typedirectly. - Breaking
The
ReadableStreamWithFileTypetype has been removed. UseAnyWebReadableByteStreamWithFileTypeinstead. - Breaking
Several MIME types have been corrected or normalized:
- New
Added detection for Apple iWork files:
.key(Keynote),.pages(Pages),.numbers(Numbers) - Fixed
Fixed LibreOffice OOXML files being incorrectly detected as ZIP when reading from streams
- Breaking
21.3.3 – 21.3.42 releases, nothing new or fixed in the notes
5 other lines we could not sort, mostly version bumps
- 22.3.0
Harden EBML header traversal with a bounded tokenizer view (#813) 08bef8e
- 22.3.0
Refactor ZIP detection to use upstream traversal limits (#812) 0c14b6f
- 22.1.0
Suppress Vite and webpack warnings for the intentional runtime import 2da7522
- 21.3.4
Harden parser more aec20a0
- 21.3.3
Harden parser c48c90b 135f91b
1 internal line (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.