From 0262aad9cdb3fc407310c5a3de0d7ae013ca64cf Mon Sep 17 00:00:00 2001 From: ditoglez Date: Fri, 20 Dec 2024 12:40:30 +0200 Subject: [PATCH] chore: bundle `codecs` package in sdk's (#405) --- examples/idos-example-dapp/api/package.json | 2 +- packages/idos-sdk-js/package.json | 2 +- packages/idos-sdk-js/tsup.config.ts | 2 ++ packages/issuer-sdk-js/package.json | 2 +- packages/issuer-sdk-js/tsup.config.ts | 6 +++++- pnpm-lock.yaml | 12 ++++++------ 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/examples/idos-example-dapp/api/package.json b/examples/idos-example-dapp/api/package.json index f57a9ba6c..651baa064 100644 --- a/examples/idos-example-dapp/api/package.json +++ b/examples/idos-example-dapp/api/package.json @@ -8,7 +8,7 @@ "typescript": "^5.0.2" }, "dependencies": { - "@idos-network/idos-sdk-server-dapp": "workspace:*" + "@idos-network/grantee-sdk-js": "workspace:*" }, "peerDependencies": { "ethers": "^6.12", diff --git a/packages/idos-sdk-js/package.json b/packages/idos-sdk-js/package.json index f1308a289..19f1f22a5 100644 --- a/packages/idos-sdk-js/package.json +++ b/packages/idos-sdk-js/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "@dotenvx/dotenvx": "^1.6.4", + "@idos-network/codecs": "workspace:*", "@idos-network/idos-sdk-types": "workspace:*", "@near-js/types": "^0.2.1", "@near-wallet-selector/core": "8.9.10", @@ -58,7 +59,6 @@ "dependencies": { "@digitalbazaar/ed25519-signature-2020": "^5.2.0", "@digitalbazaar/ed25519-verification-key-2020": "^4.1.0", - "@idos-network/codecs": "workspace:*", "@digitalbazaar/vc": "^6.0.2", "@kwilteam/kwil-js": "0.7.1", "es-toolkit": "^1.23.0", diff --git a/packages/idos-sdk-js/tsup.config.ts b/packages/idos-sdk-js/tsup.config.ts index 46128e723..2054a4f03 100644 --- a/packages/idos-sdk-js/tsup.config.ts +++ b/packages/idos-sdk-js/tsup.config.ts @@ -10,4 +10,6 @@ export default defineConfig({ env: config().parsed, format: ["esm"], outDir: "./dist", + bundle: true, + noExternal: ["@idos-network/codecs"], }); diff --git a/packages/issuer-sdk-js/package.json b/packages/issuer-sdk-js/package.json index 8c6768e4a..ed8c75ee2 100644 --- a/packages/issuer-sdk-js/package.json +++ b/packages/issuer-sdk-js/package.json @@ -48,6 +48,7 @@ "test:build": "pnpx publint --strict" }, "devDependencies": { + "@idos-network/codecs": "workspace:*", "@idos-network/idos-sdk-types": "workspace:*", "@idos-network/kwil-nep413-signer": "workspace:*", "@release-it/keep-a-changelog": "^5.0.0", @@ -58,7 +59,6 @@ "vitest": "^0.31.4" }, "dependencies": { - "@idos-network/codecs": "workspace:*", "@kwilteam/kwil-js": "0.7.1", "es-toolkit": "^1.23.0", "tiny-invariant": "^1.3.3", diff --git a/packages/issuer-sdk-js/tsup.config.ts b/packages/issuer-sdk-js/tsup.config.ts index 6aaec382a..91f1e8230 100644 --- a/packages/issuer-sdk-js/tsup.config.ts +++ b/packages/issuer-sdk-js/tsup.config.ts @@ -14,5 +14,9 @@ export default defineConfig({ outDir: "./dist", bundle: true, dts: true, - noExternal: ["@idos-network/kwil-nep413-signer", "@idos-network/idos-sdk-types"], + noExternal: [ + "@idos-network/kwil-nep413-signer", + "@idos-network/idos-sdk-types", + "@idos-network/codecs", + ], }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bce46d9c6..f2f49b55e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -642,9 +642,6 @@ importers: '@digitalbazaar/vc': specifier: ^6.0.2 version: 6.3.0(web-streams-polyfill@3.3.3) - '@idos-network/codecs': - specifier: workspace:* - version: link:../codecs '@kwilteam/kwil-js': specifier: 0.7.1 version: 0.7.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -673,6 +670,9 @@ importers: '@dotenvx/dotenvx': specifier: ^1.6.4 version: 1.31.0 + '@idos-network/codecs': + specifier: workspace:* + version: link:../codecs '@idos-network/idos-sdk-types': specifier: workspace:* version: link:../types @@ -717,9 +717,6 @@ importers: packages/issuer-sdk-js: dependencies: - '@idos-network/codecs': - specifier: workspace:* - version: link:../codecs '@kwilteam/kwil-js': specifier: 0.7.1 version: 0.7.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -736,6 +733,9 @@ importers: specifier: ^1.0.3 version: 1.0.3 devDependencies: + '@idos-network/codecs': + specifier: workspace:* + version: link:../codecs '@idos-network/idos-sdk-types': specifier: workspace:* version: link:../types