henry-rodrick / hlsjs-ipfs-loader

A js-ipfs loader for the hls.js JavaScript HLS client
MIT License
60 stars 31 forks source link

Update to new IPFS API #16

Closed achingbrain closed 4 years ago

achingbrain commented 4 years ago

The IPFS API is undergoing a massive refactoring effort to make it all async iterables. We're pretty close to landing that PR, you can check out the code at the ipfs/js-ipfs#async-await-roundup branch and the API docs at ipfs/interface-js-ipfs-core#refactor/async-iterables/SPEC.

This PR updates the code & example for hlsjs-ipfs-loader to use the new API.

vaultec81 commented 4 years ago

Thank you, merged.

alanshaw commented 4 years ago

ping, can this be released 🙏

vaultec81 commented 4 years ago

I am experiencing some issues with building the release. @moshisushi can you check it out?

henry-rodrick commented 4 years ago

@vaultec81 Problem with aegir? I'm seeing an error indeed when running the build:

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object at validateString (internal/validators.js:112:11) at Module.require (internal/modules/cjs/loader.js:764:3) at require (internal/modules/cjs/helpers.js:68:18) at Object.exports.getUserConfig (/Users/henry/workspace/hlsjs-ipfs-loader/node_modules/aegir/src/utils.js:82:12) at userConfig (/Users/henry/workspace/hlsjs-ipfs-loader/node_modules/aegir/src/config/user.js:69:24) at Object.<anonymous> (/Users/henry/workspace/hlsjs-ipfs-loader/node_modules/aegir/src/config/webpack/index.js:11:32) at Module._compile (internal/modules/cjs/loader.js:868:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10) at Module.load (internal/modules/cjs/loader.js:731:32) at Function.Module._load (internal/modules/cjs/loader.js:644:12)

Is this what you mean?

vaultec81 commented 4 years ago

@moshisushi Yes, we seem to be facing the same issue.

henry-rodrick commented 4 years ago

I locked the dependency to

"dependencies": { "aegir": "20.5.0" }

Seems to work better. @vaultec81 see if that works for you too please

henry-rodrick commented 4 years ago

@vaultec81 @alanshaw I think 0.2.3 is ready now. Looking at the diff, it honestly makes no sense why downgrading aegir to the previous minor version would fix the issue (they've only changed some test code!), so I doubt that's what "fixed" it. Will do a full clean-rebuild over here and see if it's still working.

henry-rodrick commented 4 years ago

I think upgrading aegir was enough, not a strict version lock. I've changed it to "aegir": "^20.5.0" now and seems fine even after clean rebuild. Let me know how it goes.