Skip to content

Commit 2728436

Browse files
committed
fix(brave): provisional fix for /api/v0/add
This switch to js-ipfs before PR-2379 ipfs/js-ipfs#2379 switched ipfs.add to ipfs._addAsyncIterator and it broke /api/v0/add exposed by embedded js-ipfs in Brave. It seems old polyfills are no longer enough. Real fix requires more time to investigate, so for now we switch to version before js-ipfs/PR-2379. Used js-ipfs commit is from ipfs/js-ipfs#2304 before it was rebased on top of master after PR-2379, making it the last safe version. Real fix will be tracked in #757
1 parent b6627a1 commit 2728436

File tree

2 files changed

+65
-51
lines changed

2 files changed

+65
-51
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"resolutions": {
6969
"libp2p-delegated-content-routing": "0.2.4",
7070
"libp2p-delegated-peer-routing": "0.2.4",
71-
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/fb8626fac0522f49fe29e2f4f686dfd8926204b6/hapi.tar.gz",
71+
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/0d73f8dde9fc7d518f477b8e04fe5abff1b33777/hapi.tar.gz",
7272
"iso-stream-http": "0.1.2",
7373
"stream-http": "npm:[email protected]",
7474
"pull-to-stream": "0.1.1",
@@ -124,7 +124,7 @@
124124
"get-port": "5.0.0",
125125
"http-dns": "3.0.1",
126126
"http-node": "1.2.0",
127-
"ipfs": "https://github.com/ipfs/js-ipfs/tarball/cf38aead2b0cb0b5f269daf265a2b868c50a81f8/js-ipfs.tar.gz",
127+
"ipfs": "https://github.com/ipfs/js-ipfs/tarball/ad65329253da333885b86c7927aa8f0a1e628551/js-ipfs.tar.gz",
128128
"ipfs-css": "0.13.1",
129129
"ipfs-http-client": "36.0.0",
130130
"ipfs-http-response": "0.3.1",

yarn.lock

+63-49
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@
879879
resolved "https://registry.yarnpkg.com/@hapi/file/-/file-1.0.0.tgz#c91c39fd04db8bed5af82d2e032e7a4e65555b38"
880880
integrity sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==
881881

882-
"@hapi/hapi@^18.3.1", "@hapi/hapi@^18.3.2", "@hapi/hapi@https://github.com/lidel/hapi/tarball/fb8626fac0522f49fe29e2f4f686dfd8926204b6/hapi.tar.gz":
882+
"@hapi/hapi@^18.3.1", "@hapi/hapi@^18.3.2", "@hapi/hapi@https://github.com/lidel/hapi/tarball/0d73f8dde9fc7d518f477b8e04fe5abff1b33777/hapi.tar.gz":
883883
version "18.3.2"
884-
resolved "https://github.com/lidel/hapi/tarball/fb8626fac0522f49fe29e2f4f686dfd8926204b6/hapi.tar.gz#a2276e2d746f0befd24d44af2d9775e7245aa55b"
884+
resolved "https://github.com/lidel/hapi/tarball/0d73f8dde9fc7d518f477b8e04fe5abff1b33777/hapi.tar.gz#d34bafd4b1265720b58123384d6cfee93546325a"
885885
dependencies:
886886
"@hapi/accept" "3.x.x"
887887
"@hapi/ammo" "3.x.x"
@@ -4311,6 +4311,13 @@ detective@^5.0.2:
43114311
defined "^1.0.0"
43124312
minimist "^1.1.1"
43134313

4314+
dicer@~0.3.0:
4315+
version "0.3.0"
4316+
resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz#eacd98b3bfbf92e8ab5c2fdb71aaac44bb06b872"
4317+
integrity sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==
4318+
dependencies:
4319+
streamsearch "0.1.2"
4320+
43144321
[email protected], diff@^3.5.0:
43154322
version "3.5.0"
43164323
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
@@ -7329,15 +7336,13 @@ ipfs-http-client@^33.0.1, ipfs-http-client@^33.0.2:
73297336
tar-stream "^2.0.1"
73307337
through2 "^3.0.1"
73317338

7332-
ipfs-http-client@^35.1.0:
7333-
version "35.1.0"
7334-
resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-35.1.0.tgz#53ee45c745840112c137ebe0d254dfba49c35283"
7335-
integrity sha512-C2726d79vydHRc1GdwIWsWnm29zhV568pmQdNru63StXdaDWeijexL4BwcLQi18/JPudT4s9iLTYU1ixIJIHCQ==
7339+
ipfs-http-client@^34.0.0:
7340+
version "34.0.0"
7341+
resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-34.0.0.tgz#8804d06a11c22306332a8ffa0949b6f672a0c9c8"
7342+
integrity sha512-4RCkk8ix4Dqn6sxqFVwuXWCZ1eLFPsVaj6Ijvu1fs9VYgxgVudsW9PWwarlr4mw1xUCmPWYyXnEbGgzBrfMy0Q==
73367343
dependencies:
73377344
abort-controller "^3.0.0"
73387345
async "^2.6.1"
7339-
async-iterator-all "^1.0.0"
7340-
async-iterator-to-pull-stream "^1.3.0"
73417346
bignumber.js "^9.0.0"
73427347
bl "^3.0.0"
73437348
bs58 "^4.0.1"
@@ -7350,10 +7355,9 @@ ipfs-http-client@^35.1.0:
73507355
err-code "^2.0.0"
73517356
explain-error "^1.0.4"
73527357
flatmap "0.0.3"
7353-
fs-extra "^8.1.0"
73547358
glob "^7.1.3"
73557359
ipfs-block "~0.8.1"
7356-
ipfs-utils "^0.1.0"
7360+
ipfs-utils "~0.0.3"
73577361
ipld-dag-cbor "~0.15.0"
73587362
ipld-dag-pb "~0.17.3"
73597363
ipld-raw "^4.0.0"
@@ -7362,14 +7366,12 @@ ipfs-http-client@^35.1.0:
73627366
is-stream "^2.0.0"
73637367
iso-stream-http "~0.1.2"
73647368
iso-url "~0.4.6"
7365-
it-glob "0.0.4"
7366-
it-to-stream "^0.1.1"
73677369
iterable-ndjson "^1.1.0"
73687370
just-kebab-case "^1.1.0"
73697371
just-map-keys "^1.1.0"
73707372
kind-of "^6.0.2"
7371-
ky "^0.13.0"
7372-
ky-universal "^0.3.0"
7373+
ky "^0.11.2"
7374+
ky-universal "^0.2.2"
73737375
lru-cache "^5.1.1"
73747376
multiaddr "^6.0.6"
73757377
multibase "~0.6.0"
@@ -7383,7 +7385,6 @@ ipfs-http-client@^35.1.0:
73837385
promisify-es6 "^1.0.3"
73847386
pull-defer "~0.2.3"
73857387
pull-stream "^3.6.9"
7386-
pull-stream-to-async-iterator "^1.0.2"
73877388
pull-to-stream "~0.1.1"
73887389
pump "^3.0.0"
73897390
qs "^6.5.2"
@@ -7409,7 +7410,7 @@ [email protected], ipfs-http-response@~0.3.1:
74097410
promisify-es6 "^1.0.3"
74107411
stream-to-blob "^1.0.1"
74117412

7412-
ipfs-mfs@^0.12.2:
7413+
ipfs-mfs@~0.12.0:
74137414
version "0.12.2"
74147415
resolved "https://registry.yarnpkg.com/ipfs-mfs/-/ipfs-mfs-0.12.2.tgz#2e8d548aa0da699f6b11a3e1f1798c253a5a43cf"
74157416
integrity sha512-o9vGKEdUI4HwQV67DQnC1AVSSs7i/yaIHrKPEb6Oe6vGeobLGuEGMReWjTcnMi5KAKUECFESEVtDuNJDr8BW5Q==
@@ -7435,7 +7436,15 @@ ipfs-mfs@^0.12.2:
74357436
promisify-es6 "^1.0.3"
74367437
pull-stream "^3.6.9"
74377438

7438-
ipfs-multipart@^0.2.0, ipfs-multipart@~0.2.0:
7439+
ipfs-multipart@~0.1.1:
7440+
version "0.1.1"
7441+
resolved "https://registry.yarnpkg.com/ipfs-multipart/-/ipfs-multipart-0.1.1.tgz#a8c2ad93c3732c00558f50f254ba88a6aeaac6ae"
7442+
integrity sha512-NAmCxgBkZ0usWXf8lMwYYEXvyzrqa65uy/1caVKm5yOKFoqXNrNOt4Ev99Pb+B0RMRqGSdfSvtnZM1cfhSSk2A==
7443+
dependencies:
7444+
"@hapi/content" "^4.1.0"
7445+
dicer "~0.3.0"
7446+
7447+
ipfs-multipart@~0.2.0:
74397448
version "0.2.0"
74407449
resolved "https://registry.yarnpkg.com/ipfs-multipart/-/ipfs-multipart-0.2.0.tgz#f9bc27856dd94a2b4ca1d7f60311775b22638d9c"
74417450
integrity sha512-pDCr7xtOW7KCqgeGmejfWjm5xPH516Kx4OU/PdbtIZu68/cFPW4jftJy9idQHdf0C/NnKHnqntMY93rbc+qrQg==
@@ -7576,9 +7585,9 @@ ipfs-utils@~0.2.0:
75767585
pull-stream-to-async-iterator "^1.0.2"
75777586
readable-stream "^3.4.0"
75787587

7579-
"ipfs@https://github.com/ipfs/js-ipfs/tarball/cf38aead2b0cb0b5f269daf265a2b868c50a81f8/js-ipfs.tar.gz":
7588+
"ipfs@https://github.com/ipfs/js-ipfs/tarball/ad65329253da333885b86c7927aa8f0a1e628551/js-ipfs.tar.gz":
75807589
version "0.38.0-pre.1"
7581-
resolved "https://github.com/ipfs/js-ipfs/tarball/cf38aead2b0cb0b5f269daf265a2b868c50a81f8/js-ipfs.tar.gz#90189b730a6e5123807891a606de7bf7a86c9538"
7590+
resolved "https://github.com/ipfs/js-ipfs/tarball/ad65329253da333885b86c7927aa8f0a1e628551/js-ipfs.tar.gz#63488a4ef5f865635f68beb61ae41db6829ab916"
75827591
dependencies:
75837592
"@hapi/ammo" "^3.1.1"
75847593
"@hapi/boom" "^7.4.3"
@@ -7617,10 +7626,10 @@ ipfs-utils@~0.2.0:
76177626
ipfs-bitswap "~0.25.1"
76187627
ipfs-block "~0.8.1"
76197628
ipfs-block-service "~0.15.2"
7620-
ipfs-http-client "^35.1.0"
7629+
ipfs-http-client "^34.0.0"
76217630
ipfs-http-response "~0.3.1"
7622-
ipfs-mfs "^0.12.2"
7623-
ipfs-multipart "^0.2.0"
7631+
ipfs-mfs "~0.12.0"
7632+
ipfs-multipart "~0.1.1"
76247633
ipfs-repo "~0.26.6"
76257634
ipfs-unixfs "~0.1.16"
76267635
ipfs-unixfs-exporter "~0.37.7"
@@ -7640,8 +7649,6 @@ ipfs-utils@~0.2.0:
76407649
is-pull-stream "~0.0.0"
76417650
is-stream "^2.0.0"
76427651
iso-url "~0.4.6"
7643-
it-pipe "^1.0.1"
7644-
it-to-stream "^0.1.1"
76457652
just-safe-set "^2.1.0"
76467653
kind-of "^6.0.2"
76477654
ky "~0.13.0"
@@ -7651,7 +7658,7 @@ ipfs-utils@~0.2.0:
76517658
libp2p-crypto "~0.16.0"
76527659
libp2p-delegated-content-routing "^0.2.4"
76537660
libp2p-delegated-peer-routing "^0.2.4"
7654-
libp2p-floodsub "^0.18.0"
7661+
libp2p-floodsub "^0.17.2"
76557662
libp2p-gossipsub "~0.0.5"
76567663
libp2p-kad-dht "~0.15.3"
76577664
libp2p-keychain "~0.4.2"
@@ -7667,7 +7674,7 @@ ipfs-utils@~0.2.0:
76677674
merge-options "^1.0.1"
76687675
mime-types "^2.1.21"
76697676
mkdirp "~0.5.1"
7670-
mortice "^2.0.0"
7677+
mortice "^1.2.2"
76717678
multiaddr "^6.1.0"
76727679
multiaddr-to-uri "^5.0.0"
76737680
multibase "~0.6.0"
@@ -8431,11 +8438,6 @@ it-multipart@~0.0.2:
84318438
buffer-indexof "^1.1.1"
84328439
parse-headers "^2.0.2"
84338440

8434-
it-pipe@^1.0.1:
8435-
version "1.0.1"
8436-
resolved "https://registry.yarnpkg.com/it-pipe/-/it-pipe-1.0.1.tgz#6443f12e2a24dd71728c172eb58a159bb957095e"
8437-
integrity sha512-clx7NMIf4eXe3rp4dKLmT5vMYv/hvZv4lNi1/xx4ZJ8CFmpGod9rTKisyBNBTurbCEa3a7503COankdBj/uUCA==
8438-
84398441
it-to-stream@^0.1.1:
84408442
version "0.1.1"
84418443
resolved "https://registry.yarnpkg.com/it-to-stream/-/it-to-stream-0.1.1.tgz#3fb4a9c4df868cd8f4aaf2071eba5ada5a3fad2a"
@@ -8815,6 +8817,14 @@ klaw@^1.0.0:
88158817
optionalDependencies:
88168818
graceful-fs "^4.1.9"
88178819

8820+
ky-universal@^0.2.2:
8821+
version "0.2.2"
8822+
resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.2.2.tgz#7a36e1a75641a98f878157463513965f799f5bfe"
8823+
integrity sha512-fb32o/fKy/ux2ALWa9HU2hvGtfOq7/vn2nH0FpVE+jwNzyTeORlAbj3Fiw+WLMbUlmVqZIWupnLZ2USHvqwZHw==
8824+
dependencies:
8825+
abort-controller "^3.0.0"
8826+
node-fetch "^2.3.0"
8827+
88188828
ky-universal@^0.3.0, ky-universal@~0.3.0:
88198829
version "0.3.0"
88208830
resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.3.0.tgz#3fcbb0dd03da39b5f05100d9362a630d5e1d402e"
@@ -8823,6 +8833,11 @@ ky-universal@^0.3.0, ky-universal@~0.3.0:
88238833
abort-controller "^3.0.0"
88248834
node-fetch "^2.6.0"
88258835

8836+
ky@^0.11.2:
8837+
version "0.11.2"
8838+
resolved "https://registry.yarnpkg.com/ky/-/ky-0.11.2.tgz#4ffe6621d9d9ab61bf0f5500542e3a96d1ba0815"
8839+
integrity sha512-5Aou5BWue5/mkPqIRqzSWW+0Hkl403pr/2AIrCKYw7cVl/Xoe8Xe4KLBO0PRjbz7GnRe1/8wW1KhqQNFFE7/GQ==
8840+
88268841
ky@^0.13.0, ky@~0.13.0:
88278842
version "0.13.0"
88288843
resolved "https://registry.yarnpkg.com/ky/-/ky-0.13.0.tgz#354c3d209f26d772415cbfe4f5d02ccbcb5ed536"
@@ -9171,23 +9186,7 @@ [email protected], libp2p-delegated-peer-routing@^0.2.4:
91719186
peer-id "^0.12.2"
91729187
peer-info "^0.15.1"
91739188

9174-
libp2p-floodsub@^0.18.0:
9175-
version "0.18.0"
9176-
resolved "https://registry.yarnpkg.com/libp2p-floodsub/-/libp2p-floodsub-0.18.0.tgz#49efd1a9936e898f62abbf041fa2f62049b796e0"
9177-
integrity sha512-4OihLP5A4LsxNPlfb0mq6vkjAaNu4YxuyYeoj2nNgrRSzr4H8Dz0YtA+DzEDXIgP2RBANSzS+KG9oDeUXDHa/Q==
9178-
dependencies:
9179-
async "^2.6.2"
9180-
bs58 "^4.0.1"
9181-
debug "^4.1.1"
9182-
length-prefixed-stream "^2.0.0"
9183-
libp2p-crypto "~0.16.1"
9184-
libp2p-pubsub "~0.2.0"
9185-
protons "^1.0.1"
9186-
pull-length-prefixed "^1.3.2"
9187-
pull-pushable "^2.2.0"
9188-
pull-stream "^3.6.9"
9189-
9190-
libp2p-floodsub@~0.17.1:
9189+
libp2p-floodsub@^0.17.2, libp2p-floodsub@~0.17.1:
91919190
version "0.17.2"
91929191
resolved "https://registry.yarnpkg.com/libp2p-floodsub/-/libp2p-floodsub-0.17.2.tgz#c789bcd55cfb513a4d2f5291bd28d6aa2be271d1"
91939192
integrity sha512-xOljtBcNTerBwRYFnXlJVmTwdYla9YTvBux6HaBE0GvVjPHqOI7gO5WJQ1Nul/7h5qLX5tJqZ4OY5CVn+mcuUQ==
@@ -10301,6 +10300,16 @@ moment@^2.10.6:
1030110300
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
1030210301
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
1030310302

10303+
mortice@^1.2.2:
10304+
version "1.2.3"
10305+
resolved "https://registry.yarnpkg.com/mortice/-/mortice-1.2.3.tgz#8e92963d67708dc229a98d5b65ebaa1fc4afb7fd"
10306+
integrity sha512-m285eSxSrbNieKgWWzGSbWO2oSoFHb2fdZX306afMVJ8p8boeAmUW5hCyZBC/gHuBMizR7wO9sXH74kZmf0ZbA==
10307+
dependencies:
10308+
observable-webworkers "^1.0.0"
10309+
p-queue "^6.0.0"
10310+
promise-timeout "^1.3.0"
10311+
shortid "^2.2.8"
10312+
1030410313
mortice@^2.0.0:
1030510314
version "2.0.0"
1030610315
resolved "https://registry.yarnpkg.com/mortice/-/mortice-2.0.0.tgz#7be171409c2115561ba3fc035e4527f9082eefde"
@@ -10819,7 +10828,7 @@ [email protected]:
1081910828
object.getownpropertydescriptors "^2.0.3"
1082010829
semver "^5.7.0"
1082110830

10822-
node-fetch@^2.2.0, node-fetch@^2.6.0:
10831+
node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0:
1082310832
version "2.6.0"
1082410833
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
1082510834
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
@@ -14326,6 +14335,11 @@ stream-to-pull-stream@^1.7.2, stream-to-pull-stream@^1.7.3:
1432614335
looper "^3.0.0"
1432714336
pull-stream "^3.2.3"
1432814337

14338+
14339+
version "0.1.2"
14340+
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
14341+
integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=
14342+
1432914343
strftime@~0.10.0:
1433014344
version "0.10.0"
1433114345
resolved "https://registry.yarnpkg.com/strftime/-/strftime-0.10.0.tgz#b3f0fa419295202a5a289f6d6be9f4909a617193"

0 commit comments

Comments
 (0)