Skip to content

Commit

Permalink
Merge pull request #109 from Sphereon-Opensource/feature/siop-verifif…
Browse files Browse the repository at this point in the history
…ier-pnpm2

move to pnpm
  • Loading branch information
nklomp authored May 7, 2023
2 parents 334ea0e + 10aa180 commit 0d0575e
Show file tree
Hide file tree
Showing 376 changed files with 34,461 additions and 19,268 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/build-test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,22 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '18.x'

# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"
# - uses: actions/cache@v2
# id: yarn-cache
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-2-${{ hashFiles('**/package.json') }}
cache: 'pnpm'
- run: pnpm add -g pnpm

- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
- run: pnpm install
- run: pnpm build
- name: run CI tests
env:
INCLUDE_POSTGRES_TESTS: true
Expand All @@ -48,5 +44,5 @@ jobs:
SPHEREON_SSI_MSAL_CLIENT_SECRET: ${{ secrets.SPHEREON_SSI_MSAL_CLIENT_SECRET }}
SPHEREON_SSI_MSAL_USERNAME: ${{ secrets.SPHEREON_SSI_MSAL_USERNAME }}
SPHEREON_SSI_MSAL_PASSWORD: ${{ secrets.SPHEREON_SSI_MSAL_PASSWORD }}
run: yarn test:ci
run: pnpm test:ci
- run: npx codecov
38 changes: 16 additions & 22 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,33 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '18.x'

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

- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
- name: run integration tests
cache: 'pnpm'
- run: pnpm add -g pnpm
- run: pnpm install
- run: pnpm build
- name: run CI tests
env:
INCLUDE_POSTGRES_TESTS: true
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test123
POSTGRES_PORT: 5432
SPHEREON_SSI_MSAL_TENANT_ID: ${{ secrets.SPHEREON_SSI_MSAL_TENANT_ID }}
SPHEREON_SSI_MSAL_CLIENT_ID: ${{ secrets.SPHEREON_SSI_MSAL_CLIENT_ID }}
SPHEREON_SSI_MSAL_CLIENT_SECRET: ${{ secrets.SPHEREON_SSI_MSAL_CLIENT_SECRET }}
SPHEREON_SSI_MSAL_USERNAME: ${{ secrets.SPHEREON_SSI_MSAL_USERNAME }}
SPHEREON_SSI_MSAL_PASSWORD: ${{ secrets.SPHEREON_SSI_MSAL_PASSWORD }}
run: yarn test:ci
INCLUDE_POSTGRES_TESTS: true
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test123
POSTGRES_PORT: 5432
run: pnpm test:ci

- name: setup git coordinates
run: |
Expand Down
197 changes: 112 additions & 85 deletions README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
plugins: ['@babel/plugin-transform-modules-commonjs', [
'@babel/plugin-transform-runtime',
{
regenerator: true,
},
]],
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript'
]
}
22 changes: 17 additions & 5 deletions jest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"ts",
"tsx",
"js",
"jsx"
"jsx",
"json",
"jsonld"
],
"collectCoverage": true,
"collectCoverageFrom": [
Expand All @@ -13,8 +15,7 @@
"!packages/cli/**",
"!**/types/**",
"!**/dist/**",
"!**/node_modules/**/__tests__/**",
"!**/node_modules/**/*.test.ts",
"!**/.yalc/**",
"!**/node_modules/**",
"!**/packages/**/index.ts"
],
Expand All @@ -26,10 +27,21 @@
"coverageDirectory": "./coverage",
"transform": {
"\\.jsx?$": "babel-jest",
"\\.tsx?$": "ts-jest"
"\\.tsx?$": ["ts-jest", {
"tsconfig": "./packages/tsconfig-base.json"
}]
},
"modulePathIgnorePatterns": [
"<rootDir>/packages/presentation-exchange/.yalc/",
"<rootDir>/packages/siopv2-oid4vp-rp-auth/.yalc/",
"<rootDir>/packages/siopv2-oid4vp-rp-rest-api/.yalc/"
],
"transformIgnorePatterns": [
"node_modules/(?!(?:.pnpm/)?(nist-weierstrauss|multiformatsgggggg))"
],
"testMatch": [
"**/__tests__/**/*.test.*"
"**/__tests__/**/*.test.*",
"!**/.yalc/**"
],
"globals": {
"ts-jest": {
Expand Down
16 changes: 12 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
{
"packages": ["packages/*"],
"packages": [
"packages/*"
],
"version": "0.11.0",
"npmClient": "yarn",
"npmClient": "pnpm",
"command": {
"publish": {
"allowBranch": ["main", "master"],
"allowBranch": [
"main",
"master"
],
"conventionalCommits": true,
"gitRemote": "origin",
"message": "chore(release): %s"
}
},
"useWorkspaces": true
"useWorkspaces": true,
"forceLocal": true,
"sort": true,
"stream": true
}
111 changes: 55 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
{
"name": "SSI-SDK-workspace",
"name": "@sphereon/sphereon-sdk.workspace",
"private": true,
"version": "0.10.0",
"description": "Sphereon SSI Typescript SDK (Workspace)",
"version": "0.11.0",
"description": "Sphereon SSI SDK (Workspace)",
"repository": "[email protected]:Sphereon-Opensource/SSI-SDK.git",
"author": "Sphereon <[email protected]>",
"license": "Apache-2.0",
"scripts": {
"preinstall": "yarn global add @veramo/[email protected]",
"build": "lerna run build && yarn build:copyfiles && yarn build:schema-api",
"build:clean": "lerna clean -y && lerna bootstrap && lerna run build:clean --concurrency 1 && yarn build:copyfiles && yarn build:schema-api",
"build:schema-api": "lerna run extract-api && lerna run generate-plugin-schema",
"build:copyfiles": "lerna run build:copyfiles",
"preinstall": "npx only-allow pnpm && pnpm install -g @veramo/[email protected]",
"build": "pnpm build:js && pnpm build:copyfiles && pnpm build:api && pnpm build:schema",
"build:js": "pnpm -r --stream build",
"build:api": "pnpm --package=@veramo/cli -c dlx \"pnpm -r --stream extract-api\"",
"build:schema": "pnpm -r --stream generate-plugin-schema",
"build:copyfiles": "pnpm -r --stream build:copyfiles",
"bootstrap": "lerna bootstrap",
"test:ci": "jest --config=jest.json",
"test": "jest --verbose --config=jest.json --coverage=true --detectOpenHandles",
"test:watch": "yarn test --watch --verbose",
"test:watch": "pnpm test --watch --verbose",
"test:lint": "eslint . --ext .ts",
"prettier": "prettier --write \"{packages,__tests__,!dist}/**/*.{ts,tsx,js,json,md,yml}\"",
"build-clean": "rimraf --glob ./packages/*/dist ./packages/*/api ./packages/*/node_modules ./packages/*/tsconfig.tsbuildinfo && jest --clearCache",
"publish:latest": "lerna publish --conventional-commits --include-merged-tags --create-release github --yes --dist-tag latest --registry https://registry.npmjs.org",
"build-clean": "rimraf --glob ./packages/*/dist ./packages/*/api ./packages/*/node_modules ./packages/*/tsconfig.tsbuildinfo ./node_modules ./coverage && jest --clearCache",
"publish:latest": "lerna publish --conventional-commits --force-publish --include-merged-tags --create-release github --yes --dist-tag latest --registry https://registry.npmjs.org",
"publish:next": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid next --pre-dist-tag next --yes --registry https://registry.npmjs.org",
"publish:unstable": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid unstable --pre-dist-tag unstable --yes --registry https://registry.npmjs.org",
"postinstall": "patch-package"
},
"workspaces": {
"nohoist": [
"patch-package",
"jsonld1",
"jsonld-signatures1"
],
"packages": [
"./packages/*"
]
"publish:unstable": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid unstable --pre-dist-tag unstable --yes --registry https://registry.npmjs.org"
},
"publishConfig": {
"access": "public"
Expand All @@ -46,58 +36,31 @@
}
]
},
"resolutions": {
"@veramo/cli": "4.2.0",
"@veramo/core": "4.2.0",
"@veramo/credential-w3c": "4.2.0",
"@veramo/data-store": "4.2.0",
"@veramo/did-jwt": "4.2.0",
"@veramo/credential-ld": "4.2.0",
"@veramo/utils": "4.2.0",
"@veramo/did-manager": "4.2.0",
"@veramo/kms-local": "4.2.0",
"@veramo/key-manager": "4.2.0",
"@veramo/credential-eip712": "4.2.0",
"@veramo/did-comm": "4.2.0",
"@veramo/message-handler": "4.2.0",
"@veramo/did-discovery": "4.2.0",
"@veramo/did-provider-ethr": "4.2.0",
"@veramo/did-provider-key": "4.2.0",
"@veramo/did-provider-web": "4.2.0",
"@veramo/did-resolver": "4.2.0",
"@veramo/remote-client": "4.2.0",
"@veramo/remote-server": "4.2.0",
"@veramo/selective-disclosure": "4.2.0",
"**/did-jwt-vc": "3.1.3",
"@veramo/url-handler": "4.2.0",
"**/@mattrglobal/jsonld-signatures-bbs/jsonld": "4.0.1",
"**/jsonld" : "link:./node_modules/@digitalcredentials/jsonld",
"**/isomorphic-webcrypto": "link:./node_modules/@sphereon/isomorphic-webcrypto"
},
"dependencies": {
"@veramo/core": "4.2.0"
},
"devDependencies": {
"@types/jest": "^27.5.2",
"@types/node": "^18.15.11",
"@types/debug": "^4.1.7",
"@types/node": "^16.18.14",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"codecov": "^3.8.3",
"cross-fetch": "^3.1.5",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
"jest": "^27.5.1",
"jest-environment-node": "27.5.1",
"jest-fetch-mock": "^3.0.3",
"json-schema": "^0.4.0",
"lerna": "^6.5.1",
"lerna": "^6.6.1",
"lerna-changelog": "^2.2.0",
"oas-resolver": "^2.5.6",
"openapi-types": "^12.1.0",
"patch-package": "^6.5.1",
"prettier": "^2.8.4",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"rimraf": "^4.4.0",
"semantic-release": "^19.0.5",
Expand All @@ -113,5 +76,41 @@
"semi": false,
"singleQuote": true,
"printWidth": 150
},
"pnpm": {
"overrides": {
"@veramo/cli": "4.2.0",
"@veramo/core": "4.2.0",
"@veramo/credential-w3c": "4.2.0",
"@veramo/data-store": "4.2.0",
"@veramo/did-jwt": "4.2.0",
"@veramo/credential-ld": "4.2.0",
"@veramo/utils": "4.2.0",
"@veramo/did-manager": "4.2.0",
"@veramo/kms-local": "4.2.0",
"@veramo/key-manager": "4.2.0",
"@veramo/credential-eip712": "4.2.0",
"@veramo/did-comm": "4.2.0",
"@veramo/message-handler": "4.2.0",
"@veramo/did-discovery": "4.2.0",
"@veramo/did-provider-ethr": "4.2.0",
"@veramo/did-provider-key": "4.2.0",
"@veramo/did-provider-web": "4.2.0",
"@veramo/did-resolver": "4.2.0",
"@veramo/remote-client": "4.2.0",
"@veramo/remote-server": "4.2.0",
"@veramo/selective-disclosure": "4.2.0",
"@veramo/url-handler": "4.2.0",
"@sphereon/ssi-types": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@noble/hashes": "1.2.0",
"@mattrglobal/[email protected]>jsonld": "4.0.1",
"jsonld": "link:./node_modules/.pnpm/@[email protected]/node_modules/@digitalcredentials/jsonld",
"isomorphic-webcrypto": "link:./node_modules/@sphereon/isomorphic-webcrypto"
},
"patchedDependencies": {
"@veramo/[email protected]": "patches/@[email protected]",
"@veramo/[email protected]": "patches/@[email protected]"
}
}
}
2 changes: 1 addition & 1 deletion packages/agent-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This plugin allows you to run/start an Agent from a yaml configuration. Best use
## Installation

```shell
yarn add @sphereon/ssi-sdk-agent-config
yarn add @sphereon/ssi-sdk.agent-config
```

## Build
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-config/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@sphereon/ssi-sdk-agent-config",
"name": "@sphereon/ssi-sdk.agent-config",
"version": "0.11.0",
"source": "src/index.ts",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-config/src/objectCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function createObjects(config: object, pointers: Record<string, str
const args = objectConfig['$args']
// console.log({module, member, type, query: parsed.query})

if (module.slice(0, 2) === './') {
if (module.slice(0, 2) === './' || module.slice(0, 3) === '../') {
module = resolve(module)
}

Expand Down
6 changes: 3 additions & 3 deletions packages/contact-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ For now the following connection types are supported:

```typescript
import { migrations, Entities } from '@veramo/data-store'
import DataStoreConnectionEntities from '@sphereon/ssi-sdk-contact-manager'
import { ContactStore, DataStoreMigrations } from '@sphereon/ssi-sdk-data-store'
import DataStoreConnectionEntities from '@sphereon/ssi-sdk.contact-manager'
import { ContactStore, DataStoreMigrations } from '@sphereon/ssi-sdk.data-store'

const dbConnection = createConnection({
type: 'react-native',
Expand Down Expand Up @@ -190,7 +190,7 @@ await agent.cmRemoveIdentity({
## Installation

```shell
yarn add @sphereon/ssi-sdk-contact-manager
yarn add @sphereon/ssi-sdk.contact-manager
```

## Build
Expand Down
2 changes: 1 addition & 1 deletion packages/contact-manager/__tests__/localAgent.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createObjects, getConfig } from '@sphereon/ssi-sdk-agent-config'
import { createObjects, getConfig } from '../../agent-config/dist'
import { Connection } from 'typeorm'

jest.setTimeout(30000)
Expand Down
Loading

0 comments on commit 0d0575e

Please sign in to comment.