From 59269b067dbe018485ae1715836b62cb14250599 Mon Sep 17 00:00:00 2001 From: cedoor Date: Mon, 13 Mar 2023 22:32:23 +0000 Subject: [PATCH 1/2] build: bundle poseidon-lite functions with rollup Former-commit-id: 797e62dd282fc5440b9e1ae944bf8461b1fa66b6 --- packages/group/package.json | 6 ++++-- packages/group/rollup.config.ts | 6 +++++- packages/identity/package.json | 6 ++++-- packages/identity/rollup.config.ts | 4 ++++ yarn.lock.REMOVED.git-id | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/group/package.json b/packages/group/package.json index ecfd9a06..75139bfd 100644 --- a/packages/group/package.json +++ b/packages/group/package.json @@ -30,6 +30,9 @@ "access": "public" }, "devDependencies": { + "@rollup/plugin-commonjs": "^24.0.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "poseidon-lite": "^0.1.0", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-typescript2": "^0.31.2", "typedoc": "^0.22.11" @@ -38,7 +41,6 @@ "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", "@ethersproject/keccak256": "^5.7.0", - "@zk-kit/incremental-merkle-tree": "1.0.0", - "poseidon-lite": "^0.1.0" + "@zk-kit/incremental-merkle-tree": "1.0.0" } } diff --git a/packages/group/rollup.config.ts b/packages/group/rollup.config.ts index 9ec2ab68..24204885 100644 --- a/packages/group/rollup.config.ts +++ b/packages/group/rollup.config.ts @@ -1,6 +1,8 @@ -import typescript from "rollup-plugin-typescript2" +import commonjs from "@rollup/plugin-commonjs" +import { nodeResolve } from "@rollup/plugin-node-resolve" import * as fs from "fs" import cleanup from "rollup-plugin-cleanup" +import typescript from "rollup-plugin-typescript2" const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8")) const banner = `/** @@ -24,6 +26,8 @@ export default { tsconfig: "./build.tsconfig.json", useTsconfigDeclarationDir: true }), + commonjs(), + nodeResolve(), cleanup({ comments: "jsdoc" }) ] } diff --git a/packages/identity/package.json b/packages/identity/package.json index 6f66d5e2..77382d34 100644 --- a/packages/identity/package.json +++ b/packages/identity/package.json @@ -30,6 +30,9 @@ "access": "public" }, "devDependencies": { + "@rollup/plugin-commonjs": "^24.0.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "poseidon-lite": "^0.1.0", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-typescript2": "^0.31.2", "typedoc": "^0.22.11" @@ -39,7 +42,6 @@ "@ethersproject/keccak256": "^5.7.0", "@ethersproject/random": "^5.5.1", "@ethersproject/strings": "^5.6.1", - "js-sha512": "^0.8.0", - "poseidon-lite": "^0.1.0" + "js-sha512": "^0.8.0" } } diff --git a/packages/identity/rollup.config.ts b/packages/identity/rollup.config.ts index 9ec2ab68..9358d39a 100644 --- a/packages/identity/rollup.config.ts +++ b/packages/identity/rollup.config.ts @@ -1,6 +1,8 @@ import typescript from "rollup-plugin-typescript2" +import commonjs from "@rollup/plugin-commonjs" import * as fs from "fs" import cleanup from "rollup-plugin-cleanup" +import { nodeResolve } from "@rollup/plugin-node-resolve" const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8")) const banner = `/** @@ -24,6 +26,8 @@ export default { tsconfig: "./build.tsconfig.json", useTsconfigDeclarationDir: true }), + commonjs(), + nodeResolve(), cleanup({ comments: "jsdoc" }) ] } diff --git a/yarn.lock.REMOVED.git-id b/yarn.lock.REMOVED.git-id index 3449b8ad..99107d1d 100644 --- a/yarn.lock.REMOVED.git-id +++ b/yarn.lock.REMOVED.git-id @@ -1 +1 @@ -bb37bce3b378d2820f4bd11633208228a7dad658 \ No newline at end of file +209a43d6ba59c3affb00d2c3929e9019ba1cf25f \ No newline at end of file From abbf1a1d305723e24cbe01f7ef95889a82a65ecf Mon Sep 17 00:00:00 2001 From: cedoor Date: Mon, 13 Mar 2023 22:41:37 +0000 Subject: [PATCH 2/2] chore: update lockfile Former-commit-id: 982ee86208e8e442981cb3664a0cfbd4d66734d3 --- yarn.lock.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock.REMOVED.git-id b/yarn.lock.REMOVED.git-id index 99107d1d..6732aed9 100644 --- a/yarn.lock.REMOVED.git-id +++ b/yarn.lock.REMOVED.git-id @@ -1 +1 @@ -209a43d6ba59c3affb00d2c3929e9019ba1cf25f \ No newline at end of file +8a53ad57adfd306de30391b075ca50a5689cc257 \ No newline at end of file