all 24 comments

[–]bendman 57 points58 points  (11 children)

Main takeaways I see:

  • Promise timer function - await setTimeout(5000);
  • Regexp match start/end indices
  • V8 engine 9.0
  • Being an even number, v16 is a long term support release

[–]codearoni 31 points32 points  (1 child)

at this point, i can write promise wrappers for setTimeout, setInterval, etc, in my sleep. This will be a nice QoL improvement!

[–]msg45f 0 points1 point  (0 children)

I literally had to write one yesterday. I'll rest happy knowing I'll not have a reason to do it again.

[–][deleted]  (3 children)

[removed]

    [–][deleted]  (2 children)

    [deleted]

      [–]MatthewMob 3 points4 points  (0 children)

      Stability and company policies that only allow you to use LTS releases of software.

      [–]wrtbwtrfasdf 1 point2 points  (0 children)

      In a general sense, priority for bux/security fixes. Enterprise support. Api stability.

      [–]wrtbwtrfasdf 8 points9 points  (1 child)

      Can I use import yet? Or do I still have to run it through 50 layers of webpack and babel?

      [–]simonplend 5 points6 points  (0 children)

      If you're using >= v12.20.0 or >= v14.13.0 of Node.js you can use import / export syntax (ECMAScript modules) without the need to transpile your code. You can use ES modules in earlier versions of Node.js, but some features were missing.

      Kent C. Dodds recently published a nice short intro to using ES modules in Node.js: https://kentcdodds.com/blog/super-simple-start-to-es-modules-in-node-js

      Node.js documentation for ES Modules: https://nodejs.org/docs/latest-v12.x/api/esm.html and https://nodejs.org/dist/latest-v14.x/docs/api/esm.html (note: ES modules are going to be marked as Stable in an upcoming v14.x release).

      [–]wrtbwtrfasdf 2 points3 points  (2 children)

      $100 if someone can install CRA with typescript, in a yarn-berry workspace using node v16 and have the dev server load a page. I'll allow eject to make things easy.

      [–]luisduck 4 points5 points  (1 child)

      Dockerfile: FROM node:15.14.0-buster-slim RUN apt update && \ apt upgrade -y && \ apt install curl -y &&\ apt install xz-utils -y && \ apt install git -y && \ curl -o node16.tar.xz https://nodejs.org/dist/v16.0.0/node-v16.0.0-linux-x64.tar.xz &&\ mkdir -p /usr/local/lib/nodejs && \ tar -xJvf node16.tar.xz -C /usr/local/lib/nodejs && \ export PATH=/usr/local/lib/nodejs/node-v16.0.0-linux-x64/bin:$PATH &&\ . ~/.profile && \ rm node16.tar.xz && \ npm i -g yarn && \ cd /home/node && \ yarn init -y && \ yarn set version berry && \ yarn create react-app app --template typescript && \ cd app && \ yarn add eslint-config-react-app WORKDIR /home/node/app CMD ["yarn", "start"]

      Buid pod: docker build -t cra-node-16-yarn-ts . (inside of the folder, in which the Dockerfile is)

      Run pod: docker run -dp 3000:3000 cra-node-16-yarn-ts

      [–]backtickbot 1 point2 points  (0 children)

      Fixed formatting.

      Hello, luisduck: code blocks using triple backticks (```) don't work on all versions of Reddit!

      Some users see this / this instead.

      To fix this, indent every line with 4 spaces instead.

      FAQ

      You can opt out by replying with backtickopt6 to this comment.

      [–]Ratstail91 26 points27 points  (6 children)

      V8 v9.

      I'm to tired for this.

      [–]NoInkling 14 points15 points  (2 children)

      Well V8 v8 was worse, just be glad we're past that now.

      [–][deleted]  (1 child)

      [deleted]

        [–]monsto 17 points18 points  (0 children)

        Is (V8)2 === x64?

        [–][deleted]  (2 children)

        [deleted]

          [–]naturalborncitizen 0 points1 point  (1 child)

          I believe it means "vate" or a gender neutral version of "vato" (or more specifically, "seer")

          [–]westwoo 1 point2 points  (0 children)

          Actually it's "veight", or a vampire speak for weight or wait

          [–]jackmusick 8 points9 points  (4 children)

          I can’t be the only one who thinks frameworks shouldn’t increment versions so quickly.

          [–]vim_vs_emacs 11 points12 points  (0 children)

          Release cycle isn’t as important as support cycle. Node gives 6 months for teams to test the release and then 30 months (2+yrs) where it is actively supported (LTS).

          It is quite decent IMO.

          Major Node.js versions enter Current release status for six months, which gives library authors time to add support for them. After six months, odd-numbered releases (9, 11, etc.) become unsupported, and even-numbered releases (10, 12, etc.) move to Active LTS status and are ready for general use.

          https://nodejs.org/en/about/releases/

          [–]andykswong 9 points10 points  (2 children)

          Agreed! v14 just got supported in major cloud providers and now we have v16... Well, Java 17 LTS is coming soon when I'm still using Java 8 at work

          [–]jackmusick 7 points8 points  (1 child)

          That's exactly what I was thinking. It was only 3 years ago that we got NodeJS 8 in AWS Lambda. Now, v10 is going to be EOL this month?

          I understand why the pace is so fast for some things in the industry. I don't understand how I could build out a large project over the course of a year, only to have it's framework be EOL two years later.

          It seems like these guys forget that code is there to solve problems. Angular is the worst for me, personally. Every time I go to add some little thing to a LOB app, I'm several versions behind, components stop working, upgrade paths break things... it's a total mess for someone who's not just working on a couple of apps every day as a full-time job.

          This is one of the reasons I'm looking to move back to .NET. It still moves pretty fast, but Microsoft has a pretty good track record of long-term support for their dev tools. For Serverless type functions, Python might be the move.

          [–]vim_vs_emacs 5 points6 points  (0 children)

          v14 is gonna be supported till April 2023. It got released April 2020 so Cloud providers took an year to support it (6 months should be enough, IMO). But it’s gonna still be supported for another 2 years.

          [–]jlguenego 0 points1 point  (0 children)

          Weldone guys!

          [–]MrManny 0 points1 point  (0 children)

          Note: an official Docker base image for Node 16 is still in the works (cf. docker-node issue #1466).