To answer quickly: the latest.

Take all advice for 'best practices' with a huge lump of salt because 'best' 
depends on the context. There is no one best.

> On 7 Dec 2014, at 01:06, J Irving <[email protected]> wrote:
> For any given version of node, what's the best, most appropriate, and least 
> likely to be problematic version of npm to use?

For v0.8: latest.
For v0.10: latest.
For v0.11: latest.
For v0.6: 1.4.28.

> Node ships with npm, so I'm inclined to just use the version of npm which 
> ships with the version of node that I'm testing against. But there are 
> inevitably occasional breakages or security issues, so that means that if I 
> use this approach, I probably need to keep track of those issues and tweak 
> the npm version accordingly.

There are race conditions all over the place in 1.4.x. Plan accordingly. Things 
sometimes fail to unpack completely. Sometimes stuff is missing. Sometimes you 
just get errors for no reason that will vanish on a second run. (EEXIST in 
particular, or ENOENT -- things that exist when they shouldn't and don't when 
they should that other tasks depend on)

> Another approach is to take the minor version which ships with a given node, 
> and upgrade it to the highest patch release. That's probably going to take 
> care of the instances I mentioned above, where there are bugs in particular 
> versions of npm I would think.
> 
> Yet another approach is to just upgrade to the most recent version of npm. 
> That seems a bit fraught, given that there are breaking changes in version 
> 2.x.

Know what the breaking changes are:

* -pre versions of packages aren't selected as candidates for installation 
unless mentioned specifically. This matches up with the community practice of 
introducing experimental interface changes that evolve until a final release. 
you don't want to be using those versions without intending to.
* The command-line of npm run has changed to be more useful, but not compatible.

See http://blog.npmjs.org/post/98131109725/npm-2-0-0

Aria

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/FCCCEA26-11CF-415F-82FF-5E4DEA1CCC5E%40nbtsc.org.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to