Skip to content

Commit

Permalink
Apply the same http-browserify resume workaround in npm-registry-clie…
Browse files Browse the repository at this point in the history
…nt as for request GH-10
  • Loading branch information
deathcap committed Feb 11, 2015
1 parent facd317 commit 1d185dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ var textReplacements = [

// download tarball URLs also through CORS proxy TODO: more general fix, please
[/url\.parse\(dist\.tarball\)/g, 'url.parse(("http://cors.maxogden.com/"+dist.tarball))'],

// node_modules/npm/node_modules/npm-registry-client/lib/fetch.js
// workaround https://github.com/substack/http-browserify/issues/81 Response inherits from Stream instead of Stream.Readable
// note: the 'request' module has the same workaround
[/ \/\/ Work around bug in node v0\.10\.0 where the CryptoStream\s+\/\/ gets stuck and never starts reading again\.\s+res\.resume\(\)/g, 'if (res.resume) res.resume()'],

];

// Included file data for staticReadFileSync; this is similar to
Expand Down

0 comments on commit 1d185dd

Please sign in to comment.