robrich / gulp-match

Does a vinyl file match a condition?
MIT License
23 stars 9 forks source link

Detection of RegExp conditions fails with Node.js 6.2.1 #15

Closed arty-name closed 8 years ago

arty-name commented 8 years ago

The fragile detection of RegExp instances fails when executed in Node.js 6.2.1 environment because condition.hasOwnProperty('source') is false there.

$ node 
> require('gulp-match')({relative: 'path.coffee'}, /.js$/)
true
> /test/.hasOwnProperty('source')
false
robrich commented 8 years ago

It was moved to the prototype, but I believe we patched that recently. Want to PR a failing test?

arty-name commented 8 years ago

Oh, sorry, my fault, didn’t update to the most recent version. Indeed 1.0.2 does not have this issue. Thanks!