Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fflorent opened this issue Aug 9, 2023 · 7 comments
Labels

Comments

@fflorent
Copy link
Collaborator

fflorent commented Aug 9, 2023

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
Copy link
Member

paulfitz commented Aug 9, 2023

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
Copy link
Contributor

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
Copy link
Collaborator Author

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 fflorent added bug Something isn't working gouv.fr and removed bug Something isn't working labels Aug 10, 2023
@fflorent
Copy link
Collaborator Author

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
Copy link
Member

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
Copy link
Member

dsagal commented Dec 12, 2023

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
Copy link
Collaborator Author

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

@github-project-automation github-project-automation bot moved this from In Progress to Done in French administration Board Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants