top | item 14559882

Node v8.1.2

45 points| janober | 8 years ago |nodejs.org | reply

48 comments

order
[+] Maarten88|8 years ago|reply
I upgraded a universal React/typescript project from node 6.10 to 8.1 this week. Configured typescript compilation in webpack to target es2017 server-side and es5 client-side. It worked flawlessly.

Debugging async functions (server-side) is a lot better now that there is no transpiler mangling my code beyond recognition.

[+] doomslice|8 years ago|reply
Would you mind sharing your tsconfig(s)? And also do you use sourcemaps on the server?
[+] libertymcateer|8 years ago|reply
Now's as good a time as any to ask:

What tools do you folks use to monitor your node dependencies and make sure you are keeping everything up to date?

[+] ameesdotme|8 years ago|reply
I just regularly run `yarn upgrade-interactive` in my projects.

I was thinking of making dependency-updates part of the CI-pipeline, using a 'allow_failure'-flag. However, if you decide not to upgrade a dep for some reason, this will cause each and every build to throw a warning.

[+] Androider|8 years ago|reply
https://www.npmjs.com/package/npm-check-updates is a small command line utility that will report which dependencies are out of date, and can also upgrade your package.json from the CLI while maintaining your existing semantic versioning policies and ranges across an upgrade (instead of just bumping for every minor update).

Mostly I just really like the compact output, and the short "ncu" command which I run every day to check what's available :)

[+] workerIbe|8 years ago|reply
Definitely something to the addage "if it ain't broke don't fix it". Some of our less critical modules are set to latest others are updated with care. Our modules are not under source control so are refreshed on deployment. We use Snyk to monitor for vulnerabilities, works pretty well.
[+] djslakor|8 years ago|reply
npm outdated -l
[+] ihsw2|8 years ago|reply
Node 8 is the planned LTS release for later this year.

Notably, it brings async/await syntax to vanilla JS. This new feature complements callbacks and largely replaces how Promises are currently consumed (opting for sequential-like execution with try/catch blocks instead of Promise chains).

The closest analogue would be Tasks in C#.

EDIT: removing reference to node-v8 to prevent confusion.

[+] pier25|8 years ago|reply
Aync/await is the best thing since sliced bread. It has made my life so much easier.
[+] rockostrich|8 years ago|reply
It's just Node 8. They stopped prefixing with "v" this version in order to avoid confusion with the V8 javascript engine.
[+] niklasrde|8 years ago|reply
Are they still calling it 'v8' instead of 8?

Also notable is that async/await isn't new for node, 7.10 supported it (and previous versions with a flag). It's new for a LTS release. What is new, however, is the in-built util.promisify that can convert callbacks into native promises.

[+] slackingoff2017|8 years ago|reply
Promises are and always were retarded. They did nothing to alleviate callback hell which was most of the point of their existence. I have no idea why they implemented them instead of async/await in the first place. Now we have to deal with mixing both for years.

Another fine example of JavaScript trying to be hip and ignoring the lessons learned from countless other languages over the years.

I see this constantly with JS like with the 3+ ways to check for NaN and the object "freeze" system that doesn't actually make objects immutable. They take a solid concept from other languages then put a snazzy spin on it that makes it fucking useless. Then try again in the next version. JS library and syntax is littered with corpses of failed experiments.

At least they finally have a usable ForEach loop after three attempts.

Please typescript save us from this hubris.