{
  "name": "replace-in-file",
  "url": "https://canirequire.com/package/replace-in-file/",
  "description": "A simple utility to quickly replace text in one or more files.",
  "latest": "9.0.0",
  "latestPublished": "2026-08-02T08:14:07.741Z",
  "format": "esm-only",
  "summary": "replace-in-file@9.0.0 is ESM-only. replace-in-file dropped its CommonJS build in 8.0.0 (June 2024). The last version you can require() on every Node.js version, including 18 and older, is 7.2.0, published May 26, 2024. On Node.js 20.19+, 22.12+ and every newer release, require(\"replace-in-file\") 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. replace-in-file@9.0.0 declares engines \">=22.12.0\", so Node.js 18, 20 are outside its supported range regardless of module format.",
  "esmOnlySince": "8.0.0",
  "esmOnlySinceDate": "2024-06-24T02:47:41.630Z",
  "lastCommonJsVersion": "7.2.0",
  "lastCommonJsDate": "2024-05-26T21:50:19.465Z",
  "nativeEsmSince": "8.0.0",
  "types": "bundled",
  "nodeEngines": ">=22.12.0",
  "deprecated": null,
  "license": "MIT",
  "repository": "https://github.com/adamreisnz/replace-in-file",
  "weeklyDownloads": 1006510,
  "runtime": {
    "verifiedAt": "2026-09-09T15:31:43.953Z",
    "node": {
      "18": {
        "require": false,
        "import": true,
        "requireError": "ERR_REQUIRE_ESM",
        "importError": null
      },
      "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": "9.0.0",
      "format": "esm-only",
      "published": "2026-08-02T08:14:07.741Z"
    },
    {
      "version": "8.4.0",
      "format": "esm-only",
      "published": "2025-12-04T23:13:30.706Z"
    },
    {
      "version": "8.3.1",
      "format": "esm-only",
      "published": "2025-12-04T23:09:42.151Z"
    },
    {
      "version": "8.3.0",
      "format": "esm-only",
      "published": "2024-12-17T08:45:35.007Z"
    },
    {
      "version": "8.2.0",
      "format": "esm-only",
      "published": "2024-09-22T07:01:51.838Z"
    },
    {
      "version": "8.1.0",
      "format": "esm-only",
      "published": "2024-07-02T21:15:20.980Z"
    },
    {
      "version": "8.0.3",
      "format": "esm-only",
      "published": "2024-07-02T21:06:40.531Z"
    },
    {
      "version": "8.0.2",
      "format": "esm-only",
      "published": "2024-07-02T02:49:37.590Z"
    },
    {
      "version": "8.0.1",
      "format": "esm-only",
      "published": "2024-06-25T04:40:04.350Z"
    },
    {
      "version": "8.0.0",
      "format": "esm-only",
      "published": "2024-06-24T02:47:41.630Z"
    },
    {
      "version": "7.2.0",
      "format": "cjs",
      "published": "2024-05-26T21:50:19.465Z"
    },
    {
      "version": "7.1.0",
      "format": "cjs",
      "published": "2023-12-27T04:45:43.013Z"
    },
    {
      "version": "7.0.2",
      "format": "cjs",
      "published": "2023-10-27T22:32:28.404Z"
    },
    {
      "version": "7.0.1",
      "format": "cjs",
      "published": "2023-05-28T10:10:15.806Z"
    },
    {
      "version": "7.0.0",
      "format": "cjs",
      "published": "2023-05-28T10:06:37.440Z"
    },
    {
      "version": "6.3.5",
      "format": "cjs",
      "published": "2022-05-30T00:22:01.944Z"
    },
    {
      "version": "6.3.4",
      "format": "cjs",
      "published": "2022-05-30T00:21:09.958Z"
    },
    {
      "version": "6.3.3",
      "format": "cjs",
      "published": "2022-05-26T08:40:03.657Z"
    },
    {
      "version": "6.3.2",
      "format": "cjs",
      "published": "2021-10-22T22:04:01.438Z"
    },
    {
      "version": "6.3.1",
      "format": "cjs",
      "published": "2021-10-17T09:40:38.016Z"
    },
    {
      "version": "6.3.0",
      "format": "cjs",
      "published": "2021-10-17T09:37:06.438Z"
    },
    {
      "version": "6.2.0",
      "format": "cjs",
      "published": "2021-01-31T20:37:22.202Z"
    },
    {
      "version": "6.1.1",
      "format": "cjs",
      "published": "2021-10-22T19:30:34.377Z"
    },
    {
      "version": "6.1.0",
      "format": "cjs",
      "published": "2020-06-06T23:22:40.309Z"
    },
    {
      "version": "6.0.0",
      "format": "cjs",
      "published": "2020-04-25T04:43:16.695Z"
    },
    {
      "version": "5.0.2",
      "format": "cjs",
      "published": "2019-12-15T05:56:04.643Z"
    },
    {
      "version": "5.0.1",
      "format": "cjs",
      "published": "2019-12-15T05:47:03.773Z"
    },
    {
      "version": "4.3.1",
      "format": "cjs",
      "published": "2019-12-15T05:42:43.025Z"
    },
    {
      "version": "4.3.0",
      "format": "cjs",
      "published": "2019-12-15T05:16:24.309Z"
    },
    {
      "version": "4.2.0",
      "format": "cjs",
      "published": "2019-10-21T20:56:58.614Z"
    },
    {
      "version": "4.1.3",
      "format": "cjs",
      "published": "2019-08-15T07:27:55.150Z"
    },
    {
      "version": "4.1.2",
      "format": "cjs",
      "published": "2019-08-05T21:34:06.353Z"
    },
    {
      "version": "4.1.1",
      "format": "cjs",
      "published": "2019-07-03T20:06:15.601Z"
    },
    {
      "version": "4.1.0",
      "format": "cjs",
      "published": "2019-05-14T09:34:09.644Z"
    },
    {
      "version": "4.0.0",
      "format": "cjs",
      "published": "2019-04-21T01:03:58.077Z"
    },
    {
      "version": "3.4.4",
      "format": "cjs",
      "published": "2019-03-08T02:15:46.984Z"
    },
    {
      "version": "3.4.3",
      "format": "cjs",
      "published": "2019-01-11T06:19:53.043Z"
    },
    {
      "version": "3.4.2",
      "format": "cjs",
      "published": "2018-08-13T20:58:51.956Z"
    },
    {
      "version": "3.4.0",
      "format": "cjs",
      "published": "2018-03-22T21:30:56.339Z"
    },
    {
      "version": "3.3.0",
      "format": "cjs",
      "published": "2018-03-21T22:48:30.071Z"
    },
    {
      "version": "3.2.0",
      "format": "cjs",
      "published": "2018-03-06T19:42:36.042Z"
    },
    {
      "version": "3.1.1",
      "format": "cjs",
      "published": "2018-02-04T07:25:52.066Z"
    },
    {
      "version": "3.1.0",
      "format": "cjs",
      "published": "2017-12-20T18:23:15.078Z"
    },
    {
      "version": "3.0.0",
      "format": "cjs",
      "published": "2017-11-01T21:39:56.068Z"
    },
    {
      "version": "2.6.4",
      "format": "cjs",
      "published": "2017-09-04T03:19:12.790Z"
    },
    {
      "version": "2.6.3",
      "format": "cjs",
      "published": "2017-08-25T20:20:06.610Z"
    },
    {
      "version": "2.6.2",
      "format": "cjs",
      "published": "2017-08-25T00:53:48.994Z"
    },
    {
      "version": "2.6.1",
      "format": "cjs",
      "published": "2017-08-24T19:41:53.159Z"
    },
    {
      "version": "2.6.0",
      "format": "cjs",
      "published": "2017-08-24T19:39:04.719Z"
    },
    {
      "version": "2.5.4",
      "format": "cjs",
      "published": "2017-08-15T02:19:47.164Z"
    },
    {
      "version": "2.5.3",
      "format": "cjs",
      "published": "2017-07-03T21:00:26.653Z"
    },
    {
      "version": "2.5.2",
      "format": "cjs",
      "published": "2017-06-21T21:37:06.390Z"
    },
    {
      "version": "2.5.1",
      "format": "cjs",
      "published": "2017-06-21T21:32:15.036Z"
    },
    {
      "version": "2.5.0",
      "format": "cjs",
      "published": "2017-03-07T03:11:57.509Z"
    },
    {
      "version": "2.4.1",
      "format": "cjs",
      "published": "2017-03-04T04:49:13.708Z"
    },
    {
      "version": "2.4.0",
      "format": "cjs",
      "published": "2017-02-21T08:27:02.527Z"
    },
    {
      "version": "2.3.2",
      "format": "cjs",
      "published": "2017-02-14T18:30:08.796Z"
    },
    {
      "version": "2.3.1",
      "format": "cjs",
      "published": "2017-02-14T18:16:57.694Z"
    },
    {
      "version": "2.3.0",
      "format": "cjs",
      "published": "2017-02-13T05:33:10.645Z"
    },
    {
      "version": "2.2.2",
      "format": "cjs",
      "published": "2017-01-25T00:21:00.995Z"
    }
  ]
}