Skip to content

Commit 4412f13

Browse files
committed
Patch npm-client-registry to request URL string instead of object
Workaround iriscouch/browser-request#44 Ref GH-2
1 parent a3d1a3d commit 4412f13

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

demo.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ var textReplacements = [
2929

3030
// npm/node_modules/npm-registry-client/index.js
3131
[/client\[name\] = require\(entry\)/g, 'client[name] = window.npmRegistryClientRequire(entry)'],
32+
33+
34+
// npm/node_modules/npm-registry-client/lib/request.js
35+
// workaround https://github.com/iriscouch/browser-request/pull/44 browser-request cannot request URL objects
36+
[/(var req = request\(opts, decodeResponseBody\(done\)\))/g, 'opts.url = opts.url.href; $1'],
3237
];
3338

3439
// Included file data for staticReadFileSync; this is similar to

0 commit comments

Comments
 (0)