From 8d5e97e4d753da60a644c34bf1a515b982970dc1 Mon Sep 17 00:00:00 2001 From: dimitrimitropulos Date: Tue, 26 Aug 2025 21:58:08 -0400 Subject: [PATCH 1/3] remove node 18 support --- .github/workflows/test.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c10b05..7114064 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22, 24] + node: [20, 22, 24] task: [test:nodejs, test:edge] steps: diff --git a/package.json b/package.json index cc93926..c685fe5 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "sideEffects": false, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" }, "packageManager": "pnpm@10.14.0-0+sha512.2cd47a0cbf5f1d1de7693a88307a0ede5be94e0d3b34853d800ee775efbea0650cb562b77605ec80bc8d925f5cd27c4dfe8bb04d3a0b76090784c664450d32d6", "files": [ From 46a71ae3e9525b9902c0c48f946e9bc0c866241f Mon Sep 17 00:00:00 2001 From: dimitrimitropulos Date: Tue, 26 Aug 2025 21:58:16 -0400 Subject: [PATCH 2/3] only ship esm --- package.json | 11 ++++------- tsdown.config.ts | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c685fe5..a8962c5 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "type": "git", "url": "git+https://github.com/vercel/ms.git" }, - "main": "./dist/index.cjs", - "types": "./dist/index.d.cts", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "type": "module", "exports": { ".": { @@ -15,10 +15,7 @@ "types": "./dist/index.d.ts", "default": "./dist/index.js" }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } + "default": "./dist/index.js" } }, "sideEffects": false, @@ -38,7 +35,7 @@ "lint": "biome lint", "format": "biome format", "typecheck": "tsc --noEmit", - "attw": "pnpm build && attw --pack .", + "attw": "pnpm build && attw --pack --profile esm-only .", "precommit": "lint-staged", "prepare": "husky" }, diff --git a/tsdown.config.ts b/tsdown.config.ts index 2a11c79..03d1600 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'tsdown'; export default defineConfig({ entry: ['src/index.ts'], - format: ['cjs', 'esm'], + format: ['esm'], dts: true, sourcemap: true, clean: true, From b1bbfb83346778dd1083199749119dc770406e27 Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Tue, 26 Aug 2025 22:23:48 -0400 Subject: [PATCH 3/3] remove `main` field --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index a8962c5..f0b7624 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "type": "git", "url": "git+https://github.com/vercel/ms.git" }, - "main": "./dist/index.js", "types": "./dist/index.d.ts", "type": "module", "exports": {