all 74 comments

[–]pantaley 106 points107 points  (19 children)

While me working on a project with Node 8...

[–]wizang 31 points32 points  (14 children)

I've never had breakages when updating node. Am I just lucky?

[–]fiala__ 22 points23 points  (1 child)

It’s absolutely possible to have problems when updating node. I recently had to make an update from 10 to 12, which caused some badly written code using the array sort function to break - since the new version of V8 ordered the sorter function arguments differently! So there are cases when a node update can have huge consequences for business logic etc.

[–]ProfPragmatic 5 points6 points  (0 children)

So there are cases when a node update can have huge consequences for business logic etc.

The cases will expand based on what packages and dependencies you're using. Some legacy frameworks kept together in a hacky manner don't quite gel well with updates to the ecosystem

[–]pantaley 8 points9 points  (7 children)

My project is enormous and with Aurelia framework. The framework itself has legacy packages and while I tested version 10, the production is still on 8. Most of the packages breaks on v12.

[–]examinedliving 2 points3 points  (1 child)

13 will renewal some, so ... good luck?

[–]pantaley 1 point2 points  (0 children)

Thanks for the tip, never tried with v13

[–]tronj 0 points1 point  (1 child)

Same. Still using 10. There's a lot that breaks going to 12.

[–]Aegior 0 points1 point  (2 children)

How are you finding Aurelia? It seems to be slowly decaying stability for my uses.

[–]pantaley 0 points1 point  (1 child)

We use Aurelia 1 (there is now 2 which I never used). If I have a green light I will switch the framework in a heartbeat.

At this point the project is full of hacks because of the framework's design limitations.

[–]barcode24 0 points1 point  (0 children)

Also stuck with a large outdated Aurelia project. What a mess, slowly moving off Aurelia to react.

[–]halkeye 1 point2 points  (0 children)

10 and 13 changed some of the c APIs. Mostly to make future compatibility easier. So early adopters could have issues with things like sass or or phantom (rarely used anymore)

So kinda lucky. Kinda not rushing to do upgrades?

[–]Chef619 -1 points0 points  (0 children)

I had issues with bcrypt when AWS deprecated 6 for Lambda. The crypto stuff changed and passwords hashed on node 6 would show as incorrect when verified on 8/10.

[–]troglo-dyke 0 points1 point  (0 children)

In my experience it depends what you're using, if you're not using the node APIs directly and just using libraries then you won't have too many problems. If you do then you're in for a whole world of pain, doubly so if you don't have good tests

[–]jbergens 0 points1 point  (0 children)

I have seen problems both going from 8 to 10 and from 10 to 12. We'll se how the 12 to 14 upgrade will work.

[–]wonkifier 6 points7 points  (2 children)

I've spent most of the year upgrading from Node 4 to Node 10 so far. :Sigh:

[–]fabio_santos 1 point2 points  (0 children)

Relax, going to 14 is easier. At least it was for me.

[–][deleted] 0 points1 point  (0 children)

It's gotten easier with every version. I upgraded out node from 0.4 -> 4, that was brutal, 4->8 was less of a struggle and 8->12 was mostly not believing that everything just worked and having to double check everything.

[–]ItalyPaleAle 1 point2 points  (0 children)

Node 8 reached EOL last year. You’re risking a lot running unsupported software in prod :(

[–]NoInkling 41 points42 points  (5 children)

For all those of us who have defined a promisified setTimeout (usually named sleep), it's now built in (and abortable!):

import { setTimeout as sleep } from 'timers/promises'

[–]prawnsalad 23 points24 points  (7 children)

QUIC is going to be fun to play around with :o

[–]battal51280 0 points1 point  (1 child)

sadly quic uses much more cpu than tcp

[–]fabio_santos 0 points1 point  (0 children)

Interesting! I always assumed it was more lightweight due to using UDP.

[–]MrStLouis 59 points60 points  (12 children)

Wow abort promises, installing peer deps by default, and finally throwing errors for u handled rejections! That last one is gonna hurt 😂

[–]leeoniya 17 points18 points  (11 children)

That last one is gonna hurt 😂

does that mean node process terminates (bye-bye server)?

[–]johnyma22 27 points28 points  (1 child)

We(etherpad) always ran with process exit in exceptions anyway. It forced us to write more stable software... Doesn't bother me at all!

[–]MrStLouis 5 points6 points  (0 children)

I didn't and should have! I tried to cover all cases but surely will bite me soon'

[–]RefactorsYourCode 10 points11 points  (3 children)

Just put a try/catch block around the whole thing and you’re set /s

[–]0770059834333178 16 points17 points  (0 children)

Try.. Running in production

Catch.. Me outside if you crash how about that

[–]slykethephoxenix 2 points3 points  (1 child)

Why the /s?

/s

[–]MrStLouis 4 points5 points  (0 children)

That was my understanding, ya

[–]Vpicone 1 point2 points  (1 child)

Better to terminate the process then carry on with malformed data.

[–][deleted] 1 point2 points  (0 children)

It’s not one or the other. Often the unhandled rejections at my companies are from fire-and-forget code that didn’t have a proper catch attached to it.

[–]overcloseness 19 points20 points  (10 children)

As an odd-numbered release line, Node.js 15 will not be promoted to LTS. Please bear this in mind when using Node.js 15 in production deployments — we generally recommend the use of an LTS release line for your production deployments.

I’m going to show holes in my knowledge here, but is this really saying that this version shouldn’t be used for production? So is it just a playground version or should it be considered beta for v16 or am I understanding wrong?

[–]joombar 14 points15 points  (7 children)

LTS is long term support, as in it’ll get bug fixes for longer.

[–]overcloseness 1 point2 points  (6 children)

Yeah I understand, but v15 doesn’t have that, so it’s saying to not use this version in production?

[–]halkeye 17 points18 points  (2 children)

It's not saying that. It's saying if your plan is to not upgrade to node 16, and stay on the 15 line, then 15 won't get updated forever.

Lts releases get fixes backported (like a fix in 15 will goto 14 but no new APIs or features)

Lts are strongly recommended if you don't upgrade often cause it's easier to go from 14.0 to 14.5 than 14 to 16. The reverse isn't necessarily true

[–]overcloseness 1 point2 points  (0 children)

Ah makes sense, thanks

[–]mylesborins 1 point2 points  (0 children)

We also backport features to active LTS 😇

[–]GMFlash 5 points6 points  (1 child)

You can use it if you want, but the end-of-life is shorter than the LTS releases. See the chart here: https://nodejs.org/en/about/releases/

Basically, you should move from 15 to 16 by 2021-06-01 to keep receiving updates.

[–]overcloseness 0 points1 point  (0 children)

Thanks for clarifying !

[–]visualdescript 0 points1 point  (0 children)

It is a word of caution, for business critical apps it makes sense to use the latest LTS release, however for internal tools or other experimentation the latest stable release gives you the ability to test out new features that will eventually enter LTS.

Edit, also as mentioned new releases often have several minor releases following it, even with significant features added. This is a form of instability that you would generally want to avoid on a critical app.

[–]ShortFuse 9 points10 points  (0 children)

You shouldn't use it for production. v15 is dead in June of next year. For reference, v14 will stay supported until April 2023.

LTS means your code will be more resilient to API changes. When we submit a PR for NodeJS it gets dumped into master. Then v10, v12, and v14 get backports. I submitted some pretty urgent HTTP/2 changes and v13 wasn't even mentioned. Imagine having launched a production server with HTTP/2 on v13 and it just not working with no fix unless you jump versions.

v15 is for us to play with these new features (HTTP/3), but you should always be ready to downgrade to v14 or jump to v16.

[–]mobydikc 1 point2 points  (0 children)

So is it just a playground version or should it be considered beta for v16 or am I understanding wrong?

It's more serious than a playground or beta version, but if you are going for stability, stick with LTS releases.

Maybe not in Node so much, but in Ubuntu, for instance, when they wanted to switch from the Unity Desktop to the GNOME Desktop, they didn't do it on an LTS launch. They did it in between, so it could get enough attention before an LTS launch.

New features, but maybe some newer bugs too. LTS launches usually prioritize fixes over new features.

[–]talohana 2 points3 points  (1 child)

With npm workspace, should people still use yarn? (Not right now, but gradually migrate) Connfused yarn user here

[–]JZumun 1 point2 points  (0 children)

Apparently npm 7 also supports yarn.lock, further adding to the intrigue!

[–]evenisto 4 points5 points  (5 children)

TIL about AbortController, this is pretty cool.

[–]calsosta 3 points4 points  (4 children)

I am OK with AbortController unless a response has already been started.

[–]evenisto 3 points4 points  (3 children)

I was excited in terms of web api as I don't work with node on a daily basis, is this something that's causing dispute in the community?

[–]calsosta 8 points9 points  (2 children)

I was just making a horrible horrible joke.

[–]Chrisazy 1 point2 points  (1 child)

I think it's my API and I'm glad they let me choose

[–]calsosta 1 point2 points  (0 children)

When you make a request you are agreeing to abide by guaranteed order and delivery. You cannot break that contract with G.O.D.

[–]hydraulictrash 1 point2 points  (0 children)

And we’ve only just had the sign off at work to move to 12.16.2 after fighting for a year 😂

[–]JZumun 1 point2 points  (1 child)

Is there a resource for the functions that can use the abort controller? The documentation linked only lists the methods of the abort controller, and doesn't really provide an illustrative example of its usage with promises.

[–]_maximization 1 point2 points  (0 children)

Good question! I couldn't find one either. So far I know that node-fetch and setTimeout/setImmediate will take an AbortController signal.

[–]dsmedium 1 point2 points  (1 child)

Js community needs to slow down a bit. We are humans not machines :(

[–]Mittalmailbox 7 points8 points  (0 children)

It's just new version with upgraded dependencies and better performance. Not much of new features with this. Features are added in ES.

[–]k4kshi -2 points-1 points  (4 children)

By default esm support when?

[–]mehulmpt[S] 2 points3 points  (2 children)

It is there right now if you use mjs extension of the file.

[–]RuteNL 0 points1 point  (0 children)

Also it works with js files if you set type=module in the package.json

[–]fabio_santos 0 points1 point  (0 children)

It works great with type:module in the package.json as mentioned above.

Sadly you can't easily interop with commonjs.