Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

upgrade to node 12 #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

upgrade to node 12 #6

wants to merge 3 commits into from

Conversation

prime-time
Copy link

@prime-time prime-time commented Dec 6, 2019

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

@prime-time prime-time self-assigned this Dec 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants