Conversation
This switches to ESM only, which means: - We drop `tshy` and just use TypeScript directly - Use import attributes (i.e. import the JSON directly using `import`) This does mean we require a newer Node, one that can `require(esm)` and use import attributes (specifically JSON).
|
@bluwy this does mean our ESLint plugin will also require Node 20. so if we wanted to keep 18.x support, i think we'd need one of the following:
thoughts? |
| "require": { | ||
| "types": "./dist/commonjs/main.d.ts", | ||
| "default": "./dist/commonjs/main.js" | ||
| "types": "./dist/main.d.ts", |
There was a problem hiding this comment.
What do you think of us also adding to the package json the node version minimum for the package ?
There was a problem hiding this comment.
i think we should but maybe lets do it in a follow up once we agree on the right one
I think telling to read the JSON file manually should be ok. There's still |
|
that works for me 👍 we can add it to the export map too |
This switches to ESM only, which means:
tshyand just use TypeScript directlyimport)This does mean we require a newer Node, one that can
require(esm)anduse import attributes (specifically JSON).
🔗 Linked issue
📚 Description