diff --git a/lib/node_modules/@stdlib/_tools/search/pkg-index/test/test.js b/lib/node_modules/@stdlib/_tools/search/pkg-index/test/test.js index 6062a3c00e4b..f9dbb68d8b61 100644 --- a/lib/node_modules/@stdlib/_tools/search/pkg-index/test/test.js +++ b/lib/node_modules/@stdlib/_tools/search/pkg-index/test/test.js @@ -109,7 +109,7 @@ tape( 'the function returns an error to a provided callback if an error is encou var pkgIndex; var opts; - pkgIndex = proxyquire( './../lib/index.js', { + pkgIndex = proxyquire( './../lib/main.js', { '@stdlib/_tools/pkgs/readmes': find }); @@ -136,7 +136,7 @@ tape( 'the function returns an error to a provided callback if an error is encou var pkgIndex; var opts; - pkgIndex = proxyquire( './../lib/index.js', { + pkgIndex = proxyquire( './../lib/main.js', { '@stdlib/_tools/pkgs/readmes': find, '@stdlib/fs/read-file-list': readFileList }); diff --git a/lib/node_modules/@stdlib/fs/read-file-list/lib/sync.js b/lib/node_modules/@stdlib/fs/read-file-list/lib/sync.js index df4df3321694..83b3987e0bbd 100644 --- a/lib/node_modules/@stdlib/fs/read-file-list/lib/sync.js +++ b/lib/node_modules/@stdlib/fs/read-file-list/lib/sync.js @@ -41,7 +41,7 @@ var debug = logger( 'read-file-list:sync' ); * @param {(string|null)} [options.encoding] - file encoding * @param {string} [options.flag] - file status flag * @throws {TypeError} must provide an array of strings -* @returns {ObjectArray} file contents +* @returns {(ObjectArray|Error)} file contents or an error * * @example * var list = [ __filename ]; @@ -68,7 +68,7 @@ function readFileListSync( list, options ) { opts = {}; } len = list.length; - results = new Array( len ); + results = []; debug( 'Reading %d files...', len ); for ( i = 0; i < len; i++ ) { @@ -79,10 +79,10 @@ function readFileListSync( list, options ) { return file; } debug( 'Successfully read file: %s (%d of %d).', list[ i ], i, len ); - results[ i ] = { + results.push({ 'file': list[ i ], 'data': file - }; + }); } debug( 'Finished reading files.' ); return results;