-
Notifications
You must be signed in to change notification settings - Fork 50
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
VC 2.0 Release Canidate #148
base: main
Are you sure you want to change the base?
Conversation
@aljones15 IMO we should drop support for Node 14 and 16 and that can be addressed in a separate PR. |
awesome thanks for letting me, node 14 tests are failing probably because of the branches. |
When this get's merged we will want to update the various plugins that build examples. |
@OR13 this branch was used for the test suite for VC 2.0, but as that spec is still in progress, we might not release this build of this library. This PR also still lacks a few VC 2.0 features such as |
d9d7ba4
to
dcecf7b
Compare
if(result.error) { | ||
const firstError = [].concat(result.error)[0]; | ||
throw firstError; | ||
} |
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.
why is this needed here and in other places?
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 is actually not my code or part of this PR, but I do know that the VC library doesn't throw in all cases, verification can return an error or an array of errors. it looks like this code takes that error which could be an array, ensures it is an array and then throws the first error. We probably should be asserting on that error. Maybe an issue can be made about this to assert on these errors rather than throw? EDIT: in most cases it looks like we don't want to assert on the error, and that this code ensures that positive tests throw if an error occurs in verification as this library often doesn't throw when verifying.
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.
@dmitrizagidulin got any insight here? it looks like you just wanted to throw if there is an error so you could check it and figure out what was going wrong with this lib?
ec59695
to
8d114c3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #148 +/- ##
==========================================
+ Coverage 88.66% 90.46% +1.79%
==========================================
Files 4 5 +1
Lines 812 1059 +247
==========================================
+ Hits 720 958 +238
- Misses 92 101 +9
Continue to review full report in Codecov by Sentry.
|
fc2a605
to
02c9701
Compare
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.
Thanks! LGTM.
dbaf8c8
to
fdc98f6
Compare
9ff44fe
to
4f59e13
Compare
…test data. Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
…stamp. Co-authored-by: Tashi D. Gyeltshen <38434620+JSAssassin@users.noreply.github.com>
- Make "id" optional. - If "id" present, check it's a URL. - Add tests.
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
@@ -1,5 +1,6 @@ | |||
export default { | |||
CREDENTIALS_CONTEXT_URL: 'https://www.w3.org/2018/credentials/v1', | |||
CREDENTIALS_CONTEXT_URL: 'https://www.w3.org/ns/credentials/v2', | |||
CREDENTIALS_CONTEXT_V1_URL: 'https://www.w3.org/2018/credentials/v1', |
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.
@aljones15 maybe we need a CREDENTIALS_CONTEXT_V2_URL
here?
Features:
validUntil
andvalidFrom
NOTE:
new features in the VC 2.0 release should branch from this PR unless they build on another feature in a sister PR.
TODO:
validUntil
(PR approved for this)validFrom
(PR approved for this)validUntil
andvalidFrom
feature into this branch.credentialSchemas
?evidence
?