Skip to content
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
34 changes: 17 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run test with Node.js ${{ matrix.node-version }}
run: npm run pretest; npm run test-node; npm run posttest
# test-karma:
# needs: [lint]
# runs-on: ubuntu-latest
# timeout-minutes: 10
# strategy:
# matrix:
# node-version: [16.x]
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm install
# - name: Run karma test
# run: npm run pretest; npm run test-karma; npm run posttest
run: npm run test-node
test-karma:
needs: [lint]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run karma test
run: npm run test-karma
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# @digitalcredentials/vc ChangeLog

## 9.0.0 - 2024-09-30
## 10.0.0 - 2025-04-30

### Changed
- **BREAKING**: Removes CJS build

### Fixed
- move status check before expiry check because expiry check throws error that had prevented the status check from running
- attach the credential to the verification result for each credential submitted as part of a VP verification

## 9.0.1 - 2024-09-30

### Fixed
- add signature checks to the log before running other verification checks whose errors might prevent that logging
Expand Down
18 changes: 0 additions & 18 deletions build-dist.sh

This file was deleted.

8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,6 @@ async function _verifyCredential(options = {}) {
log.push({id: 'valid_signature', valid: true});
log.push({id: 'issuer_did_resolves', valid: true});

// run common credential checks (add check results to log)
_checkCredential({credential, log, now});

// if credential status is provided, a `checkStatus` function must be given
if(credential.credentialStatus && typeof checkStatus !== 'function') {
throw new TypeError(
Expand All @@ -368,6 +365,10 @@ async function _verifyCredential(options = {}) {
if(credential.credentialStatus) {
await addStatusInfoToLog({options, result, log});
}

// run common credential checks (add check results to log)
_checkCredential({credential, log, now});

result.log = log;
if(result.results) {
result.results[0].log = log;
Expand Down Expand Up @@ -549,6 +550,7 @@ async function _verifyPresentation(options = {}) {

for(const [i, credentialResult] of credentialResults.entries()) {
credentialResult.credentialId = credentials[i].id;
credentialResult.credential = credentials[i];
}

const allCredentialsVerified = credentialResults.every(r => r.verified);
Expand Down
28 changes: 5 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
{
"name": "@digitalcredentials/vc",
"version": "9.0.1",
"version": "10.0.0",
"description": "Verifiable Credentials JavaScript library.",
"homepage": "https://github.com/digitalcredentials/vc",
"repository": {
"type": "git",
"url": "https://github.com/digitalcredentials/vc"
},
"license": "BSD-3-Clause",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/esm/index.js"
},
"./package.json": "./package.json"
},
"type": "module",
"exports": "./lib/index.js",
"files": [
"dist",
"lib",
"rollup.config.js",
"build-dist.sh",
"README.md",
"LICENSE"
],
"dependencies": {
"@digitalcredentials/credentials-v2-context": "~0.0.1-beta.0",
"@digitalcredentials/credentials-v2-context": "^0.0.1-beta.0",
"@digitalcredentials/jsonld": "^9.0.0",
"@digitalcredentials/jsonld-signatures": "^12.0.0",
"@digitalcredentials/jsonld-signatures": "^12.0.1",
"@digitalcredentials/open-badges-context": "^2.1.0",
"credentials-context": "^2.0.0",
"ed25519-signature-2018-context": "^1.1.0"
Expand Down Expand Up @@ -64,7 +54,6 @@
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"rollup": "^2.77.2",
"uuid": "^9.0.0",
"veres-one-context": "^12.0.0",
"webpack": "^5.75.0"
Expand Down Expand Up @@ -96,13 +85,6 @@
"Credential"
],
"scripts": {
"rollup": "rollup -c rollup.config.js",
"build": "npm run clear && npm run rollup && ./build-dist.sh",
"clear": "rimraf dist/ && mkdir dist",
"posttest": "node post-test.js",
"prepare": "npm run build",
"pretest": "node pre-test.js",
"rebuild": "npm run clear && npm run build",
"test": "npm run test-node",
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 10000 test/*.spec.js",
"test-karma": "karma start karma.conf.cjs",
Expand Down
11 changes: 0 additions & 11 deletions post-test.js

This file was deleted.

11 changes: 0 additions & 11 deletions pre-test.js

This file was deleted.

14 changes: 0 additions & 14 deletions rollup.config.js

This file was deleted.