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

Better migration fixes for path.existsSync

Open shama opened this issue 12 years ago • 4 comments

Take a look at this pull: https://github.com/cowboy/node-glob-whatev/pull/3/files Both changes are incorrect.

I think a better migration would be something a la var existsSync = fs.existsSync || path.existsSync; so it doesn't break code on 0.6. Thanks!

shama avatar Jul 07 '12 06:07 shama

Oh another note: it misses uses of require('path').existsSync too. :) Reference: gruntjs/grunt-contrib#73 (btw, has been fixed earlier in the 0.2.0-wip branch of that repo)

shama avatar Jul 07 '12 06:07 shama

+1 just got 5 pull requests, there will break compatibility with node 0.6 and node 0.4.

AndreasMadsen avatar Jul 07 '12 08:07 AndreasMadsen

+1

bithavoc avatar Jul 07 '12 14:07 bithavoc

I'm kinda sad because the state of the bot is relatively ephemeral, it takes only hours to run on npm repos on github (this time around 8672 and only affected 8% of the population(700) of those 60% were positive changes and 40% were not) however, when i package this into an example, I will attempt to address the require('fs') and backwards compat both ways.

blakmatrix avatar Jul 07 '12 18:07 blakmatrix