mde / utilities

A classic collection of JavaScript utilities
Apache License 2.0
48 stars 23 forks source link

Node 0.10 breaking changes break utilities (and jake) #6

Closed billti closed 11 years ago

billti commented 11 years ago

As per https://github.com/joyent/node/wiki/Api-changes-between-v0.8-and-v0.10 , path.resolve & path.join will now throw an error on non-string input (previously they ignored it).

I was just trying to build TypeScript (which uses jake) with the latest Node v0.10 and hit issues. mkDirP in ./lib/file.js doesn't initialize currPath, so the first call to path.join with it (https://github.com/mde/utilities/blob/master/lib/file.js#L285) throws an exception now.

Simply changing the currPath declaration 10 lines earlier to ' currPath = "" ' (an empty string) fixed the issue for me. Not sure any other areas you might get bitten by this!

mde commented 11 years ago

Fixed in 0605188cafa737ab427750e92be55d1d6e2c27a9, pushed to NPM in v0.0.20.