Commit 0e807d1
authored
fix: resolve CJS type declarations via exports require condition (#29)
Split the exports["."] entry into import/require condition blocks so
require resolves the CommonJS declarations (./dist/index.d.cts) that
tsup already emits, instead of the ESM ./dist/index.d.ts. Fixes the
"Masquerading as ESM" (FalseESM) finding from @arethetypeswrong/cli
for TypeScript consumers using require() under node16/nodenext module
resolution. publint and attw --pack are now clean across all
resolution modes.1 parent a68dcf0 commit 0e807d1
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
0 commit comments