Repository navigation
Commit 3ec8e9f
authored
break: include "exports" map w/ "types" conditions (#57)
The non-standard `package.json` field `module` was used. This pointed to
a faux ESM file (Uses ESM syntax, but has a `.js` file extension in a
package which doesn’t specify `"type": "module"`.
ESM support was fixed by using the `.mjs` file extension for the ESM
export and defining a proper `exports` field in `package.json.
The types reflected a package that has the `module.exports.default`
field. This was incorrect. The CommonJS types have now been fixed to use
`export =`, which is the correct way to type modules that use
`module.exports` assignments.
Additional types were added for ESM support.1 parent 4a4eadd commit 3ec8e9f
3 files changed
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
6 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
0 commit comments