blakmatrix / node-migrator-bot

Migrate your old Node.js Repos
MIT License
31 stars 3 forks source link

breaking changes and package.json #24

Open Qard opened 12 years ago

Qard commented 12 years ago

When suggesting a change that breaks compatibility with previous versions, the bot should either update the engine in package.json to >= 0.8.0 or, ideally; be clever enough to put in detection code. For example;

path.exists(*)

becomes

(parseInt(process.version.split('.')[1]) > 8 ? fs.exists(*) : path.exists(*))
pksunkara commented 12 years ago

Why not fs.exists(*) || path.exists(*) ?

Or even better (fs.exists || path.exists)(*)

Qard commented 12 years ago

Well, the first would fail when trying to execute a function that doesn't exist, but the second should work.

blakmatrix commented 12 years ago

blakmatrix/node-migrator-bot#21 blakmatrix/node-migrator-bot#22