@digitalbazaar/vc 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalbazaar/vc",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Verifiable Credentials JavaScript library.",
5
5
  "homepage": "https://github.com/digitalbazaar/vc-js",
6
6
  "author": {
@@ -22,64 +22,50 @@
22
22
  "email": "support@digitalbazaar.com"
23
23
  },
24
24
  "license": "BSD-3-Clause",
25
- "main": "lib/index.js",
25
+ "type": "module",
26
+ "exports": "./lib/index.js",
26
27
  "files": [
27
28
  "lib/**/*.js"
28
29
  ],
29
30
  "dependencies": {
30
31
  "credentials-context": "^2.0.0",
31
- "jsonld": "^5.2.0",
32
- "jsonld-signatures": "^9.3.0"
32
+ "jsonld": "^6.0.0",
33
+ "jsonld-signatures": "^10.0.0"
33
34
  },
34
35
  "devDependencies": {
35
- "@babel/core": "^7.13.8",
36
- "@babel/plugin-transform-modules-commonjs": "^7.13.8",
37
- "@babel/plugin-transform-runtime": "^7.13.9",
38
- "@babel/preset-env": "^7.13.9",
39
- "@babel/runtime": "^7.13.9",
40
- "@digitalbazaar/ed25519-signature-2018": "^2.0.1",
41
- "@digitalbazaar/ed25519-signature-2020": "^3.0.0",
42
- "@digitalbazaar/ed25519-verification-key-2018": "^3.1.1",
43
- "@digitalbazaar/ed25519-verification-key-2020": "^3.1.0",
44
- "babel-loader": "^8.2.2",
45
- "chai": "^4.3.3",
36
+ "@digitalbazaar/ed25519-signature-2018": "^3.0.0",
37
+ "@digitalbazaar/ed25519-verification-key-2018": "^4.0.0",
38
+ "c8": "^7.11.3",
39
+ "chai": "^4.3.6",
46
40
  "cross-env": "^7.0.3",
47
41
  "did-context": "^3.1.1",
48
- "did-veres-one": "^13.0.0",
49
- "eslint": "^7.21.0",
50
- "eslint-config-digitalbazaar": "^2.6.1",
51
- "eslint-plugin-jsdoc": "^32.2.0",
52
- "karma": "^6.1.1",
53
- "karma-babel-preprocessor": "^8.0.1",
42
+ "did-veres-one": "^15.0.0",
43
+ "eslint": "^8.17.0",
44
+ "eslint-config-digitalbazaar": "^3.0.0",
45
+ "eslint-plugin-jsdoc": "^39.3.2",
46
+ "eslint-plugin-unicorn": "^42.0.0",
47
+ "karma": "^6.4.0",
54
48
  "karma-chai": "^0.1.0",
55
- "karma-chrome-launcher": "^3.1.0",
49
+ "karma-chrome-launcher": "^3.1.1",
56
50
  "karma-mocha": "^2.0.1",
57
51
  "karma-mocha-reporter": "^2.2.5",
58
52
  "karma-sourcemap-loader": "^0.3.8",
59
53
  "karma-webpack": "^5.0.0",
60
- "mocha": "^8.3.1",
54
+ "mocha": "^10.0.0",
61
55
  "mocha-lcov-reporter": "^1.3.0",
62
- "nyc": "^15.1.0",
63
56
  "uuid": "^8.3.2",
64
57
  "veres-one-context": "^12.0.0",
65
- "webpack": "^5.24.3"
58
+ "webpack": "^5.73.0"
66
59
  },
67
- "nyc": {
68
- "exclude": [
69
- "test"
70
- ],
60
+ "c8": {
71
61
  "reporter": [
72
- "html",
73
- "text-summary"
62
+ "lcov",
63
+ "text-summary",
64
+ "text"
74
65
  ]
75
66
  },
76
- "browser": {
77
- "Buffer": false,
78
- "crypto": false,
79
- "util": false
80
- },
81
67
  "engines": {
82
- "node": ">=12"
68
+ "node": ">=14"
83
69
  },
84
70
  "keywords": [
85
71
  "JSON",
@@ -91,12 +77,12 @@
91
77
  "Credential"
92
78
  ],
93
79
  "scripts": {
94
- "test": "npm run lint && npm run test-node && npm run test-karma",
80
+ "test": "npm run test-node",
95
81
  "test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 10000 test/*.spec.js",
96
- "test-karma": "karma start karma.conf.js",
97
- "lint": "eslint lib test/*.spec.js",
98
- "coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm run test-node",
99
- "coverage-ci": "cross-env NODE_ENV=test nyc --reporter=lcovonly npm run test-node",
100
- "coverage-report": "nyc report"
82
+ "test-karma": "karma start karma.conf.cjs",
83
+ "lint": "eslint .",
84
+ "coverage": "cross-env NODE_ENV=test c8 npm run test-node",
85
+ "coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node",
86
+ "coverage-report": "c8 report"
101
87
  }
102
88
  }
package/CHANGELOG.md DELETED
@@ -1,107 +0,0 @@
1
- # @digitalbazaar/vc ChangeLog
2
-
3
- ## 2.1.0 - 2021-12-20
4
-
5
- ### Changed
6
- - Sync VC example context from vc-data-model spec source.
7
-
8
- ## 2.0.0 - 2021-10-20
9
-
10
- ### Changed
11
- - Fix validation of `credentialSubject.id`, `issuer` and `evidence` --
12
- if it's not a URI, reject the credential.
13
- - **BREAKING**: No longer pass in custom parameters to `issue()`.
14
-
15
- ### Added
16
- - If `issuanceDate` is not set, default to `now()` on issuing.
17
-
18
- ## 1.0.0 - 2021-04-22
19
-
20
- ### Changed
21
- - **BREAKING**: Rename library to `@digitalbazaar/vc`.
22
- - Update dependencies.
23
-
24
- ### Removed
25
- - **BREAKING**: Remove typescript def generation support.
26
- - **BREAKING**: No longer shipping browser bundles.
27
- - **BREAKING**: Move binaries from `bin/` to `@digitalbazaar/vc-js-cli`.
28
-
29
- ## 0.6.4 - 2020-05-22
30
-
31
- ### Added
32
- - The results from verifying a presentation now includes `credentialId` which
33
- makes it possible to correlate success/failure messages with credentials.
34
-
35
- ## 0.6.3 - 2020-05-14
36
-
37
- ### Fixed
38
- - Improve error reporting when `suite` parameter is missing.
39
-
40
- ## 0.6.2 - 2020-05-04
41
-
42
- ### Fixed
43
- - Accept string value for a single VP context.
44
-
45
- ## 0.6.1 - 2020-05-01
46
-
47
- ### Fixed
48
- - Fix reporting of `credentialResults` in `verify` output.
49
-
50
- ## 0.6.0 - 2020-04-29
51
-
52
- ### Added
53
- - Add `checkStatus` option. This is a function that can be passed that
54
- will be executed when a VC has a `credentialStatus` attribute.
55
-
56
- ## 0.5.0 - 2020-03-26
57
-
58
- ### Changed
59
- - `verifiableCredential` param is now optional in `createPresentation()`.
60
- - **BREAKING**: `verify()` now only verifies presentations, not credentials,
61
- (since that will be the most common use case). For credentials, a separate
62
- `verifyCredential()` method has been added.
63
- - **BREAKING**: Rename `verify()`'s `purpose` parameter to
64
- `presentationPurpose`.
65
-
66
- ## 0.4.1 - 2020-02-20
67
-
68
- ### Changed
69
- - Multiple types for a VerifiableCredential no longer required (fix).
70
- - Multiple `@context`s for a VC no longer required (fix).
71
-
72
- ## 0.4.0 - 2020-02-14
73
-
74
- ### Changed
75
- - **BREAKING**: For VerifiablePresentations, break the async
76
- `createPresentation()` API into two separate calls:
77
- a **sync** `createPresentation()` and an async `signPresentation()`.
78
- - **BREAKING**: Change default proof purpose for VerifiablePresentations
79
- from `assertionMethod` to `authentication`.
80
- - **BREAKING**: A `challenge` param is required when verifying a VP.
81
-
82
- ### Added
83
- - Add support for optionally verifying unsigned presentations.
84
-
85
- ## 0.3.0 - 2020-01-28
86
-
87
- ### Changed
88
- - Update docs.
89
- - Evidence IDs are now optional.
90
- - Update webpack build.
91
- - Cleanups.
92
- - Use `credentials-context` package.
93
- - Update dependencies.
94
- - **BREAKING**: Add further checks for controller, suite and assertionMethod
95
-
96
- ### Removed
97
- - **BREAKING**: Node.js v6 support.
98
-
99
- ## 0.2.0 - 2019-08-07
100
-
101
- ### Added
102
- - Export `defaultDocumentLoader` in main vc.js.
103
-
104
- ## 0.1.0 - 2019-08-07
105
-
106
- ### Added
107
- - Initial version. See git history for changes.