-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add types #106
Conversation
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 |
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.
😱
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 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()) { |
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.
😱
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.
LGTM
const { parseRFC3339 } = require('./utils') | ||
const ERRORS = require('./errors') | ||
|
||
const ID_MULTIHASH_CODE = multihash.names.id | ||
const ID_MULTIHASH_CODE = multihash.names.identity |
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 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 😱
Shipped |
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.