diff --git a/package.json b/package.json index c62a596..5066419 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "James Wyatt Cready ", "Jonathan Ong (http://jongleberry.com)" ], - "main": "dist/index.js", - "types": "dist/index.d.ts", + "type": "module", + "exports": "./dist/index.js", "files": [ "dist/" ], @@ -40,6 +40,9 @@ "typescript": "^7.0.2", "vitest": "^5.1.0" }, + "engines": { + "node": ">=22" + }, "publishConfig": { "access": "public" }, diff --git a/src/index.bench.ts b/src/index.bench.ts index 32b4e90..022adaf 100644 --- a/src/index.bench.ts +++ b/src/index.bench.ts @@ -1,5 +1,5 @@ import { describe, test } from "vitest"; -import { parse, combineRanges } from "./index"; +import { parse, combineRanges } from "./index.js"; describe("parse", () => { test("1000 byte range", ({ bench }) => { diff --git a/src/index.spec.ts b/src/index.spec.ts index e962ffe..da19a05 100644 --- a/src/index.spec.ts +++ b/src/index.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "vitest"; -import { parse, combineRanges } from "./index"; +import { parse, combineRanges } from "./index.js"; describe("parse(len, str)", () => { it("should return -2 for an empty str", () => {