gristlabs / grist-core

Grist is the evolution of spreadsheets.
https://www.getgrist.com/
Apache License 2.0
6.97k stars 308 forks source link

Dependencies: upgrade required nodejs version and supported EcmaScript version #618

Closed fflorent closed 6 months ago

fflorent commented 1 year ago

Just a little issue to ask whether what I suggest may be welcome or may encounter objections.

I just felt a bit frustrated to not be able to use some EcmaScript features, like Object.fromEntries, which is now official since ES2019, because the ecmascript version target for typescript is 2017.

FWIW, some other features are summarized in the kangax table

As latest nodejs LTS is v18 and Debian stable also embeds v18, I would suggest to upgrade:

If you're OK with that, I would be happy to open a new PR for this and see whether the tests continue to pass :)

paulfitz commented 1 year ago

I believe @georgegevoian has some work in progress related to v18, right George? For the ecmascript version target, what do you think @dsagal, is is finally time to bump it up?

georgegevoian commented 1 year ago

I believe @georgegevoian has some work in progress related to v18, right George? For the ecmascript version target, what do you think @dsagal, is is finally time to bump it up?

That's right. Should be done soon.

fflorent commented 1 year ago

For the ecmascript version target, what do you think @dsagal, is is finally time to bump it up?

That being said, I did not consider browsers while thinking of this. Maybe that's reasonable to use a different target for the client code.

fflorent commented 9 months ago

I am late to see the huge work made by @georgegevoian two months ago (thank you!)

This issue is nearly solved. There still is the question of the target version for Typescript and of the parser version for Eslint.

NodeJS seems to have a good implementation of EcmaScript 2023, but that's trickier for the browsers, even though theoretically it should be safe assuming browsers are up-to-date.

If you want me to take a look at it, I'll be glad!

paulfitz commented 9 months ago

tagging @dsagal on the question of whether the time has come to bump the target version for Typescript. We have periodically considered and rejected it for compatibility reasons.

dsagal commented 9 months ago

For browsers, upgrading target to es2019 seems safe. I checked throug caniuse statistics, and it's well-supported for the last 3 years of browser versions.

If there is enough reason, we could set a higher version for code built only for server-side, since Node 18 supports es2022.

fflorent commented 6 months ago

I close this issue in favor of #897 (unless I miss some point discussed here that is missing there)