This pull request upgrades node to v12 which is the current long term supported version.
Node 12 runs on a newer version of the V8 engine which includes performance gains, better memory management, and access to the latest JavaScript syntax.
async function foo(x) {
await bar(x);
}
async function bar(x) {
await x;
throw new Error("Let's have a look...");
}
foo(1).catch(e => console.log(e.stack));
node 10
Error: Let's have a look...
at bar (/Users/renatoprime/go/src/github.com/Clever/sd2/node12StackTraces.js:7:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
node 12
Error: Let's have a look...
at bar (/Users/renatoprime/go/src/github.com/Clever/sd2/node12StackTraces.js:7:9)
at async foo (/Users/renatoprime/go/src/github.com/Clever/sd2/node12StackTraces.js:2:3)
This pull request was autogenerated
This pull request upgrades node to v12 which is the current long term supported version.
Node 12 runs on a newer version of the V8 engine which includes performance gains, better memory management, and access to the latest JavaScript syntax.
Here's the release blog post https://medium.com/@nodejs/introducing-node-js-12-76c41a1b3f3f.
Some of the improvements are highlighted below.
Node 12 improvements
await
https://v8.dev/blog/v8-release-73#faster-awaitUseful new JavaScript features
Object.fromEntries()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntriesArray.flat()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatArray.flatMap()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMapBetter async stack traces
see more here https://v8.dev/blog/v8-release-72#async-stack-traces
node 10
node 12
--The Node guild