Skip to content

Update dependency file-type to v22#43

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/file-type-22.x
Open

Update dependency file-type to v22#43
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/file-type-22.x

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate bot commented Mar 26, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
file-type 7.2.022.0.0 age confidence

Release Notes

sindresorhus/file-type (file-type)

v22.0.0

Compare Source

Breaking
  • Requires Node.js 22

  • Dropped Node.js stream.Readable support from fileTypeFromStream() and fileTypeStream()

    // Before
    import fs from 'node:fs';
    fileTypeFromStream(fs.createReadStream('file.mp4'));
    
    // After
    import fs from 'node:fs';
    import {Readable} from 'node:stream';
    fileTypeFromStream(Readable.toWeb(fs.createReadStream('file.mp4')));
  • Sub-exports (e.g. file-type/core) have been removed. Import everything from file-type directly.

  • The ReadableStreamWithFileType type has been removed. Use AnyWebReadableByteStreamWithFileType instead.

  • Several MIME types have been corrected or normalized:

    Type Old MIME New MIME
    lz application/x-lzip application/lzip
    lnk application/x.ms.shortcut application/x-ms-shortcut
    Apple Alias application/x.apple.alias application/x-ft-apple.alias
    fbx application/x.autodesk.fbx application/x-ft-fbx
    Draco application/vnd.google.draco application/x-ft-draco

    MIME subtypes prefixed with x-ft- are custom types defined by this package (not IANA-registered).

Improvements
  • Added detection for Apple iWork files: .key (Keynote), .pages (Pages), .numbers (Numbers)
Fixes
  • Fixed LibreOffice OOXML files being incorrectly detected as ZIP when reading from streams

v21.3.4

Compare Source


v21.3.3

Compare Source


v21.3.2

Compare Source


v21.3.1

Compare Source


v21.3.0

Compare Source

  • Add support for Mach-O Universal (aka "Fat") binaries and additional architectures (#​779) d223491

v21.2.0

Compare Source


v21.1.1

Compare Source


v21.1.0

Compare Source


v21.0.0

Compare Source

Breaking
  • Require Node.js 20 24aec1f
  • Drop Adobe Illustrator (.ai) detection support (#​743) af169f3
  • Correct Matroska (video) MIME-type to formal IANA registration (#​753) f53f5ff
  • Correct FLAC MIME-type to formal IANA registration (#​755) b9fda36
  • Correct Apache Parquet MIME-type to formal IANA registration (#​748) 98e3f8e
  • Correct Apache Arrow MIME-type to formal IANA registration (#​754) 7184775
Improvements
Fixes

v20.5.0

Compare Source

  • Add support Office PowerPoint 2007 (macro-enabled) slide show (#​747) f1b4c7a

v20.4.1

Compare Source

  • Add workaround for using bundler as the module-resolution in TypeScript (#​744) 90bfe33

v20.4.0

Compare Source


v20.3.0

Compare Source


v20.2.0

Compare Source


v20.1.0

Compare Source


v20.0.1

Compare Source


v20.0.0

Compare Source

Breaking
  • Drop MIME-type and extension enumeration in types (#​693) 0ff11c6
  • Remove NodeFileTypeParser in favor of using FileTypeParser on all platforms (#​707) ff8eed8
Improvements
Fixes

v19.6.0

Compare Source

v19.5.0

Compare Source

v19.4.1

Compare Source

  • Fix passing options to fileTypeStream in default entry point (#​653) ea314a4

v19.4.0

Compare Source

v19.3.0

Compare Source

v19.2.0

Compare Source

v19.1.1

Compare Source

  • Fix Node.js entry point export fileTypeFromTokenizer (#​639) 20fdba7

v19.1.0

Compare Source

Release notes

  • Please note that fileTypeFromBlob(blob) is streaming the Blob instead of buffering, which require at least Node.js ≥ 20.

v19.0.0

Compare Source

Breaking
  • Require Node.js 18 7f4b30b
  • Use mime type audio/wav instead of audio/vnd.wave for .wav files (#​620) c7c923c

v18.7.0

Compare Source

v18.6.0

Compare Source

v18.5.0

Compare Source

v18.4.0

Compare Source

v18.3.0

Compare Source

v18.2.1

Compare Source

v18.2.0

Compare Source

v18.1.0

Compare Source

Improvements
Fixes

v18.0.0

Compare Source

Breaking

v17.1.6

Compare Source

v17.1.5

Compare Source

  • Fix PDF detection in some cases a0c24eb

v17.1.4

Compare Source

v17.1.3

Compare Source

v17.1.2

Compare Source

v17.1.1

Compare Source

v17.1.0

Compare Source

v17.0.2

Compare Source

  • Prevent "Concurrent read operation" error to be thrown in some cases while reading from a stream (#​510) 565f7f3

v17.0.1

Compare Source

  • Update strtok3 & token-types dependencies for explicit node:buffer imports (#​507) b27fb5f

v17.0.0

Compare Source

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').fromBufferimport {fileTypeFromBuffer} from 'file-type'
    require('file-type').fromFileimport {fileTypeFromFile} from 'file-type'
    require('file-type').fromStreamimport {fileTypeFromStream} from 'file-type'
    require('file-type').fromTokenizerimport {fileTypeFromTokenizer} from 'file-type'
    require('file-type').streamimport {fileTypeStream} from 'file-type'
    require('file-type').extensionsimport {supportedExtensions} from 'file-type'
    require('file-type').mimeTypesimport {supportedMimeTypes} from 'file-type'
Improvements
Fixes

v16.5.4

Compare Source

v16.5.3

Compare Source

v16.5.2

Compare Source

  • Lock strtok3 dependency

v16.5.1

Compare Source

v16.5.0

Compare Source

v16.4.0

Compare Source

v16.3.0

Compare Source

v16.2.0

Compare Source

v16.1.0

Compare Source

v16.0.1

Compare Source

v16.0.0

Compare Source

Breaking
  • Replace .wma / .wmv with .asf detection (the container format) (#​398) fe331be
Improvements

v15.0.1

Compare Source

v15.0.0

Compare Source

Breaking

v14.7.1

Compare Source

v14.7.0

Compare Source

v14.6.2

Compare Source

  • Fix error when using FileType.fromStream() on small files (#​370) 50eee35

v14.6.1

Compare Source

v14.6.0

Compare Source

v14.5.0

Compare Source

v14.4.0

Compare Source

v14.3.0

Compare Source

v14.2.0

Compare Source

v14.1.4

Compare Source

v14.1.3

Compare Source

  • Fix bug for short streams where stream ends on first read (#​334) 90a213d

v14.1.2

Compare Source

v14.1.1

Compare Source

  • Prevent throwing error in .stream() on empty stream (#​324) 659e379

v14.1.0

Compare Source

v14.0.0

Compare Source

Breaking
  • Removed .minimumBytes (#​319) c4966b8
    • FileType.minimumBytes became obsolete since we now read beyond this 4k boundary. Use . fromFile() for efficient detection.
  • Update strtok3 dependency (#​318) 4616640
Fixes

v13.1.2

Compare Source

v13.1.1

Compare Source

v13.1.0

Compare Source

v13.0.3

Compare Source

  • Restore Node.js 8 compatibility 09eec7b

v13.0.2

Compare Source

v13.0.1

Compare Source

v13.0.0

Compare Source

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

Compare Source

v12.4.1

Compare Source

v12.4.0

Compare Source

v12.3.1

Compare Source

v12.3.0

Compare Source

v12.2.0

Compare Source

  • 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

Compare Source

v12.0.1

Compare Source

v12.0.0

Compare Source

Breaking:

Enhancements:

v11.1.0

Compare Source

Enhancements:

  • Add support for orf, arw, dng, and nef RAW image types (#​213) 6c3df3e

Fixes:

v11.0.0

Compare Source

Breaking:

  • Return undefined instead of null when there's no match 1359ccc
  • TypeScript users only:
    • Drop faking ESM default export support 9dcf28b
      • You need to change import fileType from 'file-type'; to import fileType = require('file-type');

Enhancements:

Fixes:

v10.11.0

[Compare Source](http


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants