Skip to content

Commit

Permalink
fix: streaming HTTP APIs of js-ipfs in Brave (#794)
Browse files Browse the repository at this point in the history
* fix: /api/v0/add in Brave

This switches to async iterator version of ipfs.add
(introduced to js-ipfs in ipfs/js-ipfs#2517)
and ensures Node streams are replaced by deterministic version of readable-stream

Closes #757

* fix(cid): fast finish + allow osx to fail
  • Loading branch information
lidel authored Oct 15, 2019
1 parent 6f3eae5 commit b47f81b
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 752 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ language: node_js
node_js:
- 10.15.1
matrix:
fast_finish: true
allow_failures:
- os: windows
- os: osx
cache:
- npm
- yarn
Expand All @@ -15,7 +17,6 @@ addons:
homebrew:
packages: jq
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install jq ; fi
- npm run ci:install
script:
- npm run ci:build
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@
"private": true,
"preferGlobal": false,
"resolutions": {
"libp2p-delegated-content-routing": "0.2.4",
"libp2p-delegated-peer-routing": "0.2.4",
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/0d73f8dde9fc7d518f477b8e04fe5abff1b33777/hapi.tar.gz",
"@hapi/hapi": "18.4.0",
"iso-stream-http": "0.1.2",
"stream-http": "npm:iso-stream-http@0.1.2",
"stream": "npm:readable-stream@3.4.0",
"pull-to-stream": "0.1.1",
"multiaddr": "6.1.0"
},
Expand Down Expand Up @@ -130,7 +129,7 @@
"get-port": "5.0.0",
"http-dns": "3.0.1",
"http-node": "1.2.0",
"ipfs": "https://github.com/ipfs/js-ipfs/tarball/ad65329253da333885b86c7927aa8f0a1e628551/js-ipfs.tar.gz",
"ipfs": "https://github.com/ipfs/js-ipfs/tarball/d9986ee4d7945f6a5d77dc7a2db4863d06971eb9/js-ipfs.tar.gz",
"ipfs-css": "0.13.1",
"ipfs-http-client": "38.2.0",
"ipfs-http-response": "0.3.1",
Expand All @@ -150,6 +149,7 @@
"piggybacker": "2.0.0",
"postmsg-rpc": "2.4.0",
"pull-file-reader": "1.0.2",
"readable-stream": "3.4.0",
"tachyons": "4.11.1",
"timers-browserify-full": "0.0.1",
"uri-to-multiaddr": "3.0.1",
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const commonConfig = {
extensions: ['.js', '.json'],
alias: {
url: 'iso-url',
stream: 'readable-stream', // cure general insanity
http: 'http-node', // chrome.sockets
dns: 'http-dns', // chrome.sockets
dgram: 'chrome-dgram', // chrome.sockets
Expand Down
Loading

0 comments on commit b47f81b

Please sign in to comment.