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
Target NodeJS version #2
Comments
Hey @eugene1g, thanks for the heads up about this. I'll look into the different targets and see what the options & tradeoffs are :) |
I wonder is there good table that says which target maps to which node version. I found answer to that once in stackoverflow, but unable to find anymore. |
@glensc This might be close https://node.green - rows are for "ESxxxx" features, and columns are for NodeJS versions. For example, |
@eugene1g that's very difficult to read. I'm looking for a simple table that summarizes:
|
@glensc Those declarations would be misleading because compatibility is not binary. ES releases include many features, but each JS engine/vendor chooses what to implement independently - so we get endless permutations of "90% works in vX, but that one thing doesn't". For example, It's up to each developer to assess if they use any uncommon features, and declare compatibility based on that. The developer would lean towards being helpful rather than being precise. If you use |
Thanks for the huge rant. It can be perhaps still simplified given what typescript generator supports and uses, i.e the directive in question is in |
@eugene1g Do you have any idea what the runtime performance of the different targets (in On this topic, I have come across http://incaseofstairs.com/six-speed/ which seems to break down the runtime performance of es5 vs es6 across various different platforms quite nicely. |
The case for updating const sayHi = async ({ name = 'Bob'}) => `Hi ${name}`; With This code is recognizable, debug-able by the final user/developer, and runs on Node8+ which has EOL'ed and not officially supported in most places.
|
Is there a list of which NodeJS versions you are targeting with this library?
Currently,
tsconfig
target isES5
as perconveyor-mq/tsconfig.json
Line 3 in 07459ad
This will compile all goodness like
async
function down to using generators, which is probably not desired for a modern library. For a server-side lib, you could usees2018
which would keep nativeasync
functions, spread operators, etc and Node v10 is 100% compatible with that setting.The text was updated successfully, but these errors were encountered: