oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
178 stars 24 forks source link

previousCid -> previousCids()[0] #438

Closed gotjoshua closed 1 year ago

gotjoshua commented 1 year ago

Summary

My linter and build chain complain about this line

Problem

image

Impact

build fails

Solution

fix is easy previousCids()[0] but not sure if that has side effects that you may need to consider.

matheus23 commented 1 year ago

Fascinating. Did we upgrade the wnfs npm library at some point @icidasset?

But yeah. We should fix this.

icidasset commented 1 year ago

Fascinating. Did we upgrade the wnfs npm library at some point @icidasset?

Hmm, maybe in the switch from yarn to npm. Does it need to be set to a specific version?

icidasset commented 1 year ago

Also, thanks for the issue @gotjoshua Weird that our compiler doesn't fall over this.

matheus23 commented 1 year ago

Hmm, maybe in the switch from yarn to npm. Does it need to be set to a specific version?

Yeah. The API changed between versions. We could just upgrade it though :)

icidasset commented 1 year ago

Has the API changed a lot? Otherwise I'd change it in the next release. What was the version before, 0.1.7?

matheus23 commented 1 year ago

I think it was 0.1.6. I'm pretty sure the only change to the public API was having multiple previous CIDs per public node. That's all. So I'd recommend just fixing it :)

(Also, the current version of rs-wnfs is 0.1.10. We could look at upgrading to that version while we're at it)

matheus23 commented 1 year ago

Ah well, perhaps there was also some changes to how metadata worked, not sure. So perhaps not super easy, but still not hard to do.

icidasset commented 1 year ago

I'll keep it to 0.1.6 for now then. Will be working on the upgrade for webnative v0.36 asap after the 0.35 release + private fs integration 👀

matheus23 commented 1 year ago

Actually, that's incorrect. The previous version was 0.1.7-alpha5. I think we should just fix this type error and keep it at 0.1.7 for now. The metadata changes are 0.1.8+ I think