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

chore: Update dependencies to reduce dependencies downstream #22

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @digitalcredentials/vc ChangeLog

## 8.0.0 - 2024-08-03
### Changed
- **BREAKING**: Switch dependencies to:
- `@digitalcredentials/jsonld`
- `@digitalcredentials/jsonld-signatures`
- `@digitalcredentials/http-client`

## 7.0.0 - 2024-02-07
### Changed
* Switch to DigitalBazaar's `jsonld`, `http-client` and `rdf-canonize` libs
Expand Down
9 changes: 5 additions & 4 deletions lib/CredentialIssuancePurpose.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Copyright (c) 2019-2021 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
const jsonld = require('jsonld');
const jsonld = require('@digitalcredentials/jsonld');
const {AssertionProofPurpose} =
require('@digitalcredentials/jsonld-signatures').purposes;

/**
* Creates a proof purpose that will validate whether or not the verification
* Creates a proof purpose that will validate whether the verification
* method in a proof was authorized by its declared controller for the
* proof's purpose.
*/
Expand Down Expand Up @@ -45,7 +45,8 @@ class CredentialIssuancePurpose extends AssertionProofPurpose {
* @throws {Error} If verification method not authorized by controller.
* @throws {Error} If proof's created timestamp is out of range.
*
* @returns {Promise<{valid: boolean, error: Error}>} Resolves on completion.
* @returns {Promise<{valid: boolean, error: ErrorConstructor}>} Resolves on
* completion.
*/
async validate(proof, {
document, suite, verificationMethod, documentLoader, expansionMap
Expand All @@ -72,7 +73,7 @@ class CredentialIssuancePurpose extends AssertionProofPurpose {
'Credential issuer must match the verification method controller.');
}

return {valid: true};
return {valid: true, error: Error};
} catch(error) {
return {valid: false, error};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
'use strict';

const jsonld = require('jsonld');
const jsonld = require('@digitalcredentials/jsonld');
const jsigs = require('@digitalcredentials/jsonld-signatures');
const {AuthenticationProofPurpose} = jsigs.purposes;
const CredentialIssuancePurpose = require('./CredentialIssuancePurpose');
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@digitalcredentials/vc",
"version": "7.0.0",
"version": "8.0.0",
"description": "Verifiable Credentials JavaScript library.",
"homepage": "https://github.com/digitalcredentials/vc-js",
"homepage": "https://github.com/digitalcredentials/vc",
"repository": {
"type": "git",
"url": "https://github.com/digitalcredentials/vc-js"
"url": "https://github.com/digitalcredentials/vc"
},
"license": "BSD-3-Clause",
"main": "lib/index.js",
"files": [
"lib/**/*.js"
],
"dependencies": {
"@digitalcredentials/ed25519-signature-2020": "^4.0.0",
"jsonld": "digitalcredentials/jsonld.js#v10.x",
"@digitalcredentials/jsonld-signatures": "^10.0.1",
"@digitalcredentials/ed25519-signature-2020": "~5.0.0",
"@digitalcredentials/jsonld": "~9.0.0",
"@digitalcredentials/jsonld-signatures": "~11.0.0",
"@digitalcredentials/open-badges-context": "^2.1.0",
"credentials-context": "^2.0.0",
"fix-esm": "^1.0.1"
Expand All @@ -26,18 +26,18 @@
"@babel/plugin-transform-runtime": "^7.13.9",
"@babel/preset-env": "^7.13.9",
"@babel/runtime": "^7.13.9",
"@digitalbazaar/ed25519-signature-2018": "^2.0.1",
"@digitalbazaar/ed25519-verification-key-2018": "^3.0.0",
"@digitalcredentials/security-document-loader": "^3.2.0",
"@digitalcredentials/vc-status-list": "^5.0.2",
"@digitalbazaar/ed25519-signature-2018": "^4.0.0",
"@digitalbazaar/ed25519-verification-key-2018": "^4.0.0",
"@digitalcredentials/security-document-loader": "^5.0.1",
"@digitalcredentials/vc-status-list": "^8.0.0",
"babel-loader": "^8.2.2",
"chai": "^4.3.3",
"chai": "^5.1.1",
"cross-env": "^7.0.3",
"did-context": "^3.1.1",
"did-veres-one": "^13.0.0",
"eslint": "^7.21.0",
"eslint-config-digitalbazaar": "^2.6.1",
"eslint-plugin-jsdoc": "^32.2.0",
"did-veres-one": "~16.0.0",
"eslint": "^9.8.0",
"eslint-config-digitalbazaar": "^5.2.0",
"eslint-plugin-jsdoc": ">=42.0.0",
"karma": "^6.1.1",
"karma-babel-preprocessor": "^8.0.1",
"karma-chai": "^0.1.0",
Expand All @@ -46,7 +46,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^5.0.0",
"mocha": "^8.3.1",
"mocha": "10.1.0",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.1.0",
"uuid": "^8.3.2",
Expand Down