npm-registry-client depends on synchronous filesystem operations fs.readdirSync() and fs.statSync(), which are cumbersome to browserify. This PR removes those sync fs API usages to allow for browserification — this is the only change needed, at least to get npm-registry-client to browserify unmodified (npm itself requires additional changes, but this change is simple enough to PR independently).
npm-registry-client depends on synchronous filesystem operations
fs.readdirSync()
andfs.statSync()
, which are cumbersome to browserify. This PR removes those sync fs API usages to allow for browserification — this is the only change needed, at least to get npm-registry-client to browserify unmodified (npm itself requires additional changes, but this change is simple enough to PR independently).All tests pass.