fix: emit index.d.mts for ESM type resolution (v1.1.1)

This commit is contained in:
Aric Camarata 2026-05-29 15:05:17 -04:00
parent c9060216e8
commit e8981db7aa
2 changed files with 18 additions and 6 deletions

View file

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [1.1.1] - 2026-05-29
### Fixed
- Emit `dist/index.d.mts` so ESM consumers get proper type resolution.
- Use format-specific `types` entries in the `exports` map (`import` condition points to `index.d.mts`, `require` condition points to `index.d.ts`).
## [1.1.0] - 2026-05-28 ## [1.1.0] - 2026-05-28
### Added ### Added

View file

@ -1,6 +1,6 @@
{ {
"name": "moon-sighting", "name": "moon-sighting",
"version": "1.1.0", "version": "1.1.1",
"description": "High-accuracy lunar crescent visibility and moon sighting calculations using JPL DE442S ephemerides. Implements Yallop and Odeh criteria for Islamic crescent sighting workflows.", "description": "High-accuracy lunar crescent visibility and moon sighting calculations using JPL DE442S ephemerides. Implements Yallop and Odeh criteria for Islamic crescent sighting workflows.",
"author": "Aric Camarata", "author": "Aric Camarata",
"license": "MIT", "license": "MIT",
@ -9,9 +9,14 @@
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "import": {
"import": "./dist/index.mjs", "types": "./dist/index.d.mts",
"require": "./dist/index.cjs" "default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
}
}, },
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
@ -30,13 +35,14 @@
}, },
"scripts": { "scripts": {
"build": "tsup", "build": "tsup",
"postbuild": "cp dist/index.d.ts dist/index.d.mts",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"pretest": "tsup", "pretest": "pnpm run build",
"test": "node --test test.mjs && node --test test-cjs.cjs", "test": "node --test test.mjs && node --test test-cjs.cjs",
"lint": "eslint src/", "lint": "eslint src/",
"format": "prettier --write src/", "format": "prettier --write src/",
"format:check": "prettier --check src/", "format:check": "prettier --check src/",
"prepublishOnly": "tsup", "prepublishOnly": "pnpm run build",
"cli": "node dist/cli/index.cjs", "cli": "node dist/cli/index.cjs",
"coverage": "c8 --reporter=lcov --reporter=text node --test" "coverage": "c8 --reporter=lcov --reporter=text node --test"
}, },