Skip to content

Commit

Permalink
fix(deps): bump did-jwt to v6 & did-resolver to 3.2.2 (#50)
Browse files Browse the repository at this point in the history
* fix(deps): bump did-jwt and did-resolver

* chore(ci): groom workflow scripts
  • Loading branch information
mirceanis authored Jun 8, 2022
1 parent b584349 commit 4c10524
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 70 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,22 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache
- name: "Setup node with cache"
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
node-version: 14
cache: 'yarn'

- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run test:ci
- run: yarn run lint

- name: setup git coordinates
- name: "Setup git coordinates"
run: |
git config user.name ${{secrets.GH_USER}}
git config user.email ${{secrets.GH_EMAIL}}
- name: Run semantic-release
- name: "Run semantic-release"
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: Build and Test NODE
on: [pull_request, workflow_dispatch]
on: [ pull_request, workflow_dispatch, push ]
jobs:
build-test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache
- name: "Setup node with cache"
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
node-version: 14
cache: 'yarn'

- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run lint
- run: yarn run test:ci

- name: "Upload coverage reports"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@
"description": "credential status aggregator for did-jwt",
"type": "module",
"source": "src/index.ts",
"main": "lib/index.cjs",
"module": "lib/index.module.js",
"unpkg": "lib/index.umd.js",
"types": "lib/index.d.ts",
"umd:main": "lib/index.umd.js",
"main": "./lib/index.cjs",
"module": "./lib/index.module.js",
"unpkg": "./lib/index.umd.js",
"types": "./lib/index.d.ts",
"umd:main": "./lib/index.umd.js",
"files": [
"lib",
"src",
"LICENSE"
],
"exports": {
".": {
"require": "lib/index.cjs",
"import": "lib/index.module.js"
"require": "./lib/index.cjs",
"import": "./lib/index.module.js"
}
},
"scripts": {
"build": "microbundle --compress=false",
"test": "jest",
"test:ci": "jest --coverage && codecov",
"test:ci": "jest --coverage",
"dev": "tsc --watch",
"format": "prettier --write \"src/**/*.[jt]s\"",
"lint": "eslint --ignore-pattern \"src/**/*.test.[jt]s\" \"src/**/*.[jt]s\"",
"prepublishOnly": "npm test && npm run lint",
"prepublishOnly": "yarn test && yarn format && yarn lint",
"release": "semantic-release --debug"
},
"repository": "git@github.com:uport-project/credential-status.git",
Expand Down Expand Up @@ -59,13 +64,8 @@
"semantic-release": "19.0.2",
"typescript": "4.5.4"
},
"files": [
"lib/*",
"src/*",
"LICENSE"
],
"dependencies": {
"did-jwt": "^5.12.3",
"did-resolver": "^3.1.5"
"did-jwt": "^6.1.2",
"did-resolver": "^3.2.2"
}
}
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"devDependencies"
],
"groupName": "devDeps",
"schedule": [
"before 5am on Monday"
"extends": [
"schedule:earlyMondays"
]
}
]
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { CredentialJwtOrJSON, Status, StatusMethod, StatusResolver } from '../index'

import { DIDDocument } from 'did-resolver'
import { ES256KSigner, createJWT } from 'did-jwt'
import { ES256KSigner, createJWT, hexToBytes } from 'did-jwt'

const privateKey = 'a285ab66393c5fdda46d6fbad9e27fafd438254ab72ad5acb681a0e9f20f5d7b'
const signerAddress = '0x2036c6cd85692f0fb2c26e6c6b2eced9e4478dfd'
const issuer = `did:ethr:${signerAddress}`
const signer = ES256KSigner(privateKey)
const signer = ES256KSigner(hexToBytes(privateKey))

const referenceDoc = {
'@context': 'https://w3id.org/did/v1',
Expand Down
44 changes: 22 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1975,10 +1975,10 @@
resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36"
integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==

"@stablelib/x25519@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.1.tgz#bcd6132ac4dd94f28f1479e228c85b3468d6ed27"
integrity sha512-nmyUI2ZArxYDh1PhdoSCPEtlTYE0DYugp2qqx8OtjrX3Hmh7boIlDsD0X71ihAxzxqJf3TyQqN/p58ToWhnp+Q==
"@stablelib/x25519@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.2.tgz#ae21e2ab668076ec2eb2b4853b82a27fab045fa1"
integrity sha512-wTR0t0Bp1HABLFRbYaE3vFLuco2QbAg6QvxBnzi5j9qjhYezWHW7OiCZyaWbt25UkSaoolUUT4Il0nS/2vcbSw==
dependencies:
"@stablelib/keyagreement" "^1.0.1"
"@stablelib/random" "^1.0.1"
Expand Down Expand Up @@ -2817,7 +2817,7 @@ caniuse-lite@^1.0.30001332:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz#59590c8ffa8b5939cf4161f00827b8873ad72498"
integrity sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA==

canonicalize@^1.0.5:
canonicalize@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.8.tgz#24d1f1a00ed202faafd9bf8e63352cd4450c6df1"
integrity sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==
Expand Down Expand Up @@ -3332,28 +3332,28 @@ dezalgo@^1.0.0:
asap "^2.0.0"
wrappy "1"

did-jwt@^5.12.3:
version "5.12.3"
resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-5.12.3.tgz#f4961b3d3e8f0b69c2bea08809df5e49ec3daa1d"
integrity sha512-/aENag1/Mu4eCwMD62X/ZOV63hkXqpRxyriJP1z/8qL44ZpdwBvvL00so+YtDcTk/xHm3t0OEe6ATvvjNYPMCA==
did-jwt@^6.1.2:
version "6.1.2"
resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-6.1.2.tgz#adef6c3264ae4bcecac5d2cab5de8f3a3024ca03"
integrity sha512-OkXsk5zUi2uwSWh2WiaGCLEPKon9HDfMT3mmUp0r7jFgyNWiEFTP9oCLYJq/SaVkKRZsImehrnd0+Ku9ivUvsw==
dependencies:
"@stablelib/ed25519" "^1.0.2"
"@stablelib/random" "^1.0.1"
"@stablelib/sha256" "^1.0.1"
"@stablelib/x25519" "^1.0.1"
"@stablelib/x25519" "^1.0.2"
"@stablelib/xchacha20poly1305" "^1.0.1"
bech32 "^2.0.0"
canonicalize "^1.0.5"
did-resolver "^3.1.5"
canonicalize "^1.0.8"
did-resolver "^3.2.2"
elliptic "^6.5.4"
js-sha3 "^0.8.0"
multiformats "^9.4.10"
multiformats "^9.6.5"
uint8arrays "^3.0.0"

did-resolver@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-3.1.5.tgz#1a82a00fa96d64085676183bff40ebc13c88cd6a"
integrity sha512-/4lM1vK5osnWVZ2oN9QhlWV5xOwssuLSL1MvueBc8LQWotbD5kM9XQMe7h4GydYpbh3JaWMFkOWwc9jvSZ+qgg==
did-resolver@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-3.2.2.tgz#6f4e252a810f785d1b28a10265fad6dffee25158"
integrity sha512-Eeo2F524VM5N3W4GwglZrnul2y6TLTwMQP3In62JdG34NZoqihYyOZLk+5wUW8sSgvIYIcJM8Dlt3xsdKZZ3tg==

diff-sequences@^27.4.0:
version "27.4.0"
Expand Down Expand Up @@ -5733,16 +5733,16 @@ ms@^2.0.0, ms@^2.1.2:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

multiformats@^9.4.10:
version "9.5.9"
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.5.9.tgz#99ac8f4b997ec3dd2a2f563bdf8fdebdca437b99"
integrity sha512-G3lKuMEV3H/414CnhiQr/BYPPacno3modE7ory2VFngxpMNAhg3GAYUeKGhdbllHPxX2Fw7mRjYB9mHO7yUwzQ==

multiformats@^9.4.2:
version "9.5.8"
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.5.8.tgz#b8b8fa80210b31a96bea2b59c26970b5815e5a5e"
integrity sha512-GY154q1yPPdHX4ArXHE8Z1Mm9BxZcJetzEqfwQg/ongo91qIJDHJEio3zboHIKGEvBLrhVqKwlRuDqwa7+xECQ==

multiformats@^9.6.5:
version "9.6.5"
resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.6.5.tgz#f2d894a26664b454a90abf5a8911b7e39195db80"
integrity sha512-vMwf/FUO+qAPvl3vlSZEgEVFY/AxeZq5yg761ScF3CZsXgmTi/HGkicUiNN0CI4PW8FiY2P0OLklOcmQjdQJhw==

mute-stream@~0.0.4:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
Expand Down

0 comments on commit 4c10524

Please sign in to comment.