-
Notifications
You must be signed in to change notification settings - Fork 35
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: make mimetype optional as it is in go #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM in that I can verify they both now have an optional MimeType.
Is this a breaking change?
Am I right in saying that this change will not affect anything to do with existing content (and would actually allow js-ipfs to deserialise content that has been created in go land without a MimeType?) but new content would get a different hash that it would have previously?
@@ -20,5 +20,5 @@ module.exports = `message Data { | |||
} | |||
|
|||
message Metadata { | |||
required string MimeType = 1; | |||
optional string MimeType = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that go-ipfs changed meanwhile. It would be great to have unixfs spec'ed out //cc @whyrusleeping @Stebalien
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for reference: ipfs/kubo#3458
tldr; DONT USE REQUIRED
@achingbrain can you answer @alanshaw's questions? If all is good, go ahead for the merge and release :) |
I don't think so, no - previous hashes would continue to work but anything newly hashed that didn't have a
Yes, exactly. |
@achingbrain gave you publish perms (seems that npm stopped having problems today) |
* feat: switch to async await * chore: update ipld formats * chore: update README * chore: standardise error codes
The mimetype is optional in go-ipfs-unixfs so this PR makes it optional in js too.