{
  "name": "ansi-styles",
  "url": "https://canirequire.com/package/ansi-styles/",
  "description": "ANSI escape codes for styling strings in the terminal",
  "latest": "7.0.0",
  "latestPublished": "2026-07-26T14:57:36.835Z",
  "format": "esm-only",
  "summary": "ansi-styles@7.0.0 is ESM-only. ansi-styles dropped its CommonJS build in 6.0.0 (April 2021). The last version you can require() on every Node.js version, including 18 and older, is 5.2.0, published Mar 31, 2021. On Node.js 20.19+, 22.12+ and every newer release, require(\"ansi-styles\") 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. ansi-styles@7.0.0 declares engines \">=22\", so Node.js 18, 20 are outside its supported range regardless of module format.",
  "esmOnlySince": "6.0.0",
  "esmOnlySinceDate": "2021-04-16T05:46:35.357Z",
  "lastCommonJsVersion": "5.2.0",
  "lastCommonJsDate": "2021-03-31T07:15:34.766Z",
  "nativeEsmSince": "6.0.0",
  "types": "bundled",
  "nodeEngines": ">=22",
  "deprecated": null,
  "license": "MIT",
  "repository": "https://github.com/chalk/ansi-styles",
  "weeklyDownloads": 470928193,
  "runtime": {
    "verifiedAt": "2026-09-09T15:27:29.141Z",
    "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": "7.0.0",
      "format": "esm-only",
      "published": "2026-07-26T14:57:36.835Z"
    },
    {
      "version": "6.2.3",
      "format": "esm-only",
      "published": "2025-09-08T14:52:15.705Z"
    },
    {
      "version": "6.2.1",
      "format": "esm-only",
      "published": "2022-10-12T16:34:06.647Z"
    },
    {
      "version": "6.2.0",
      "format": "esm-only",
      "published": "2022-10-11T08:53:33.797Z"
    },
    {
      "version": "6.1.1",
      "format": "esm-only",
      "published": "2022-09-10T06:30:34.873Z"
    },
    {
      "version": "6.1.0",
      "format": "esm-only",
      "published": "2021-04-21T08:50:34.094Z"
    },
    {
      "version": "6.0.0",
      "format": "esm-only",
      "published": "2021-04-16T05:46:35.357Z"
    },
    {
      "version": "5.2.0",
      "format": "cjs",
      "published": "2021-03-31T07:15:34.766Z"
    },
    {
      "version": "5.1.0",
      "format": "cjs",
      "published": "2021-01-22T14:28:47.169Z"
    },
    {
      "version": "5.0.0",
      "format": "cjs",
      "published": "2020-12-01T03:42:08.629Z"
    },
    {
      "version": "4.3.0",
      "format": "cjs",
      "published": "2020-10-04T19:18:25.986Z"
    },
    {
      "version": "4.2.1",
      "format": "cjs",
      "published": "2020-01-01T18:15:19.134Z"
    },
    {
      "version": "4.2.0",
      "format": "cjs",
      "published": "2019-11-12T11:20:05.018Z"
    },
    {
      "version": "4.1.0",
      "format": "cjs",
      "published": "2019-08-21T23:35:47.551Z"
    },
    {
      "version": "4.0.0",
      "format": "cjs",
      "published": "2019-05-31T07:09:54.329Z"
    },
    {
      "version": "3.2.1",
      "format": "cjs",
      "published": "2018-03-02T09:40:00.702Z"
    },
    {
      "version": "3.2.0",
      "format": "cjs",
      "published": "2017-07-23T11:25:48.038Z"
    },
    {
      "version": "3.1.0",
      "format": "cjs",
      "published": "2017-06-12T22:42:00.220Z"
    },
    {
      "version": "3.0.0",
      "format": "cjs",
      "published": "2017-01-17T09:16:34.807Z"
    },
    {
      "version": "2.2.1",
      "format": "cjs",
      "published": "2016-03-28T20:35:18.267Z"
    },
    {
      "version": "2.1.0",
      "format": "cjs",
      "published": "2015-07-01T13:26:31.005Z"
    },
    {
      "version": "2.0.1",
      "format": "cjs",
      "published": "2015-02-22T09:21:36.085Z"
    },
    {
      "version": "2.0.0",
      "format": "cjs",
      "published": "2014-11-23T11:52:58.607Z"
    },
    {
      "version": "1.1.0",
      "format": "cjs",
      "published": "2014-06-03T23:35:17.884Z"
    },
    {
      "version": "1.0.0",
      "format": "cjs",
      "published": "2013-12-08T00:00:09.315Z"
    },
    {
      "version": "0.2.0",
      "format": "cjs",
      "published": "2013-08-03T16:40:58.340Z"
    },
    {
      "version": "0.1.2",
      "format": "cjs",
      "published": "2013-08-03T01:38:52.766Z"
    },
    {
      "version": "0.1.1",
      "format": "cjs",
      "published": "2013-08-03T00:31:59.821Z"
    },
    {
      "version": "0.1.0",
      "format": "cjs",
      "published": "2013-07-31T23:00:32.552Z"
    }
  ]
}