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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add types #106

Merged
merged 5 commits into from
Mar 5, 2021
Merged

feat: add types #106

merged 5 commits into from
Mar 5, 2021

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Mar 5, 2021

Adds ts types, fixes all tsc errors, updates all deps.

Removes ipfs/ipfsd-ctl/ipfs-http-client dev deps as we only spin up
a node to get an IPFS id which we can just hard code for testing purposes.

Replaces protons with protobufjs as elsewhere in the stack.

Adds ts types, fixes all tsc errors.

Removes ipfs/ipfsd-ctl/ipfs-http-client dev deps as we only spin up
a node to get an IPFS id which we can just hard code for testing purposes.

Replaces protons with protobufjs as elsewhere in the stack.
const { parseRFC3339 } = require('./utils')
const ERRORS = require('./errors')

const ID_MULTIHASH_CODE = multihash.names.id
const ID_MULTIHASH_CODE = multihash.names.identity
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be .id but apparently not flagged as a breaking change: multiformats/js-multihash#66

Also, somehow we don't cover this in the tests 😱

@@ -116,7 +118,7 @@ const validate = async (publicKey, entry) => {
throw errCode(new Error('unrecognized validity format (not an rfc3339 format)'), ERRORS.ERR_UNRECOGNIZED_FORMAT)
}

if (validityDate < Date.now()) {
if (validityDate.getTime() < Date.now()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

package.json Outdated Show resolved Hide resolved
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

const { parseRFC3339 } = require('./utils')
const ERRORS = require('./errors')

const ID_MULTIHASH_CODE = multihash.names.id
const ID_MULTIHASH_CODE = multihash.names.identity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be .id but apparently not flagged as a breaking change: multiformats/js-multihash#66

Also, somehow we don't cover this in the tests 😱

@vasco-santos vasco-santos merged commit 135552b into master Mar 5, 2021
@vasco-santos vasco-santos deleted the feat/add-types branch March 5, 2021 15:42
@vasco-santos
Copy link
Member

Shipped 0.9.0 to guarantee nothing breaks upstream with the types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants