Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate esm branch from yarn to pnpm #1099

Merged
merged 7 commits into from
Jan 12, 2023
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@ and [lerna](https://lerna.js.org/)
Install dependencies

```bash
yarn install
yarn bootstrap
npm -g i pnpm
pnpm install
```

Build

```bash
yarn build
pnpm build
```

Run the tests

```bash
yarn test
pnpm test
```

```bash
yarn test:watch
pnpm test:watch
```

If you are running Visual Studio Code, there are some launch configurations available that can be used as template for
Expand Down
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "veramo",
"private": true,
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --experimental-json-modules\" yarn build:js && yarn build:api && yarn build:schema",
"build:js": "lerna run build --stream",
"build:api": "lerna run extract-api --stream",
"build:schema": "lerna run generate-plugin-schema --stream",
"bootstrap": "pnpm bootstrap",
"build": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --experimental-json-modules\" pnpm build:js && pnpm build:api && pnpm build:schema",
"build:js": "pnpm -r --stream run build",
"build:api": "pnpm -r --stream run extract-api",
"build:schema": "pnpm -r --stream run generate-plugin-schema",
"lint": "echo \"linting not yet enabled\"",
"test:integration-build": "yarn test:integration-prepare && yarn test:integration-pretty",
"test:integration-prepare": "ts-node --project packages/tsconfig.settings.json ./scripts/prepare-integration-tests.ts",
Expand All @@ -27,17 +27,14 @@
"docs:build": "ts-node ./scripts/docs-build.ts && yarn docs:pretty",
"docs:pretty": "pretty-quick"
},
"workspaces": [
"packages/*",
"__browser_tests__/*"
],
"devDependencies": {
"@microsoft/api-documenter": "7.19.24",
"@microsoft/api-extractor": "7.33.6",
"@microsoft/api-extractor-model": "7.25.2",
"@types/fs-extra": "9.0.13",
"@types/jest": "28.1.1",
"@types/node": "18.11.9",
"caip": "^1.1.0",
"codecov": "3.8.3",
"cross-env": "7.0.3",
"ethr-did-registry": "0.0.3",
Expand All @@ -56,8 +53,7 @@
"rimraf": "3.0.2",
"semantic-release": "19.0.3",
"ts-jest": "28.0.4",
"caip": "^1.1.0",
"ts-json-schema-generator": "1.1.2",
"ts-json-schema-generator": "^1.2.0",
"ts-node": "10.9.1",
"typescript": "4.9.3"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@veramo/remote-server": "^4.2.0",
"@veramo/selective-disclosure": "^4.2.0",
"@veramo/url-handler": "^4.2.0",
"@veramo/utils": "^4.2.0",
"blessed": "^0.1.81",
"commander": "^9.0.0",
"console-table-printer": "^2.10.0",
Expand Down Expand Up @@ -66,7 +67,7 @@
"qrcode-terminal": "^0.12.0",
"sqlite3": "^5.0.8",
"swagger-ui-express": "^4.6.0",
"ts-json-schema-generator": "^1.1.2",
"ts-json-schema-generator": "^1.2.0",
"typeorm": "^0.3.10",
"url-parse": "^1.5.4",
"web-did-resolver": "^2.0.21",
Expand All @@ -75,9 +76,11 @@
},
"devDependencies": {
"@types/debug": "4.1.7",
"@types/express": "4.17.13",
"@types/inquirer": "8.2.1",
"@types/node-fetch": "3.0.3",
"@types/passport-http-bearer": "1.0.37",
"@types/url-parse": "1.4.8",
"@types/ws": "8.5.3",
"typescript": "4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"generate-plugin-schema": "yarn veramo dev generate-plugin-schema"
"generate-plugin-schema": "node ../cli/bin/veramo.js dev generate-plugin-schema"
},
"veramo": {
"pluginInterfaces": {
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-eip712/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"generate-plugin-schema": "yarn veramo dev generate-plugin-schema"
"generate-plugin-schema": "node ../cli/bin/veramo.js dev generate-plugin-schema"
},
"veramo": {
"pluginInterfaces": {
Expand Down
4 changes: 3 additions & 1 deletion packages/credential-ld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"generate-plugin-schema": "yarn veramo dev generate-plugin-schema"
"generate-plugin-schema": "node ../cli/bin/veramo.js dev generate-plugin-schema"
},
"veramo": {
"pluginInterfaces": {
Expand All @@ -19,6 +19,7 @@
},
"dependencies": {
"@digitalcredentials/ed25519-signature-2020": "^3.0.2",
"@digitalcredentials/ed25519-verification-key-2020": "^4.0.0",
"@digitalcredentials/jsonld": "^5.2.1",
"@digitalcredentials/jsonld-signatures": "^9.3.1",
"@digitalcredentials/vc": "^5.0.0",
Expand All @@ -29,6 +30,7 @@
"@veramo/core": "^4.2.0",
"@veramo/did-resolver": "^4.2.0",
"@veramo/utils": "^4.2.0",
"cross-fetch": "^3.1.4",
"debug": "^4.3.3",
"did-resolver": "^4.0.1",
"uint8arrays": "^3.0.0"
Expand Down
6 changes: 4 additions & 2 deletions packages/credential-ld/src/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
VerifiablePresentation,
} from '@veramo/core'
import { VeramoLdSignature } from './index.js'
import schema from "./plugin.schema.json" assert { type: 'json' }
import module from "module"
const requireCjs = module.createRequire(import.meta.url);
const schema = requireCjs("./plugin.schema.json")
import Debug from 'debug'
import { LdContextLoader } from './ld-context-loader.js'
import {
Expand Down Expand Up @@ -229,7 +231,7 @@ export class CredentialIssuerLD implements IAgentPlugin {
context: IAgentContext<IResolver>,
identifier: IIdentifier,
keyRef?: string,
): Promise<{ signingKey: IKey; verificationMethodId: string }> {
): Promise<{ signingKey: _ExtendedIKey; verificationMethodId: string }> {
const extendedKeys: _ExtendedIKey[] = await mapIdentifierKeysToDoc(identifier, 'assertionMethod', context)
let supportedTypes = this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuiteTypes()
let signingKey: _ExtendedIKey | undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@veramo/core": "^4.2.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/credential-w3c/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@veramo/core": "^4.2.0",
Expand All @@ -20,6 +20,7 @@
"@veramo/utils": "^4.2.0",
"canonicalize": "^1.0.8",
"debug": "^4.3.3",
"did-jwt": "^6.9.0",
"did-jwt-vc": "^3.1.0",
"did-resolver": "^4.0.1",
"uint8arrays": "^3.0.0",
Expand All @@ -30,6 +31,7 @@
},
"devDependencies": {
"@types/debug": "4.1.7",
"@types/uuid": "8.3.4",
"typescript": "4.9.3"
},
"files": [
Expand Down
7 changes: 5 additions & 2 deletions packages/data-store-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@ungap/structured-clone": "^1.0.0",
Expand All @@ -17,11 +17,14 @@
"@veramo/did-manager": "^4.2.0",
"@veramo/key-manager": "^4.2.0",
"@veramo/utils": "^4.2.0",
"debug": "^4.3.3"
"debug": "^4.3.3",
"did-jwt-vc": "^3.1.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/debug": "4.1.7",
"@types/ungap__structured-clone": "0.3.0",
"@types/uuid": "8.3.4",
"typescript": "4.9.3"
},
"files": [
Expand Down
7 changes: 5 additions & 2 deletions packages/data-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@veramo/core": "^4.2.0",
Expand All @@ -15,10 +15,13 @@
"@veramo/key-manager": "^4.2.0",
"@veramo/utils": "^4.2.0",
"debug": "^4.3.3",
"typeorm": "^0.3.10"
"did-jwt-vc": "^3.1.0",
"typeorm": "^0.3.10",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/debug": "4.1.7",
"@types/uuid": "8.3.4",
"sqlite3": "5.0.8",
"typescript": "4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/did-comm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"generate-plugin-schema": "yarn veramo dev generate-plugin-schema"
"generate-plugin-schema": "node ../cli/bin/veramo.js dev generate-plugin-schema"
},
"veramo": {
"pluginInterfaces": {
Expand Down
6 changes: 5 additions & 1 deletion packages/did-comm/src/didcomm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import {
verifyJWS,
} from 'did-jwt'
import { DIDDocument, parse as parseDidUrl, ServiceEndpoint, VerificationMethod } from 'did-resolver'
import schema from "./plugin.schema.json" assert { type: 'json' }
import module from "module"
const requireCjs = module.createRequire(import.meta.url);

const schema = requireCjs("./plugin.schema.json")

import { v4 as uuidv4 } from 'uuid'
import * as u8a from 'uint8arrays'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/did-discovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"generate-plugin-schema": "yarn veramo dev generate-plugin-schema"
"generate-plugin-schema": "node ../cli/bin/veramo.js dev generate-plugin-schema"
},
"veramo": {
"pluginInterfaces": {
Expand Down
2 changes: 1 addition & 1 deletion packages/did-jwt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@veramo/core": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/did-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@veramo/core": "^4.2.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/did-provider-ethr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "5.7.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/properties": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@ethersproject/signing-key": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@veramo/core": "^4.2.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/did-provider-ion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,25 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@decentralized-identity/ion-sdk": "^0.6.0",
"@ethersproject/random": "^5.7.0",
"@ethersproject/signing-key": "^5.7.0",
"@sphereon/ion-pow": "^0.2.0",
"@stablelib/ed25519": "^1.0.2",
"@stablelib/sha256": "^1.0.1",
"@trust/keyto": "^1.0.1",
"@veramo/core": "^4.2.0",
"@veramo/did-manager": "^4.2.0",
"@veramo/key-manager": "^4.2.0",
"@veramo/kms-local": "^4.2.0",
"canonicalize": "^1.0.8",
"cross-fetch": "^3.1.4",
"debug": "^4.3.3",
"did-resolver": "^4.0.1",
"multihashes": "^4.0.3",
"uint8arrays": "^3.0.0"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/did-provider-key/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@transmute/did-key-ed25519": "^0.3.0-unstable.9",
Expand All @@ -16,6 +16,7 @@
"@veramo/core": "^4.2.0",
"@veramo/did-manager": "^4.2.0",
"debug": "^4.3.3",
"did-resolver": "^4.0.1",
"multibase": "^4.0.6",
"multicodec": "^3.2.1"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/did-provider-pkh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "yarn veramo dev extract-api"
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/signing-key": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@veramo/core": "^4.2.0",
"@veramo/did-manager": "^4.2.0",
"debug": "^4.3.3"
"debug": "^4.3.3",
"did-resolver": "^4.0.1"
},
"devDependencies": {
"@types/debug": "4.1.7",
Expand Down
1 change: 0 additions & 1 deletion packages/did-provider-pkh/src/pkh-did-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { IIdentifier, IKey, IService, IAgentContext, IKeyManager } from '@veramo/core'
import { Provider } from '@ethersproject/abstract-provider'
import { computeAddress } from '@ethersproject/transactions'

import { AbstractIdentifierProvider } from '@veramo/did-manager'
Expand Down
1 change: 0 additions & 1 deletion packages/did-provider-pkh/src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {
DIDResolutionOptions,
ResolverRegistry,
ParsedDID,
Resolver,
Resolvable
} from 'did-resolver'

Expand Down
Loading