Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update npm during travis CI run to fix transitive caret (^) dependencies
- Loading branch information
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if this works. I've seen reports of
glob
borking in older Node versions on Travis-CI today because it updated a dep with the caret. Travis-CI updated their npm recently to support carets.@michaelficarra Were you getting test issues? They seem all green https://travis-ci.org/jashkenas/underscore/builds. Was the wrong dep versions being pulled down?
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All I know is the 0.8 build was failing on my #1616 branch (optionator is specified using a caret in eslint's dependencies) and then I did this and it stopped failing.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the related travis-ci issue where they updated npm:
travis-ci/travis-ci#2076
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdalton: You have to look under the pull requests tab. There you'll see build 907.1 failed, but build 909.1 passed, the only change being rebasing off this commit.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the issue. It's Travis-CI, before they used to use their npm 1.4.3 for old and new versions of Node. But today they switched to special casing the npm version per node version. So the npm associated with Node 0.8 is older than the one associated with Node 0.10.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Citation?
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open a travis-ci run from a day or two ago. Look at the npm version in the log for a Node 0.8 run. Then look at it on todays run (the failing one). You'll see the versions are different.
Your patch forces npm to be updated regardless of Node version, avoiding Travis' older default versions now.
Travis-CI will periodically update things like Node and npm versions. I had to recently lock down a 0.11 version for
--harmony
tests with Istanbul because they updated to a newer point release causing errors.4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdalton
Here is a build from 2 days ago: https://travis-ci.org/senchalabs/connect/jobs/25410317
It was using npm version 1.2.30.
Here is a build from today: https://travis-ci.org/senchalabs/connect/jobs/25593611
It is using npm 1.2.30.
I have never seen the node.js 0.8 build on Travis CI not using 1.2.30 for a long, long time.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougwilson
Hmm interesting. Here's mine from a day ago. Notice the
And a more recent run:
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between those is one is using node v0.10.28 and the other node v0.8.26 (i.e. the reason they are using different npm versions is the node.js version, not the date).
Node v0.8.26 uses npm 1.2.30 and node v0.10.28 uses npm 1.4.9. It has been like that for a long time.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They were both specified as Node 0.8 in the travis.yml and you see eventually they both get to using v0.8.26, it's just one is using a newer npm. I didn't specify that. So that's the trail I followed.
4de07c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see now.
nvm use 0.8
is invoked in your first one after it printed the npm version, so the npm was the v0.10 one, not the v0.8 one. Since it didn't callnpm --version
after thenvm use 0.8
it's hard to know what the npm version was actually using in that build :(