From 9678aeabecbfa2a79e99a38b9512e483ba6dee5f Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Thu, 18 Jan 2024 21:20:48 +0100 Subject: [PATCH 1/2] fix: fixed commonjs typings export mapping --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c91974f4..7cddb949 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,14 @@ "description": "Sapphire's piece loader.", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs", - "types": "dist/cjs/index.d.ts", + "types": "dist/cjs/index.d.cts", "exports": { "import": { "types": "./dist/esm/index.d.mts", "default": "./dist/esm/index.mjs" }, "require": { - "types": "./dist/cjs/index.d.ts", + "types": "./dist/cjs/index.d.cts", "default": "./dist/cjs/index.cjs" } }, @@ -26,7 +26,7 @@ "test": "vitest run", "build": "tsup && concurrently \"yarn:postbuild:*\"", "postbuild:internal": "node scripts/make-import.mjs", - "postbuild:types:cjs": "rollup-type-bundler -d dist/cjs", + "postbuild:types:cjs": "rollup-type-bundler -d dist/cjs -ot cts", "postbuild:types:esm": "rollup-type-bundler -d dist/esm -t .mts", "typecheck": "tsc -b src", "bump": "cliff-jumper", From 9811c2eb483b372797af6be29edbfdc34064282d Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Thu, 18 Jan 2024 21:31:13 +0100 Subject: [PATCH 2/2] chore: change `cts` to `.cts` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7cddb949..2c625911 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test": "vitest run", "build": "tsup && concurrently \"yarn:postbuild:*\"", "postbuild:internal": "node scripts/make-import.mjs", - "postbuild:types:cjs": "rollup-type-bundler -d dist/cjs -ot cts", + "postbuild:types:cjs": "rollup-type-bundler -d dist/cjs -ot .cts", "postbuild:types:esm": "rollup-type-bundler -d dist/esm -t .mts", "typecheck": "tsc -b src", "bump": "cliff-jumper",