From 59922c45c27a65446fd514ccba40a170ccb9ccf5 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Tue, 22 Aug 2023 19:52:35 +0100 Subject: [PATCH 1/5] test: update github pipelines (#77) --- .github/workflows/ci.yml | 19 +++++++++--- .releaserc.yml | 7 +++-- .../tests/sdk/src/SdkAgentWorkflow.ts | 25 +++++++-------- package-lock.json | 31 +++++++++++++++++++ package.json | 25 ++++++++++++++- 5 files changed, 87 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04ab4af23..4ec532a2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ concurrency: cancel-in-progress: true on: pull_request: - push: branches: - "master" @@ -40,7 +39,19 @@ jobs: - name: Build run: npm run build - - name: Publish coverage - uses: ArtiomTr/jest-coverage-report-action@v2 + - name: Run coverage test + run: npm run coverage + + - name: Jest Coverage Comment + uses: MishaKav/jest-coverage-comment@v1.0.23 + with: + coverage-summary-path: coverage/coverage-summary.json + junitxml-path: coverage/junit.xml + junitxml-title: JUnit + + - name: Publish lcov report + uses: actions/upload-artifact@v3 with: - threshold: 30 + name: lcov-report.zip + path: coverage/lcov-report + if-no-files-found: error diff --git a/.releaserc.yml b/.releaserc.yml index 3532dc9ac..90433edf1 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -30,9 +30,12 @@ plugins: 'package.json', 'package-lock.json', 'CHANGELOG.md', - 'integration-tests/e2e-tests/**/*' + 'integration-tests/e2e-tests/package.json', + 'integration-tests/e2e-tests/yarn.lock' ], - message: 'chore(release): release ${nextRelease.version}\n\n${nextRelease.notes}' + message: 'chore(release): release ${nextRelease.version} + + ${nextRelease.notes}' } ] - [ "semantic-release-slack-bot", diff --git a/integration-tests/e2e-tests/tests/sdk/src/SdkAgentWorkflow.ts b/integration-tests/e2e-tests/tests/sdk/src/SdkAgentWorkflow.ts index 6124846ba..05b93a93a 100644 --- a/integration-tests/e2e-tests/tests/sdk/src/SdkAgentWorkflow.ts +++ b/integration-tests/e2e-tests/tests/sdk/src/SdkAgentWorkflow.ts @@ -101,20 +101,20 @@ export class SdkAgentWorkflow { static async verifyNewCredential(edgeAgent: Actor) { await edgeAgent.attemptsTo( Wait.upTo(Duration.ofSeconds(30)) - .until( - Questions.getArraySize('credential offer stack',this.credentialOfferStack), - equals(1) - ) + .until( + Questions.getArraySize('credential offer stack',this.credentialOfferStack), + equals(1) + ) ) } static async waitToReceiveIssuedCredential(edgeAgent: Actor) { await edgeAgent.attemptsTo( Wait.upTo(Duration.ofSeconds(30)) - .until( - Questions.getArraySize('issued credential stack',this.issuedCredentialStack), - equals(1) - ) + .until( + Questions.getArraySize('issued credential stack',this.issuedCredentialStack), + equals(1) + ) ) } @@ -137,10 +137,10 @@ export class SdkAgentWorkflow { static async waitForProofRequest(edgeAgent: Actor) { await edgeAgent.attemptsTo( Wait.upTo(Duration.ofSeconds(30)) - .until( - Questions.getArraySize('proof of request stack', this.proofRequestStack), - equals(1) - ) + .until( + Questions.getArraySize('proof of request stack', this.proofRequestStack), + equals(1) + ) ) } @@ -159,5 +159,4 @@ export class SdkAgentWorkflow { static async stop() { await this.edgeAgent.stop() } - } diff --git a/package-lock.json b/package-lock.json index bd1b53c24..203154436 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,6 +98,7 @@ "html-webpack-plugin": "^5.5.0", "inversify": "^6.0.1", "jest": "^29.5.0", + "jest-junit": "^16.0.0", "json-loader": "^0.5.7", "mini-css-extract-plugin": "^2.7.3", "path-browserify": "^1.0.1", @@ -15285,6 +15286,30 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/jest-junit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", + "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "strip-ansi": "^6.0.1", + "uuid": "^8.3.2", + "xml": "^1.0.1" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/jest-junit/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/jest-leak-detector": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", @@ -30139,6 +30164,12 @@ } } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "dev": true + }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/package.json b/package.json index 7792c3b8f..3ef4ddfbb 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "html-webpack-plugin": "^5.5.0", "inversify": "^6.0.1", "jest": "^29.5.0", + "jest-junit": "^16.0.0", "json-loader": "^0.5.7", "mini-css-extract-plugin": "^2.7.3", "path-browserify": "^1.0.1", @@ -139,7 +140,29 @@ "moduleFileExtensions": [ "js", "ts" - ] + ], + "coverageReporters": [ + "json-summary", + "lcov", + "text" + ], + "reporters": [ + "default", + "jest-junit" + ], + "coverageThreshold": { + "global": { + "branches": 22, + "functions": 33, + "lines": 34, + "statements": 34 + } + }, + "coverageDirectory": "coverage" + }, + "jest-junit": { + "outputDirectory": "coverage", + "outputName": "junit.xml" }, "dependencies": { "@scure/bip32": "^1.3.0", From 99bea4b3279d50fe82f0e090c9452a8dcd810347 Mon Sep 17 00:00:00 2001 From: atala-dev Date: Wed, 23 Aug 2023 14:03:28 +0000 Subject: [PATCH 2/5] chore(release): release 2.2.0 # [2.2.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.1.0...v2.2.0) (2023-08-23) ### Bug Fixes * **Pluto:** encoding / decoding PrivateKeys ([#78](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/78)) ([b9133ac](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/b9133acbcb9cbd883fffec05feb58ecbe24600fc)) ### Features * **Castor:** extending createPrismDID to accept a KeyPair or PublicKey ([#70](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/70)) ([d06871c](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/d06871caadaf1b1f43cedfb1390ea58558b3fce8)) * **Demo:** Update Mediator DID for demo apps ([#73](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/73)) ([7f3c98e](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/7f3c98ec77d2cd8cf862d91515c139ff76270f03)) --- CHANGELOG.md | 13 +++++++++++++ integration-tests/e2e-tests/package.json | 2 +- integration-tests/e2e-tests/yarn.lock | 8 ++++---- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9160a57e1..07ca3890d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# [2.2.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.1.0...v2.2.0) (2023-08-23) + + +### Bug Fixes + +* **Pluto:** encoding / decoding PrivateKeys ([#78](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/78)) ([b9133ac](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/b9133acbcb9cbd883fffec05feb58ecbe24600fc)) + + +### Features + +* **Castor:** extending createPrismDID to accept a KeyPair or PublicKey ([#70](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/70)) ([d06871c](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/d06871caadaf1b1f43cedfb1390ea58558b3fce8)) +* **Demo:** Update Mediator DID for demo apps ([#73](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/73)) ([7f3c98e](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/7f3c98ec77d2cd8cf862d91515c139ff76270f03)) + # [2.1.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.0.3...v2.1.0) (2023-08-17) diff --git a/integration-tests/e2e-tests/package.json b/integration-tests/e2e-tests/package.json index fff47faff..76a2de6e7 100644 --- a/integration-tests/e2e-tests/package.json +++ b/integration-tests/e2e-tests/package.json @@ -22,7 +22,7 @@ "homepage": "https://github.com/amagyar-iohk/atala-prism-wallet-sdk-ts-e2e#readme", "dependencies": { "@cucumber/cucumber": "^9.3.0", - "@input-output-hk/atala-prism-wallet-sdk": "^2.1.0", + "@input-output-hk/atala-prism-wallet-sdk": "^2.2.0", "@input-output-hk/prism-typescript-client": "^1.9.2", "@serenity-js/assertions": "^3.8.0", "@serenity-js/console-reporter": "^3.8.0", diff --git a/integration-tests/e2e-tests/yarn.lock b/integration-tests/e2e-tests/yarn.lock index 1222c1e0f..4fdfb67ba 100644 --- a/integration-tests/e2e-tests/yarn.lock +++ b/integration-tests/e2e-tests/yarn.lock @@ -276,10 +276,10 @@ resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@input-output-hk/atala-prism-wallet-sdk@^2.1.0": - version "2.1.0" - resolved "https://npm.pkg.github.com/download/@input-output-hk/atala-prism-wallet-sdk/2.1.0/ab28d233ce7ce1d132e8cca21e667fd9a5cfb499#ab28d233ce7ce1d132e8cca21e667fd9a5cfb499" - integrity sha512-JDfeN5g33ko/eTbDi745mRpMz8cwo82cWF8Rr9PVMNmOwE/rShfI1dsj7gj8DFSc0g/Q5f9Sd0bPigxTnrz2NQ== +"@input-output-hk/atala-prism-wallet-sdk@^2.2.0": + version "2.2.0" + resolved "https://npm.pkg.github.com/download/@input-output-hk/atala-prism-wallet-sdk/2.2.0/8d11547c7fc1f498cd6d64503611d3c7c2ee53c1#8d11547c7fc1f498cd6d64503611d3c7c2ee53c1" + integrity sha512-kKMSBkiKF48PBmYro/054FyZgPzAf/7stzMQnr0Hbe33TTclkRnpCOVXbe5XWXwHKClSm3kVo+H0F4t7NjVhBw== dependencies: "@scure/bip32" "^1.3.0" "@scure/bip39" "^1.1.1" diff --git a/package-lock.json b/package-lock.json index 203154436..9b883eb99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.1.0", + "version": "2.2.0", "dependencies": { "@scure/bip32": "^1.3.0", "@scure/bip39": "^1.1.1", diff --git a/package.json b/package.json index 3ef4ddfbb..a3bbdd3ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.1.0", + "version": "2.2.0", "description": "PRISM typescript SDK", "main": "build/node/index.js", "browser": "build/browser/index.js", From 3dda29d13efd2c44f9d87ffa1ab3c7467e5a8088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Rib=C3=B3?= Date: Thu, 24 Aug 2023 12:42:44 +0200 Subject: [PATCH 3/5] fix(docs): Add static reference to the docs. (#82) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ac95ab08..1a3144e8a 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,4 @@ To run Node.js demo app, run `npm run dev:node` to build the demo app and then r 2. To see how the step by steps examples can guide you refer to each section inside docs folder, Apollo, Castor, Pollux, Mercury, Pluto, Agent -3. Jump straight into the [SDK-REFERENCE](modules.html) +3. Jump straight into the [SDK-REFERENCE](https://input-output-hk.github.io/atala-prism-wallet-sdk-ts/modules.html) From 1972a9e708bbad5a2d39fcd5763f46bba5313d1a Mon Sep 17 00:00:00 2001 From: Curtis Date: Fri, 25 Aug 2023 15:08:54 +0100 Subject: [PATCH 4/5] feat(Mercury): adding return_route: all to didcomm Message (#80) --- src/mercury/didcomm/Wrapper.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mercury/didcomm/Wrapper.ts b/src/mercury/didcomm/Wrapper.ts index 13a57a7ec..e99639ac4 100644 --- a/src/mercury/didcomm/Wrapper.ts +++ b/src/mercury/didcomm/Wrapper.ts @@ -84,10 +84,9 @@ export class DIDCommWrapper implements DIDCommProtocol { //expires_time: Number(message.expiresTimePlus), thid: message.thid, pthid: message.pthid, - //TODO: Remove comment once fixed by rootsID or we are sure this works, - //if not message is not correctly formatted - //return_route: "all", + return_route: "all", }); + const [encryptedMsg] = await didcommMsg.pack_encrypted( to, fromDid ? fromDid.toString() : null, From afcb0b4556fc8392dfdc5c3a52c4ef7044d900bb Mon Sep 17 00:00:00 2001 From: atala-dev Date: Mon, 28 Aug 2023 11:38:42 +0000 Subject: [PATCH 5/5] chore(release): release 2.3.0 # [2.3.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.2.0...v2.3.0) (2023-08-28) ### Bug Fixes * **docs:** Add static reference to the docs. ([#82](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/82)) ([3dda29d](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/3dda29d13efd2c44f9d87ffa1ab3c7467e5a8088)) ### Features * **Mercury:** adding return_route: all to didcomm Message ([#80](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/80)) ([1972a9e](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/1972a9e708bbad5a2d39fcd5763f46bba5313d1a)) --- CHANGELOG.md | 12 ++++++++++++ integration-tests/e2e-tests/package.json | 2 +- integration-tests/e2e-tests/yarn.lock | 8 ++++---- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ca3890d..ed3e9ea49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [2.3.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.2.0...v2.3.0) (2023-08-28) + + +### Bug Fixes + +* **docs:** Add static reference to the docs. ([#82](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/82)) ([3dda29d](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/3dda29d13efd2c44f9d87ffa1ab3c7467e5a8088)) + + +### Features + +* **Mercury:** adding return_route: all to didcomm Message ([#80](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/80)) ([1972a9e](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/1972a9e708bbad5a2d39fcd5763f46bba5313d1a)) + # [2.2.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.1.0...v2.2.0) (2023-08-23) diff --git a/integration-tests/e2e-tests/package.json b/integration-tests/e2e-tests/package.json index 76a2de6e7..ed64166f6 100644 --- a/integration-tests/e2e-tests/package.json +++ b/integration-tests/e2e-tests/package.json @@ -22,7 +22,7 @@ "homepage": "https://github.com/amagyar-iohk/atala-prism-wallet-sdk-ts-e2e#readme", "dependencies": { "@cucumber/cucumber": "^9.3.0", - "@input-output-hk/atala-prism-wallet-sdk": "^2.2.0", + "@input-output-hk/atala-prism-wallet-sdk": "^2.3.0", "@input-output-hk/prism-typescript-client": "^1.9.2", "@serenity-js/assertions": "^3.8.0", "@serenity-js/console-reporter": "^3.8.0", diff --git a/integration-tests/e2e-tests/yarn.lock b/integration-tests/e2e-tests/yarn.lock index 4fdfb67ba..0094b0397 100644 --- a/integration-tests/e2e-tests/yarn.lock +++ b/integration-tests/e2e-tests/yarn.lock @@ -276,10 +276,10 @@ resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@input-output-hk/atala-prism-wallet-sdk@^2.2.0": - version "2.2.0" - resolved "https://npm.pkg.github.com/download/@input-output-hk/atala-prism-wallet-sdk/2.2.0/8d11547c7fc1f498cd6d64503611d3c7c2ee53c1#8d11547c7fc1f498cd6d64503611d3c7c2ee53c1" - integrity sha512-kKMSBkiKF48PBmYro/054FyZgPzAf/7stzMQnr0Hbe33TTclkRnpCOVXbe5XWXwHKClSm3kVo+H0F4t7NjVhBw== +"@input-output-hk/atala-prism-wallet-sdk@^2.3.0": + version "2.3.0" + resolved "https://npm.pkg.github.com/download/@input-output-hk/atala-prism-wallet-sdk/2.3.0/5c3e5551a31a6b57589558819d8f31404ad2264d#5c3e5551a31a6b57589558819d8f31404ad2264d" + integrity sha512-uq8Kmu0bSa5SJT2S2EDV4Wiv6bmw2KgVUS1NTDzNGNumZfOIJ2xBFfHOc4t9rcMmvVkI5LWauEVzsnvtb384Mg== dependencies: "@scure/bip32" "^1.3.0" "@scure/bip39" "^1.1.1" diff --git a/package-lock.json b/package-lock.json index 9b883eb99..faa649fd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.2.0", + "version": "2.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.2.0", + "version": "2.3.0", "dependencies": { "@scure/bip32": "^1.3.0", "@scure/bip39": "^1.1.1", diff --git a/package.json b/package.json index a3bbdd3ce..d9af5abb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@input-output-hk/atala-prism-wallet-sdk", - "version": "2.2.0", + "version": "2.3.0", "description": "PRISM typescript SDK", "main": "build/node/index.js", "browser": "build/browser/index.js",