
Node v6.9.0 (LTS) - dabber
https://nodejs.org/en/blog/release/v6.9.0/
======
dcgudeman
_When 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.

~~~
CSDude
I 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.

~~~
BinaryIdiot
So 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
Exactly 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)?

------
wheresvic1
The built in debugger is simply amazing!
[https://nodejs.org/dist/latest-v6.x/docs/api/all.html#debugg...](https://nodejs.org/dist/latest-v6.x/docs/api/all.html#debugger_v8_inspector_integration_for_node_js)

~~~
0xCMP
Wow I had no idea this existed.

~~~
Matthias247
You can even use VS Code to get a IDE like debugging experience with it.

------
MikeKusold
For 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
If 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
I'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
It 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
I 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

~~~
lukechilds
Ahhh, zsh-nvm requires that nvm has been installed via git.

Although it shouldn't be trying to install over your previous installation, it
checks if nvm exists first with `[[ ! -f "$NVM_DIR/nvm.sh" ]]`.

Out of interest what does: `[[ ! -f "$NVM_DIR/nvm.sh" ]] && echo "nvm doesn't
exist" || echo "nvm exists"` return?

If you wanna try it out you could backup your "$NVM_DIR/versions" folder and
restore it. That holds all your node installs and global modules.

~~~
drinchev

        λ ~ ◆ [[ ! -f "$NVM_DIR/nvm.sh" ]] && echo "nvm doesn't exist" || echo "nvm exists"
        nvm doesn't exist
        λ ~ ◆
    

Yeah, but tomorrow I'm GMT+2 :D

~~~
lukechilds
Strange...

Is it a symlink or something? Does `ls "$NVM_DIR"` list nvm.sh anywhere?

~~~
drinchev
No :(

I've opened an issue, because I think we're polluting HN

[https://github.com/lukechilds/zsh-
nvm/issues/11](https://github.com/lukechilds/zsh-nvm/issues/11)

------
eistrati
> 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
Oddly I've had this tab open for a week or so now:
[http://madscript.com/boron/](http://madscript.com/boron/)

------
dancek
> 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
Microsoft 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
For the sake of selling more devices

------
indexerror
Can 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.

~~~
grayrest
They 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-a1118aecf95...](https://hackernoon.com/node-js-tc-39-and-
modules-a1118aecf95e)

~~~
mstade
> 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.

~~~
pitaj
> loading of the underlying module to be performed fully asynchronously

Right now, Node uses require(). What he means here is that while this does
return a Promise, the underlying loading of the module doesn't _have_ to be
asynchronous, you could just do something like this:

    
    
        function import(module) {
          return Promise.resolve(require(module));
        }
    

Which would fill the requirement of returning a Promise, but would actually
load the module using the normal synchronous means.

> I thought that was an unusually elegant solution in this community.

The biggest issue with unambiguous module syntax is that, since you have to
parse modules before finishing the resolution, it could drastically lengthen
startup time.

~~~
mstade
Thanks for the clarification!

Regarding parsing modules – that's a fair point but surely this has to be done
_anyway_? For ESMs you have to parse them to build the binding map, and for
CJS you have to parse to evaluate; either way the modules get parsed at some
point so why would this in any way be an _additional_ overhead?

------
tschellenbach
The 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.

------
jakub_g
> 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
The 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
it'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).

------
ilaksh
I 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).

~~~
hzoo
You 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

------
SomeHacker44
I'm a little surprised that "LTS" doesn't mean at least five years of support
like Ubuntu.

~~~
elliotec
It doesn't surprise me considering the speed of development with Node and its
ecosystem. It has only been 7 years since its birth.

------
neovive
I know it's not completely related, but does anyone know if ExpressJS runs on
6.9?

~~~
elmigranto
Why wouldn't it?

------
dcgudeman
Hopefully an official 'Boron' tagged docker image will follow shortly.

~~~
mmohebbi
It's in a PR here: [https://github.com/docker-library/official-
images/pull/2265](https://github.com/docker-library/official-images/pull/2265)

------
brosky117
I'm stoked about the ES6 support.

