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.
Node v8.1.2
11–20 of 49 posts
Re: Node v8.1.2
#12Node 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.
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.
Re: Node v8.1.2
#13Node 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.
Aync/await is the best thing since sliced bread. It has made my life so much easier.
Re: Node v8.1.2
#14Now'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?
Re: Node v8.1.2
#15I 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.
Would you mind sharing your tsconfig(s)? And also do you use sourcemaps on the server?
{
"files": [],
"compilerOptions": {
"baseUrl": ".",
"moduleResolution": "node",
"target": "es2017",
"jsx": "react",
"experimentalDecorators": true,
"sourceMap": true,
"skipDefaultLibCheck": true,
"lib": [ "es2017", "dom" ],
"allowJs": false,
"paths": {
"*": [ "./ClientApp/types/*", "*" ]
}
},
"exclude": [
"bin",
"obj",
"node_modules"
]
}
edit: remove unneeded entriesRe: Node v8.1.2
#16Now'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?
npm outdated -l
`npm update --save` or `npm update --save-dev` say explicitly "save updates to `dependencies` resp. `devDependencies`", which causes duplication between dependencies and devDependencies. (Say you have a dep foo and a devDep bar and both are outdated: `npm update --save` will bork package.json with an additional incorrect dep bar, and `npm update --save-dev` will bork it with an additional incorrect devDep foo :-/ )
Am I missing something? I understand there are 3rd-party packages providing such functionality, but is there any reason to not cover this feature in npm?
Re: Node v8.1.2
#17Now'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?
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.
Re: Node v8.1.2
#18Node 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.
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 wit…
Re: Node v8.1.2
#19Node 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.
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 wit…
Re: Node v8.1.2
#20Earlier quoted context omitted.
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.
They dropped the "v" from the version name. Yeah, a lot of companies won't touch non-LTS Node though, so a lot of users won't use async/await until later this year when the next LTS is released (Oct 2017).
Except in their official release blog posts, it seems :-D