ipfs / js-ipfs-unixfs

JavaScript implementation of IPFS' unixfs (a Unix FileSystem representation on top of a MerkleDAG)
Other
87 stars 34 forks source link

bug: rabin chunker errors when no options are passed #339

Closed SgtPooki closed 1 year ago

SgtPooki commented 1 year ago

calling rabin() throws an error, Error: please specify an average chunk size

https://github.com/ipfs/js-ipfs-unixfs/blob/b7a98f0e850bf488ba7430e90812ddb5f5c0c438/packages/ipfs-unixfs-importer/src/chunker/rabin.ts#L53-L55

options are all optional, and there is a default AVG chunk size, so we should not be erroring here, or we should have better enforced types.

achingbrain commented 1 year ago

Good spot, would you like to PR a quick fix?

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version ipfs-unixfs-importer-v15.1.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket: