Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update devDependencies for karma and jasmine #57

Open
jwahyoung opened this issue Jan 9, 2015 · 6 comments
Open

Update devDependencies for karma and jasmine #57

jwahyoung opened this issue Jan 9, 2015 · 6 comments

Comments

@jwahyoung
Copy link

Forking and pulling oboe.js, I attempt an npm install and get the following:

my-MBP:oboe.js user$ npm install
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.22
npm ERR! npm  v2.1.14
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-karma@0.6.2 wants karma@~0.10.0
npm ERR! peerinvalid Peer karma-jasmine@0.1.5 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-safari-launcher@0.1.1 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-firefox-launcher@0.1.4 wants karma@>=0.9

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jahyoung/Projects/oboe.js/npm-debug.log

The problem here is that we're using older versions of libraries that have since been upgraded. I was able to update package.json to the latest versions, like so:

"karma": "^0.12.31",
"karma-firefox-launcher": "~0.1.0",
"karma-jasmine": "~0.3.4",
"karma-safari-launcher": "~0.1.1",

However, this breaks the existing tests as Jasmine has changed a lot of their conventions since the currently-used version.

Suggest updating package dependencies and updating the tests to use new Jasmine syntax.

@jimhigson
Copy link
Owner

Yeah, I agree. Jasmine 2.0 is much better than 1.3.

There are about 1,000 tests at the moment though and this is quite a lot of work for something which hasn't in the past created any practical problems.

I just made a fresh clone and npm install worked ok. Does this not work for you? Peer dependencies are always tricky but old versions should still work with packages from the same era.

@jwahyoung
Copy link
Author

When I cloned and did an npm install, I ran into the issues outlined above.
I don't think that Karma is in your devDependencies by default, so it might
be looking at the version you have installed globally? Not sure.

There are definitely a lot of tests, but I've realized that it's the same
few tests that are run multiple times, so it's not as bad as the test
output would make it seem. I forked and actually started to work on this,
attempting to migrate the test syntax over to 2.0 format; I was able to fix
quite a few things, but I'm running into issues where objects don't have
certain methods. (For instance, actual.map doesn't exist, so I had to use
Array.prototype.map.call(actual, ...). ) I'll give it another shot and
see what I can fix

On Sat, Jan 10, 2015 at 11:39 AM, Jim Higson notifications@github.com
wrote:

Yeah, I agree. Jasmine 2.0 is much better than 1.3.

There are about 1,000 tests at the moment though and this is quite a lot
of work for something which hasn't in the past created any practical
problems.

I just made a fresh clone and npm install worked ok. Does this not work
for you? Peer dependencies are always tricky but old versions should still
work with packages from the same era.


Reply to this email directly or view it on GitHub
#57 (comment).

@jimhigson
Copy link
Owner

That's awesome. Let me know how you get on and if anything isn't very obvious how to convert.

I don't seem to have karma globally, not sure why npm install didn't work for you, but I agree that updating the dependencies is the correct way to deal with this.

jimhigson@Jims-Air ~ [1]> npm list -g --depth=0
/usr/local/lib
├── bower@1.3.3
├── browserify@5.11.1
├── elasticSearchRest@0.0.0 -> /Users/jimhigson/Sites/shop-search/elasticSearchRest
├── fetchQueue@0.0.0 -> /Users/jimhigson/Sites/shop-search/fetchQueue
├── forage@0.3.2
├── forage-fetch@0.0.2
├── generic-queue@1.0.0 -> /Users/jimhigson/Sites/shop-search/generic-queue
├── grunt-cli@0.1.13
├── http-server@0.6.1
├── jam@0.6.1
├── jamjs@0.2.17
├── jitsu@0.13.16
├── jus@0.0.0 -> /Users/jimhigson/Sites/jus
├── mantri-cli@0.1.7
├── mversion@0.4.1
├── n@1.2.1
├── node-inspector@0.7.1
├── npm@2.1.6
├── oboe@2.1.0 -> /Users/jimhigson/Sites/oboe.js
├── simple-barrier@1.0.4 -> /Users/jimhigson/Sites/simple-barrier
├── simple-queue@0.0.0
└── supervisor@0.5.7

@jwahyoung
Copy link
Author

I do have a question, actually - are all of the tests passing in your
current build?

On Sat, Jan 10, 2015 at 1:13 PM, Jim Higson notifications@github.com
wrote:

That's awesome. Let me know how you get on and if anything isn't very
obvious how to convert.

I don't seem to have karma globally, not sure why npm install didn't work
for you, but I agree that updating the dependencies is the correct way to
deal with this.

jimhigson@Jims-Air ~ [1]> npm list -g --depth=0
/usr/local/lib
├── bower@1.3.3
├── browserify@5.11.1
├── elasticSearchRest@0.0.0 -> /Users/jimhigson/Sites/shop-search/elasticSearchRest
├── fetchQueue@0.0.0 -> /Users/jimhigson/Sites/shop-search/fetchQueue
├── forage@0.3.2
├── forage-fetch@0.0.2
├── generic-queue@1.0.0 -> /Users/jimhigson/Sites/shop-search/generic-queue
├── grunt-cli@0.1.13
├── http-server@0.6.1
├── jam@0.6.1
├── jamjs@0.2.17
├── jitsu@0.13.16
├── jus@0.0.0 -> /Users/jimhigson/Sites/jus
├── mantri-cli@0.1.7
├── mversion@0.4.1
├── n@1.2.1
├── node-inspector@0.7.1
├── npm@2.1.6
├── oboe@2.1.0 -> /Users/jimhigson/Sites/oboe.js
├── simple-barrier@1.0.4 -> /Users/jimhigson/Sites/simple-barrier
├── simple-queue@0.0.0
└── supervisor@0.5.7


Reply to this email directly or view it on GitHub
#57 (comment).

@jimhigson
Copy link
Owner

I'm on my iPad now so can't run this moment but they were passing when I
last checked in and I haven't had a failure message from Travis so will be
building there too.

If you're getting a build failure on master please post the log

On Saturday, January 10, 2015, Jedd Ahyoung notifications@github.com
wrote:

I do have a question, actually - are all of the tests passing in your
current build?

On Sat, Jan 10, 2015 at 1:13 PM, Jim Higson <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');>
wrote:

That's awesome. Let me know how you get on and if anything isn't very
obvious how to convert.

I don't seem to have karma globally, not sure why npm install didn't
work
for you, but I agree that updating the dependencies is the correct way
to
deal with this.

jimhigson@Jims-Air ~ [1]> npm list -g --depth=0
/usr/local/lib
├── bower@1.3.3
├── browserify@5.11.1
├── elasticSearchRest@0.0.0 ->
/Users/jimhigson/Sites/shop-search/elasticSearchRest
├── fetchQueue@0.0.0 -> /Users/jimhigson/Sites/shop-search/fetchQueue
├── forage@0.3.2
├── forage-fetch@0.0.2
├── generic-queue@1.0.0 ->
/Users/jimhigson/Sites/shop-search/generic-queue
├── grunt-cli@0.1.13
├── http-server@0.6.1
├── jam@0.6.1
├── jamjs@0.2.17
├── jitsu@0.13.16
├── jus@0.0.0 -> /Users/jimhigson/Sites/jus
├── mantri-cli@0.1.7
├── mversion@0.4.1
├── n@1.2.1
├── node-inspector@0.7.1
├── npm@2.1.6
├── oboe@2.1.0 -> /Users/jimhigson/Sites/oboe.js
├── simple-barrier@1.0.4 -> /Users/jimhigson/Sites/simple-barrier
├── simple-queue@0.0.0
└── supervisor@0.5.7


Reply to this email directly or view it on GitHub
#57 (comment).


Reply to this email directly or view it on GitHub
#57 (comment).

@jimhigson
Copy link
Owner

Passing on the Ci: https://travis-ci.org/jimhigson/oboe.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants