Closed Uzlopak closed 9 months ago
Can you please split this, the 2 changes aren't related.
We afaik support node 18+
https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-18
The @tsconfig/node18 package is even targetting es2023. But I think this is because node 18.0.0 was supporting es2022 and later updated v8 and supports later es2023.
We don't want to use a version that is too new in order to support the most versions possible.
I don't think this has much of an effect, since we use esbuild and typescript only for types. It would probably only effect the tests.
Also @tsconfig/node uses differnt module and moduleResolution (in both cases node16) which should be actually the better option, but I did not touch that.
Using node16
module resolution is tricky... It introduces many errors. It would be nice to do so, it would probably require removing CJS builds which is a to-do for the next major versions of Octokit.
Imho we already use fetch and stuff in alot of octokit/packages, which is only usable in node 18+. So this should be semver-major release and then used in the plugins.
So this should be the lowest common denominator for node 18 and above.
I made #22 It's made with Node 18+ compat and ESM in mind
I am totally fine with it ;)
We afaik support node 18+
https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-18
The @tsconfig/node18 package is even targetting es2023. But I think this is because node 18.0.0 was supporting es2022 and later updated v8 and supports later es2023.
Also @tsconfig/node uses differnt module and moduleResolution (in both cases node16) which should be actually the better option, but I did not touch that.
Imho semver-major.