diff --git a/CHANGELOG.md b/CHANGELOG.md index a3435f50..6bb988ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/CredentialIssuancePurpose.js b/lib/CredentialIssuancePurpose.js index 5c9650b1..e366de0a 100644 --- a/lib/CredentialIssuancePurpose.js +++ b/lib/CredentialIssuancePurpose.js @@ -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. */ @@ -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 @@ -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}; } diff --git a/lib/index.js b/lib/index.js index 7cf5e177..f7e844d3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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'); diff --git a/package.json b/package.json index e902b08d..37bb5526 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "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", @@ -13,9 +13,9 @@ "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" @@ -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", @@ -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",