node-migrator-bot icon indicating copy to clipboard operation
node-migrator-bot copied to clipboard

breaking changes and package.json

Open Qard opened this issue 13 years ago • 3 comments

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(*))

Qard avatar Jul 07 '12 18:07 Qard

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

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

pksunkara avatar Jul 07 '12 18:07 pksunkara

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

Qard avatar Jul 07 '12 18:07 Qard

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

blakmatrix avatar Jul 07 '12 18:07 blakmatrix