octokit / tsconfig

TypeScript configuration for Octokit packages
MIT License
5 stars 3 forks source link

Target es2022 #20

Closed Uzlopak closed 9 months ago

Uzlopak commented 9 months ago

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.

wolfy1339 commented 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.

Uzlopak commented 9 months ago

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.

wolfy1339 commented 9 months ago

I made #22 It's made with Node 18+ compat and ESM in mind

Uzlopak commented 9 months ago

I am totally fine with it ;)