{
  "name": "file-type",
  "url": "https://canirequire.com/package/file-type/",
  "description": "Detect the file type of a file, stream, or data",
  "latest": "22.0.2",
  "latestPublished": "2026-08-15T01:47:48.289Z",
  "format": "esm-only",
  "summary": "file-type@22.0.2 is ESM-only. file-type dropped its CommonJS build in 17.0.0 (November 2021). The last version you can require() on every Node.js version, including 18 and older, is 16.5.4, published Jul 21, 2022. On Node.js 20.19+, 22.12+ and every newer release, require(\"file-type\") works anyway: Node can load synchronous ES modules through require(). Verified on Node 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM. file-type@22.0.2 declares engines \">=22\", so Node.js 18, 20 are outside its supported range regardless of module format.",
  "esmOnlySince": "17.0.0",
  "esmOnlySinceDate": "2021-11-24T17:19:19.609Z",
  "lastCommonJsVersion": "16.5.4",
  "lastCommonJsDate": "2022-07-21T14:35:35.346Z",
  "nativeEsmSince": "17.0.0",
  "types": "bundled",
  "nodeEngines": ">=22",
  "deprecated": null,
  "license": "MIT",
  "repository": "https://github.com/sindresorhus/file-type",
  "weeklyDownloads": 40423762,
  "runtime": {
    "verifiedAt": "2026-09-09T15:28:27.091Z",
    "node": {
      "18": {
        "require": false,
        "import": false,
        "requireError": "ERR_REQUIRE_ESM",
        "importError": "SyntaxError"
      },
      "20": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "22": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "24": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      },
      "26": {
        "require": true,
        "import": true,
        "requireError": null,
        "importError": null
      }
    },
    "bun": {
      "require": true,
      "import": true,
      "requireError": null,
      "importError": null
    }
  },
  "formatHistory": [
    {
      "version": "22.0.2",
      "format": "esm-only",
      "published": "2026-08-15T01:47:48.289Z"
    },
    {
      "version": "22.0.1",
      "format": "esm-only",
      "published": "2026-04-09T15:24:14.218Z"
    },
    {
      "version": "22.0.0",
      "format": "esm-only",
      "published": "2026-03-26T17:34:04.009Z"
    },
    {
      "version": "21.3.4",
      "format": "esm-only",
      "published": "2026-03-22T14:29:40.810Z"
    },
    {
      "version": "21.3.3",
      "format": "esm-only",
      "published": "2026-03-16T18:28:40.440Z"
    },
    {
      "version": "21.3.2",
      "format": "esm-only",
      "published": "2026-03-13T07:42:33.853Z"
    },
    {
      "version": "21.3.1",
      "format": "esm-only",
      "published": "2026-03-09T08:22:21.792Z"
    },
    {
      "version": "21.3.0",
      "format": "esm-only",
      "published": "2026-01-04T00:56:55.310Z"
    },
    {
      "version": "21.2.0",
      "format": "esm-only",
      "published": "2025-12-25T17:52:37.857Z"
    },
    {
      "version": "21.1.1",
      "format": "esm-only",
      "published": "2025-11-19T17:22:38.454Z"
    },
    {
      "version": "21.1.0",
      "format": "esm-only",
      "published": "2025-11-10T08:15:38.193Z"
    },
    {
      "version": "21.0.0",
      "format": "esm-only",
      "published": "2025-05-23T11:52:21.900Z"
    },
    {
      "version": "20.5.0",
      "format": "esm-only",
      "published": "2025-04-26T20:09:56.543Z"
    },
    {
      "version": "20.4.1",
      "format": "esm-only",
      "published": "2025-03-13T07:32:49.660Z"
    },
    {
      "version": "20.4.0",
      "format": "esm-only",
      "published": "2025-02-26T19:00:22.298Z"
    },
    {
      "version": "20.3.0",
      "format": "esm-only",
      "published": "2025-02-25T06:55:43.734Z"
    },
    {
      "version": "20.2.0",
      "format": "esm-only",
      "published": "2025-02-24T15:21:50.551Z"
    },
    {
      "version": "20.1.0",
      "format": "esm-only",
      "published": "2025-02-05T17:55:03.616Z"
    },
    {
      "version": "20.0.1",
      "format": "esm-only",
      "published": "2025-01-31T17:12:36.418Z"
    },
    {
      "version": "20.0.0",
      "format": "esm-only",
      "published": "2025-01-15T21:41:26.609Z"
    },
    {
      "version": "19.6.0",
      "format": "esm-only",
      "published": "2024-10-13T20:06:36.909Z"
    },
    {
      "version": "19.5.0",
      "format": "esm-only",
      "published": "2024-09-07T17:16:47.580Z"
    },
    {
      "version": "19.4.1",
      "format": "esm-only",
      "published": "2024-08-14T12:12:06.125Z"
    },
    {
      "version": "19.4.0",
      "format": "esm-only",
      "published": "2024-08-02T14:39:50.528Z"
    },
    {
      "version": "19.3.0",
      "format": "esm-only",
      "published": "2024-07-22T11:55:48.755Z"
    },
    {
      "version": "19.2.0",
      "format": "esm-only",
      "published": "2024-07-17T15:36:21.293Z"
    },
    {
      "version": "19.1.1",
      "format": "esm-only",
      "published": "2024-07-10T13:19:56.447Z"
    },
    {
      "version": "19.1.0",
      "format": "esm-only",
      "published": "2024-07-08T11:39:21.188Z"
    },
    {
      "version": "19.0.0",
      "format": "esm-only",
      "published": "2024-01-07T16:03:11.108Z"
    },
    {
      "version": "18.7.0",
      "format": "esm-only",
      "published": "2023-11-11T08:38:04.426Z"
    },
    {
      "version": "18.6.0",
      "format": "esm-only",
      "published": "2023-11-01T08:01:12.046Z"
    },
    {
      "version": "18.5.0",
      "format": "esm-only",
      "published": "2023-06-04T08:01:55.529Z"
    },
    {
      "version": "18.4.0",
      "format": "esm-only",
      "published": "2023-05-10T10:44:47.189Z"
    },
    {
      "version": "18.3.0",
      "format": "esm-only",
      "published": "2023-04-25T05:35:42.463Z"
    },
    {
      "version": "18.2.1",
      "format": "esm-only",
      "published": "2023-02-18T13:25:35.242Z"
    },
    {
      "version": "18.2.0",
      "format": "esm-only",
      "published": "2023-01-15T04:36:54.073Z"
    },
    {
      "version": "18.1.0",
      "format": "esm-only",
      "published": "2023-01-11T10:14:47.688Z"
    },
    {
      "version": "18.0.0",
      "format": "esm-only",
      "published": "2022-08-24T19:44:24.876Z"
    },
    {
      "version": "17.1.6",
      "format": "esm-only",
      "published": "2022-08-02T21:26:26.764Z"
    },
    {
      "version": "17.1.5",
      "format": "esm-only",
      "published": "2022-08-02T11:04:28.631Z"
    },
    {
      "version": "17.1.4",
      "format": "esm-only",
      "published": "2022-07-25T22:27:08.917Z"
    },
    {
      "version": "17.1.3",
      "format": "esm-only",
      "published": "2022-07-21T14:39:53.727Z"
    },
    {
      "version": "17.1.2",
      "format": "esm-only",
      "published": "2022-06-01T09:15:43.959Z"
    },
    {
      "version": "17.1.1",
      "format": "esm-only",
      "published": "2021-12-28T17:37:46.425Z"
    },
    {
      "version": "17.1.0",
      "format": "esm-only",
      "published": "2021-12-27T16:58:50.191Z"
    },
    {
      "version": "17.0.2",
      "format": "esm-only",
      "published": "2021-12-16T23:37:37.591Z"
    },
    {
      "version": "17.0.1",
      "format": "esm-only",
      "published": "2021-12-14T23:44:37.387Z"
    },
    {
      "version": "17.0.0",
      "format": "esm-only",
      "published": "2021-11-24T17:19:19.609Z"
    },
    {
      "version": "16.5.4",
      "format": "cjs",
      "published": "2022-07-21T14:35:35.346Z"
    },
    {
      "version": "16.5.3",
      "format": "cjs",
      "published": "2021-08-03T13:51:03.685Z"
    },
    {
      "version": "16.5.2",
      "format": "cjs",
      "published": "2021-07-20T16:43:55.113Z"
    },
    {
      "version": "16.5.1",
      "format": "cjs",
      "published": "2021-07-10T12:01:05.135Z"
    },
    {
      "version": "16.5.0",
      "format": "cjs",
      "published": "2021-05-28T05:58:05.397Z"
    },
    {
      "version": "16.4.0",
      "format": "cjs",
      "published": "2021-05-05T10:54:05.466Z"
    },
    {
      "version": "16.3.0",
      "format": "cjs",
      "published": "2021-03-06T17:32:52.964Z"
    },
    {
      "version": "16.2.0",
      "format": "cjs",
      "published": "2021-01-13T10:14:23.809Z"
    },
    {
      "version": "16.1.0",
      "format": "cjs",
      "published": "2020-12-21T11:04:34.850Z"
    },
    {
      "version": "16.0.1",
      "format": "cjs",
      "published": "2020-11-02T11:34:14.643Z"
    },
    {
      "version": "16.0.0",
      "format": "cjs",
      "published": "2020-10-18T19:03:34.629Z"
    },
    {
      "version": "15.0.1",
      "format": "cjs",
      "published": "2020-09-14T20:15:54.200Z"
    }
  ]
}