kappa-db / multifeed

Multi-writer hypercore.
135 stars 27 forks source link

Bump to latest versions of hypercore and hypercore-protocol. #55

Closed Happy0 closed 3 years ago

Happy0 commented 3 years ago

@cblgh and I have been experimenting with kappa-core in a web browser context over here: https://github.com/cblgh/caballo/

I discovered that when trying to use a browserfied kappa-core, an error was thrown which appears to derive from an old version of hypercore-protocol after following the stacktrace:

 ncaught TypeError: Path must be a string. Received undefined
    assertPath index.js:29
    dirname index.js:294
    path index.js:43
    load index.js:21
    [245]</</< index.js:1
    [245]</< bundle.js:42087
    [245]< bundle.js:42087
    o _prelude.js:1
    o _prelude.js:1
    [230]</</< handshake-state.js:1
    [230]</< bundle.js:38026
    [230]< bundle.js:38026
    o _prelude.js:1
    o _prelude.js:1
    [232]< index.js:1
    o _prelude.js:1
    o _prelude.js:1
    [234]</</< index.js:1
    [234]</< bundle.js:38396
    [234]< bundle.js:38396
    o _prelude.js:1
    o _prelude.js:1
    [236]</</< handshake.js:1
    [236]</< bundle.js:38806
    [236]< bundle.js:38806
    o _prelude.js:1
    o _prelude.js:1
    [235]</</< index.js:1
    [235]</< bundle.js:38707
    [235]< bundle.js:38707
    o _prelude.js:1
    o _prelude.js:1
    [224]< index.js:1
    o _prelude.js:1
    o _prelude.js:1
    [325]< replicate.js:1
    o _prelude.js:1
    o _prelude.js:1
    [322]</</< index.js:21
    [322]</< bundle.js:53414
    [322]< bundle.js:53414
    o _prelude.js:1
    o _prelude.js:1
    [319]</</< index.js:1
    [319]</< bundle.js:51329
    [319]< bundle.js:51329
    o _prelude.js:1
    o _prelude.js:1
    [277]< index.js:3
    o _prelude.js:1
    o _prelude.js:1
    [1]</</< index.js:13
    [1]</< bundle.js:169
    [1]< bundle.js:169
    o _prelude.js:1
    r _prelude.js:1
    <anonymous> _prelude.js:1
index.js:29

When overriding the versions of hypercore and hypercore-protocol this error disappears and kappa-core and kappa-view work in a browser tab.

The tests pass with these bumped versions, and our little experiment also works. Please let me know if there are any more robust ways I can do user testing to see if bumping these versions introduces any bugs.

hackergrrl commented 3 years ago

Thanks for the patch @Happy0.

It looks like sodium-native might not be compiling on Node 8 anymore. I'm ok with this. Do you mind editing .travis.yml to use Node 10/12/14 instead of 8/10?

Happy0 commented 3 years ago

Cheers @noffle - done! :)

hackergrrl commented 3 years ago

@Happy0 Perfect!

@cblgh Could you publish this as a major semver? I'm not at my main computer and don't have npm set up. If not I'll get to this in a couple of days (about to travel).

cblgh commented 3 years ago

@noffle sure thing!

cblgh commented 3 years ago

multifeed@6.0.0 should be published :)