node-migrator-bot
node-migrator-bot copied to clipboard
breaking changes and package.json
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(*))
Why not fs.exists(*) || path.exists(*) ?
Or even better (fs.exists || path.exists)(*)
Well, the first would fail when trying to execute a function that doesn't exist, but the second should work.
blakmatrix/node-migrator-bot#21 blakmatrix/node-migrator-bot#22