Clever / thrift-pool

A module that wraps thrift interfaces in connection pooling logic to make them more resilient.
Apache License 2.0
22 stars 15 forks source link

upgrade to node 12 #29

Closed prime-time closed 4 years ago

prime-time commented 4 years ago

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

Useful new JavaScript features

Better async stack traces

see more here https://v8.dev/blog/v8-release-72#async-stack-traces

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)

--The Node guild