@digitalbazaar/vc 2.0.0 → 4.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.0.0",
3
+ "version": "4.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,102 +0,0 @@
1
- # @digitalbazaar/vc ChangeLog
2
-
3
- ## 2.0.0 - 2021-10-20
4
-
5
- ### Changed
6
- - Fix validation of `credentialSubject.id`, `issuer` and `evidence` --
7
- if it's not a URI, reject the credential.
8
- - **BREAKING**: No longer pass in custom parameters to `issue()`.
9
-
10
- ### Added
11
- - If `issuanceDate` is not set, default to `now()` on issuing.
12
-
13
- ## 1.0.0 - 2021-04-22
14
-
15
- ### Changed
16
- - **BREAKING**: Rename library to `@digitalbazaar/vc`.
17
- - Update dependencies.
18
-
19
- ### Removed
20
- - **BREAKING**: Remove typescript def generation support.
21
- - **BREAKING**: No longer shipping browser bundles.
22
- - **BREAKING**: Move binaries from `bin/` to `@digitalbazaar/vc-js-cli`.
23
-
24
- ## 0.6.4 - 2020-05-22
25
-
26
- ### Added
27
- - The results from verifying a presentation now includes `credentialId` which
28
- makes it possible to correlate success/failure messages with credentials.
29
-
30
- ## 0.6.3 - 2020-05-14
31
-
32
- ### Fixed
33
- - Improve error reporting when `suite` parameter is missing.
34
-
35
- ## 0.6.2 - 2020-05-04
36
-
37
- ### Fixed
38
- - Accept string value for a single VP context.
39
-
40
- ## 0.6.1 - 2020-05-01
41
-
42
- ### Fixed
43
- - Fix reporting of `credentialResults` in `verify` output.
44
-
45
- ## 0.6.0 - 2020-04-29
46
-
47
- ### Added
48
- - Add `checkStatus` option. This is a function that can be passed that
49
- will be executed when a VC has a `credentialStatus` attribute.
50
-
51
- ## 0.5.0 - 2020-03-26
52
-
53
- ### Changed
54
- - `verifiableCredential` param is now optional in `createPresentation()`.
55
- - **BREAKING**: `verify()` now only verifies presentations, not credentials,
56
- (since that will be the most common use case). For credentials, a separate
57
- `verifyCredential()` method has been added.
58
- - **BREAKING**: Rename `verify()`'s `purpose` parameter to
59
- `presentationPurpose`.
60
-
61
- ## 0.4.1 - 2020-02-20
62
-
63
- ### Changed
64
- - Multiple types for a VerifiableCredential no longer required (fix).
65
- - Multiple `@context`s for a VC no longer required (fix).
66
-
67
- ## 0.4.0 - 2020-02-14
68
-
69
- ### Changed
70
- - **BREAKING**: For VerifiablePresentations, break the async
71
- `createPresentation()` API into two separate calls:
72
- a **sync** `createPresentation()` and an async `signPresentation()`.
73
- - **BREAKING**: Change default proof purpose for VerifiablePresentations
74
- from `assertionMethod` to `authentication`.
75
- - **BREAKING**: A `challenge` param is required when verifying a VP.
76
-
77
- ### Added
78
- - Add support for optionally verifying unsigned presentations.
79
-
80
- ## 0.3.0 - 2020-01-28
81
-
82
- ### Changed
83
- - Update docs.
84
- - Evidence IDs are now optional.
85
- - Update webpack build.
86
- - Cleanups.
87
- - Use `credentials-context` package.
88
- - Update dependencies.
89
- - **BREAKING**: Add further checks for controller, suite and assertionMethod
90
-
91
- ### Removed
92
- - **BREAKING**: Node.js v6 support.
93
-
94
- ## 0.2.0 - 2019-08-07
95
-
96
- ### Added
97
- - Export `defaultDocumentLoader` in main vc.js.
98
-
99
- ## 0.1.0 - 2019-08-07
100
-
101
- ### Added
102
- - Initial version. See git history for changes.