YahooArchive / arrow

FE Test framework designed to promote TDD
http://yahoo.github.io/arrow/arrow_intro.html
BSD 3-Clause "New" or "Revised" License
55 stars 59 forks source link

Dependency in package.json should provide versions #10

Closed emkay closed 12 years ago

emkay commented 12 years ago

Instead of wildcards we should use version numbers for our dependencies. This causes new versions of modules that we might not want, like YUI 3.7.0pr1 which was just pushed. I believe it also may have cause tests from breaking because of the new version of express. cc @ktslwy

mridgway commented 12 years ago

Confirmed tests breaking with various versions of Express. It seems to work with Express 3, but not with Express 2. Please lock these down.

proverma commented 12 years ago

I was Planning to lock express with v 2.x, what tests are failing with express 3 ?

Btw I am ooo till Sunday, will look into all the pull requests first thing Monday morning, sorry for the delay.

mridgway commented 12 years ago

The following error happens when arrow_server tries to run using Mojito's version of Express (2.5.2):

/Users/mridgway/Projects/mojito/node_modules/yahoo-arrow/arrow_server/server.js:89
var app = express();
          ^
TypeError: object is not a function
    at Object.<anonymous> (/Users/mridgway/Projects/mojito/node_modules/yahoo-arrow/arrow_server/server.js:89:11)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Express() changed to a function instead of an object in 3.0, meaning that arrow_server is only compatible with Express 3. (See: https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x)

lalau commented 12 years ago

I changed that since the test was failing when we use express 3.x: https://github.com/yahoo/arrow/pull/9/files You will need to revert the above changes if you need to use express 2.x.

mridgway commented 12 years ago

I don't want to use it with Express 2.x, but because Arrow's package.json does not specify what version it works with, it assumes that it works with the already installed Express 2.x. The package.json needs to be locked down to versions of dependencies that it works with, so that it knows to install the working version if an older version already exists.

proverma commented 12 years ago

This is fixed now, we are using express 2.x, and all dependencies have fixed versions now.