Skip to content

Releases: azu/validate-image-type

v3.0.0

22 Oct 11:35
@azu azu
53b5322
Compare
Choose a tag to compare

Breaking Changes

  • Require Node.js 18+

Features

  • Support 'avif' format

Dependencies

Changelogs

  • refactor(deps): update dependencies and require Node.js 18+ by @azu in #7

Full Changelog: v2.0.0...v3.0.0

v2.0.0

23 Jul 01:54
@azu azu
Compare
Choose a tag to compare

BREAKING CHANGES

  • expose API as async function
  • require Node.js 14+
import { validateMIMEType } from "validate-image-type";
- const result = validateMIMEType("./image.png", {
+ const result = await validateMIMEType("./image.png", {
    allowMimeTypes: ['image/jpeg', 'image/gif', 'image/png', 'image/svg+xml']
});
if (!result.ok) {
    console.error(result.error);
    return;
}
console.log("This image is supported!");

What's Changed

  • fix: update file-type@16 and change to async API by @azu in #5

Full Changelog: v1.2.0...v2.0.0

v1.2.0

06 Jul 06:07
@azu azu
Compare
Choose a tag to compare

Features

  • added support for svg file buffer in validateBufferMIMEType by @harjotscs in #3

New Contributors

Full Changelog: v1.1.1...v1.2.0

v1.1.1

02 Oct 00:58
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • svg validation without file name (#2) (0307039)

v1.1.0

16 Sep 08:51
@azu azu
Compare
Choose a tag to compare

Features

  • add "originalFilename" options (9d4180e)

1.0.1

22 May 02:10
@azu azu
Compare
Choose a tag to compare
1.0.1