Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dependency on community IPFS types with new ipfs-core-types #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mboogerd
Copy link

hi! 馃憢

I encountered issue #29 and thought I would attempt to help.

Disclaimer:

  • I don't consider myself a Node / JS or TS developer
  • I have no more than a few hours of experience with IPFS and OrbitDB

The problem:
IPFS type from git+https://github.com/lukas2005/types-ipfs.git don't match the types employed by the more recent ipfs-core-types package. This package seems to be the new way of working, at least for ipfs-http-client.

The fix:

  • Replace references to @types/ipfs with ipfs-core-types
  • Store.d.ts - TS error: Cannot find name 'IReplicationStatus'.. This seems to be fixed by adding a reference path. I don't understand the details of what it does, but I see a similar usage in OrbitDB.d.ts, so I guess it's okay? :)
  • Verify that this massive package.json diff is a desirable one <- Question to you :) (I was under the impression that we don't check in package.json for libraries)
  • OrbitDB.d.ts - TS error: Cannot find module 'orbit-db-cache' or its corresponding type declarations.. My intuition here is that we shouldn't use this git dependency on OrbitDB, but have a release cycle for the types that aligns with the releases of OrbitDB. I could be entirely wrong here though. Also not sure whether that should be fixed in this PR

Feedback much appreciated! :)

Also fix a reported error with IReplicationStatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant