mirror of
https://github.com/acamarata/moon-sighting.git
synced 2026-06-30 19:04:24 +00:00
fix: emit index.d.mts for ESM type resolution (v1.1.1)
This commit is contained in:
parent
c9060216e8
commit
e8981db7aa
2 changed files with 18 additions and 6 deletions
|
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [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
|
||||
|
||||
### Added
|
||||
|
|
|
|||
18
package.json
18
package.json
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"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.",
|
||||
"author": "Aric Camarata",
|
||||
"license": "MIT",
|
||||
|
|
@ -9,9 +9,14 @@
|
|||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
|
@ -30,13 +35,14 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"postbuild": "cp dist/index.d.ts dist/index.d.mts",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"pretest": "tsup",
|
||||
"pretest": "pnpm run build",
|
||||
"test": "node --test test.mjs && node --test test-cjs.cjs",
|
||||
"lint": "eslint src/",
|
||||
"format": "prettier --write src/",
|
||||
"format:check": "prettier --check src/",
|
||||
"prepublishOnly": "tsup",
|
||||
"prepublishOnly": "pnpm run build",
|
||||
"cli": "node dist/cli/index.cjs",
|
||||
"coverage": "c8 --reporter=lcov --reporter=text node --test"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue