9 ms·
Node v6.9.0 (LTS)
- dcgudeman 10y agoWhen a native Promise incurs a rejection but there is no handler to receive it, a warning will be printed to standard error. Probably the most important change other than improvements in es2015 support.
- wmichelin 10y agoSounds like a step in the right direction!
- CSDude 10y agoI wish the browsers moved on with the support as fast as Node so that we can get rid of stupid hundreds of MBs dependencies to transform a arrow function.
- minitech 10y agoBrowsers already support arrow functions (and did before Node), but there’s no reason to break compatibility with old browsers just to get arrow functions. If that’s the only thing you’re transforming, my advice would be to stop and just use function () {}.
- TAForObvReasons 10y ago> we can get rid of stupid hundreds of MBs dependencies to transform a arrow function. Depending on your target market, you may be stuck on ES5. Your users' browser behavior determines when you can remove the shims and transforms, and if they aren't upgrading you can't really force them to upgrade the browsers.
- komali2 10y ago>force them to upgrade their browsers Please yes
- tracker1 10y agoThe engine that Node is using is already in chrome, and iirc all the major current versions of browsers already have 97% support (tail call opts withstanding, I think for safari this is still a vNext issue). You can use one of a number of modern targets which will avoid the need for the various polyfils etc... but if you need current safari and any IE support, you will at least need dual build paths, which isn't too bad. I kind of wish there was a babel preset that was meant to be used in conjuction with Financial Times' polyfill.io
- hzoo 10y agoI've been working on https://github.com/babel/babel-preset-env/ https://github.com/babel/babel-preset-env/ and there's a similar request although using babel-polyfill rather than the service https://github.com/babel/babel-preset-env/issues/20 https://github.com/babel/babel-preset-env/issues/20
- qaq 10y agoHmm Node is trailing chrome what exactly are you talking about?
- BinaryIdiot 10y agoSo two things. First, it doesn't matter how fast browsers moved. Currently they're moving pretty damn quick if you ask me but it doesn't matter because you need to know your audience and what browser(s) they use. Second, I don't understand the want or need to include "hundreds of MBs dependencies to transform a arrow function". Why do you have to use an arrow function? Yeah it looks nicer but if you're complaining about how much dependency it brings in why not just not use it? Don't get me wrong I like ECMAScript 2015 but if you don't want to bring in the huge amount of transpiler dependencies ECMASCript 5 is still super easy to write.
- algesten 10y agoExactly my point. Arrow functions and destructuring assignments are great, but we've put up with function() { ... } for the last 20 years, so I'm pretty certain we can wait a couple of more years and not get bogged down in these crazy tooling chains to achieve so little. and if we insist on crazy tooling chains, how about getting some real benefit – like coffeescript (?-operator anyone) or typescript (yes, typing can help, just look at swift)?
- tiglionabbit 10y agoThey do. Try writing an arrow function into your browser's console right now. http://caniuse.com/#feat=arrow-functions http://caniuse.com/#feat=arrow-functions
- nilliams 10y agoYes, this footgun is why I've been really wary of the of the `fetch()` plus es6-promise polyfill bandwagon. I've been giving that a wide berth. Examples why: - http://requirebin.com/?gist=8f13d5147c1c252ab1691115bfa8b7c5 http://requirebin.com/?gist=8f13d5147c1c252ab1691115bfa8b7c5 - http://requirebin.com/?gist=06e8c85fcaca56c9651c6aabd0d91476 http://requirebin.com/?gist=06e8c85fcaca56c9651c6aabd0d91476
- tracker1 10y agohow is that any different than any other ignoring of potential errors... fs.saveFile(file, function(err){}); I'd spent most of the last month dealing with a codebase that ignored potential errors systematically... which was a HUGE problem when you WANT to throw an error down that hole... "turtles all the way down" and they're eating all the errors. It's not limited to Promises, or even unique.
- nilliams 10y agoBecause it's not just an 'ignoring of errors', it's the fact all exceptions (as in actual errors from the runtime) are silently swallowed. In your example, if you typo in that function body, an exception will be thrown, your program will exit and you will see the stacktrace. var fs = require('fs'); fs.writeFile('foo.data', function(err){ // A typo here will lead to an exit and stacktrace sadsad }); Whereas in the Promise examples it is quite literally silently swallowing ALL exceptions thrown, including typos etc. It is limited to Promises, because they're supposed to help us deal with error propagation, and pass exceptions through to `.catch()` handlers. But if that catch handler is missing, crickets, even for outright invalid code. That doesn't happen with any other construct in JS afaik.
- WorldMaker 10y agoIn that example the same error gets thrown with a Promise because you're talking about mostly a JIT error at file load time. (Promise.resolve().then(() => I am a syntax error)) The parent's point is that you still aren't doing anything with the callback errors (that first parameter to most node-style callbacks) and those silent swallows are a lot harder to deal with than Promise's silent swallows because node callback error handling is a convention that is easily missed/forgotten/ignored, whereas Promises always "bubble" exceptions "down the chain" and fixing global unhandled exception handlers in Promises is a lot easier (and done at a platform level) than fixing a codebase full of bad node-style callbacks.
- aroc 10y agoI came to the comments section to post this exact comment. This is a hugely impactful change! Super happy to see this land.
- scrabble 10y agoBluebird already has this, and is more efficient than native. But this is definitely a step forward.
- m1sta_ 10y agoI'm not debating the point, but how is that possible?
- sotojuan 10y agoI'm not sure how it's possible but it's definitely not rare. Lodash' methods are faster than their respective native implementations (Lodash `map` > `Array.prototype.map`).
- STRiDEX 10y agohttp://programmers.stackexchange.com/questions/278778/why-are-native-es6-promises-slower-and-more-memory-intensive-than-bluebird http://programmers.stackexchange.com/questions/278778/why-ar... I'm not sure all of it still stands. Bluebird is in C. Native is in javascript. Edit: i'm wrong
- deleted 10y ago[deleted]
- bananaoomarang 10y agohttps://www.reaktor.com/javascript-performance-fundamentals-make-bluebird-fast/ https://www.reaktor.com/javascript-performance-fundamentals-...
- eistrati 10y ago> v6.9.0 marks the transition of Node.js v6 into Long Term Support (LTS) with the codename "Boron" Welcome, Boron! We've been waiting for you :)
- nobleach 10y agoOddly I've had this tab open for a week or so now: http://madscript.com/boron/ http://madscript.com/boron/
- dcgudeman 10y agoHopefully an official 'Boron' tagged docker image will follow shortly.
- mmohebbi 10y agoIt's in a PR here: https://github.com/docker-library/official-images/pull/2265 https://github.com/docker-library/official-images/pull/2265
- wheresvic1 10y agoThe built in debugger is simply amazing! https://nodejs.org/dist/latest-v6.x/docs/api/all.html#debugger_v8_inspector_integration_for_node_js https://nodejs.org/dist/latest-v6.x/docs/api/all.html#debugg...
- 0xCMP 10y agoWow I had no idea this existed.
- Matthias247 10y agoYou can even use VS Code to get a IDE like debugging experience with it.
- PowerfulWizard 10y agoAgreed, I've been using it a bit and it is quite good. Especially since if you use --debug-brk and launch the debugger at the beginning, you can enable pause-on-uncaught-exception and then if you crash you can access all state at that point.
- dancek 10y ago> Support has been dropped for Windows Vista and earlier and macOS 10.7 and earlier. Windows Vista was released in 2007, OS X 10.7 in 2011. For some reason, third-party software seems to support old Windows versions much longer than OS X. Meanwhile, Apple stops supporting old hardware in new OS X versions quite quickly (IMHO), probably for business reasons. I had one Macbook in the past that I had to put Linux on, just because most software dropped support for the most recent available OS version.
- brazzledazzle 10y agoMicrosoft invests heavily in backwards compatibility. Apple could too since they have more money than they know what to do with but I take it they prefer the ability to iterate quickly and make breaking changes for the sake of moving things forward.
- jazoom 10y agoFor the sake of selling more devices
- matt4077 10y agoSierra supports Macs back to 2009, so thats 7 years which I think is decent. If you want to use a 10-year old notebook, I doubt you're going to be troubled by a 3-year old OS. Apple may seize support older hardware earlier than Microsoft does for a very easy reason: because they can. With the insane amount & combinations of hardware Windows has to support, there's no point in adding anything that's somewhat specific – plus they have a lot more of the "enterprisey" customers with a 15-year support contract and underfunded IT budget. There are quite a few Macs in large companies nowadays, but from what I've seen, they are much more likely to adopt a consumer-like support system, i. e. giving root to the users or letting them individually buy & upgrade within a certain budget. They also tend to update more often, possibly because buying a Mac is already an indicator that they're willing to spend more / that they care about their tools. It's also the complete opposite on mobile phones: not rare for Android phones to sometimes not even support a version that was already released when you bought it, whereas iPhones are good for about 4 iOS versions I believe.
- MikeKusold 10y agoFor those using nvm: nvm install lts/boron && nvm alias default lts/boron You may need to update nvm before that works: ( cd "$NVM_DIR" git fetch origin git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` ) && . "$NVM_DIR/nvm.sh"
- lukechilds 10y agoIf you use zsh I wrote a little wrapper for nvm that adds a few handy features. Upgrades can be done with `nvm upgrade`. https://github.com/lukechilds/zsh-nvm https://github.com/lukechilds/zsh-nvm
- drinchev 10y agoI'm trying to install it ( antigen ) but it complains that I already have a nvm installed ( well I do, but should I remove it ? )
- lukechilds 10y agoIt should work fine with existing nvm installs, have you commented out the line where you're manually sourcing nvm? If you have can you paste the exact message you're getting?
- drinchev 10y agoI haven't commented out any lines. λ ~ ◆ antigen bundle lukechilds/zsh-nvm .Cloning into '/Users/drinchev/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-lukechilds-SLASH-zsh-nvm.git'... remote: Counting objects: 228, done. remote: Compressing objects: 100% (47/47), done. remote: Total 228 (delta 16), reused 0 (delta 0), pack-reused 178 Receiving objects: 100% (228/228), 29.54 KiB | 0 bytes/s, done. Resolving deltas: 100% (91/91), done. Checking connectivity... done. Installing nvm... fatal: destination path '/Users/drinchev/.nvm' already exists and is not an empty directory. fatal: Not a git repository (or any of the parent directories): .git fatal: Not a git repository (or any of the parent directories): .git λ ~ ◆ Anyway I think the problem is that it is trying to install nvm, which I already have. Not sure I want to delete my .nvm, since I'm going to loose all my node installs
- indexerror 10y agoCan we get an estimated time of arrival of ES2015 imports in nodejs? I understand that the support needs to come from v8 first of all.
- Scarbutt 10y agoNo idea, but for now you can use rollupjs.
- grayrest 10y agoThey just had a meeting with TC39 about it. Here's the writeup from the node side: https://hackernoon.com/node-js-tc-39-and-modules-a1118aecf95e https://hackernoon.com/node-js-tc-39-and-modules-a1118aecf95...
- mstade 10y ago> Unlike require(), however, import() returns a Promise, allowing (but not requiring) the loading of the underlying module to be performed fully asynchronously. Promises, afaik, are always asynchronous. Maybe the spec changed (I'd welcome it for sure) but last I read it, resolve or rejection handlers must be called in the next tick. Even if something can be executed immediately, it'll still wait till next tick. This obviously means there's always a wait associated with promises, hence they are always asynchronous. I wish this article would go into more detail on what the edge cases are with the unambiguous module syntax – I thought that was an unusually elegant solution in this community.
- jakub_g 10y ago> Very large arrays are now truncated when passed through util.inspect(), this also applies to console.log() and friends. This is a funny one, in conjunction with the facts about npm that 1) npm has no public programmatic API (and zero docs on it), 2) npm devs encourage you to exec() stuff and read stdout, as all the internal methods can be changed/removed at any time, also in non-semver-major. I used to have script doing `npm view | grep ...` which now fails under node 6. The best solution I guess is to use a hardcoded version of npm as a dependency and rely on programmatic API rather than stdout.
- JaRail 10y agoThe output of npm view is essentially a version of the package.json. That's a pretty standard structure. You can form some of the fields in different ways. But why would you want to grep through json when you can parse it?
- jakub_g 10y agoit's not a standard JSON, it's a `console.dir()`, keys are not quoted hence any JSON parser would choke on it, and due to the change in console methods, you can have "..." in long arrays. It's unparseable (not a valid JSON), and ungreppable too (not full arrays are printed).
- brosky117 10y agoI'm stoked about the ES6 support.
- tschellenbach 10y agoThe ES6 improvements make Node a very powerful language. I'm a python developer and the improvements to the language are impressive. No support for array unpacking and import statements just yet though.
- deleted 10y ago[deleted]
- SomeHacker44 10y agoI'm a little surprised that "LTS" doesn't mean at least five years of support like Ubuntu.
- ilaksh 10y agoI am assuming this means they will tag v7 soon so I can easily use it with nvm? Also, does anyone know if there is a way to get babel to output code targeting Node v7? Like, just stuff in the 'latest' preset that isn't out-of-the-box (with or without the flag).
- pitaj 10y agoThere have been presets for Node 4, Node 5, etc so I imagine there will be one for v7 once it's released.
- abritinthebay 10y agoYou want the babel-preset-latest-minimal package. Does exactly that - feature based Babel transforms
- tychuz 10y agoWhy 6.9 release implies 7.0? I think it implies 6.10 more.
- hzoo 10y agoYou can use node specific preset like other's have mentioned but working on https://github.com/babel/babel-preset-env https://github.com/babel/babel-preset-env for all future versions as well
- neovive 10y agoI know it's not completely related, but does anyone know if ExpressJS runs on 6.9?
- elmigranto 10y agoWhy wouldn't it?