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

rollup / packaging issues #32

Closed
danwallach opened this issue Jul 13, 2022 · 3 comments
Closed

rollup / packaging issues #32

danwallach opened this issue Jul 13, 2022 · 3 comments
Assignees

Comments

@danwallach
Copy link
Owner

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 added a commit that referenced this issue Jul 16, 2022
- Suppress a warning
- Rename some output files
- Remove redundant declaration files

Address #32
shreyasminocha added a commit that referenced this issue Jul 16, 2022
@shreyasminocha
Copy link
Collaborator

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 (FredKSchott/rollup-plugin-polyfill-node#21, calvinmetcalf/rollup-plugin-node-builtins#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
Copy link
Owner Author

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 added a commit that referenced this issue Jul 17, 2022
Unfortunately doesn't fix the circular dependencies warning because
we still indirectly depend on Buffer.

Address #32
shreyasminocha added a commit that referenced this issue Jul 17, 2022
shreyasminocha added a commit that referenced this issue Jul 17, 2022
Temporary hack (TM) to get around an upstream packaging issue.

Address #32
@shreyasminocha
Copy link
Collaborator

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

  • node (both import and require)
  • post-bigint browsers (both as an ES module and as a global named eg)
  • deno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants