fix: align exports and files with tsup output — no "type":"module"

Without "type":"module" in package.json, tsup generates index.d.ts
(CJS fallback) and index.d.mts (ESM) rather than index.d.ts + index.d.cts.
Removes "type":"module" since .cjs/.mjs extensions make it redundant, updates
exports.require.types to index.d.ts, and drops index.d.cts from files.
This commit is contained in:
Aric Camarata 2026-03-08 15:41:52 -04:00
parent 1d57238ea9
commit 6179da5a45

View file

@ -4,18 +4,17 @@
"description": "Qibla direction, great-circle path, and haversine distance. Pure math, zero dependencies.",
"author": "Aric Camarata",
"license": "MIT",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
}
}
@ -25,7 +24,7 @@
"dist/index.cjs",
"dist/index.mjs",
"dist/index.d.ts",
"dist/index.d.cts"
"dist/index.d.mts"
],
"engines": {
"node": ">=20"