The Node.js Project Introduces Latest Release Line: Node.js 10.x
medium.com
medium.com
I really wish they would add a promise based version of the http/https client. The current version uses events rather than the standard callback signature so it can't be automatically converted using util.promisify().
They don't have to modify the existing low-level http client, just add a new API. They could even use the existing fetch() API that users are already familiar with on the client side.
It really should be dead simple for a new user to make an http call in Node without having to npm install a 3rd party library. I recently created an AWS Lambda function (directly via the console) and I just wanted to check to see what the outside world thought my IP was. In theory, with Node.js 8 It should only take a two liner like this:
const response = await fetch('https://httpbin.org/ip');
return response.json();
Instead I had to wrap it in a promise myself using untested code that I cribbed from StackOverflow[1].1.https://gist.github.com/talawahtech/f8c4452dbb543297a008d385...
a) Research and compare the various npm modules available and then install one (which isn't even possible via the Lambda console)
or
b) Figure out how to wrap an event based function in a promise (or search stack overflow and copy one)
Something like this should be super easy to do from the cli/REPL or web console without dependencies. You should only have to install a module when you want more advanced features.
They can do the easy tasks very nicely.
But once you need to do a bit more, you need to use another package.
request [0] has done everything I ever wanted it to do and request-promise-native [1] makes it async/friendly.
[1]: https://nodejs.org/dist/latest-v9.x/docs/api/async_hooks.htm...
[2]: https://nodejs.org/dist/latest-v9.x/docs/api/domain.html
We use domains as continuous local storage. This gives us enough time to have a stress-free migration to async hooks.
Given that meaningful stack traces and proper context are by far the weakest part of asynchronous programming, I have hoped to see development on this front above any other aspect of the language.
There are still ongoing discussions around Node's ESM support, you can follow the modules repo [0].