danwallach / ElectionGuard-TypeScript

TypeScript implementation of ElectionGuard (subset for ballot encryption)
MIT License
8 stars 0 forks source link

rollup / packaging issues #32

Closed danwallach closed 2 years ago

danwallach commented 2 years ago

Right now, when you run npm run test, it proceeds to start running the packaging process. Dunno why that's happening, but something's not right.

There are also warnings about circular dependencies and about this being rewritten to undefined, so I'm assuming that we've still got some effort to get this all buttoned up.

shreyasminocha commented 2 years ago

warnings about circular dependencies

This one is related to our use of Buffer in hash.ts, and it looks like there's not much we can do about it, short of getting rid of our use of Buffer (https://github.com/FredKSchott/rollup-plugin-polyfill-node/issues/21, https://github.com/calvinmetcalf/rollup-plugin-node-builtins/issues/39). Seems to be harmless.

Also related to this issue is removing the compile npm script which individually transpiles our typescript files. I think we need it to run bench/*.ts, but we could replace that with ts-node (blocked by an upstream packaging issue with bigint-mod-arith). Apart from that though, it seems redundant now from what I can tell.

danwallach commented 2 years ago

Can we get rid of Buffer? Just use string concatenation?

bigint-mod-arith is a remarkably small package and we're only using a small part of it. We could just decide to copy that into our own code, so long as the license is compatible.

shreyasminocha commented 2 years ago

Closing in favour of #34 and #35. As far as I can tell, the builds work. We now support: