module-deps
module-deps copied to clipboard
ignoreMissing not working
having pull request issues but if you add this at line 115
if( !~file.indexOf(path.sep) ) return cb(new Error(
'no path to module, and not in cache: "'+id+'" from file '
+ parent.filename
))
it will work... and if you need a test to verify
var mdeps = require('../');
var test = require('tape');
test('ignoreMissing should skip native modules if not cached', function (t) {
t.plan(1);
var p = mdeps({ignoreMissing: true});
p.on('error', function(err){ t.fail(err) } );
p.on('missing', function(msg){ t.pass(msg) } );
p.write(__dirname + '/files/ignore.js');
p.end();
});
with test/files/ignore.js:
require('fs');
Bump.