bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
92 stars 55 forks source link

Add package.json#main field #75

Closed Robin-Hoodie closed 2 years ago

Robin-Hoodie commented 2 years ago

Resolves #73

junderw commented 2 years ago

I understand moving to a hybrid model using only exports broke jest.

But I am worried that moving from hybrid exports to hybrid exports + main with cjs might break other tools besides jest causing more problems.

If you could try a few popular things using each of their latest versions (tools, bundlers, test suites etc.) to make sure this doesn't break them I'd appreciate it.

Robin-Hoodie commented 2 years ago

@junderw I've created a consumer repo here: https://github.com/Robin-Hoodie/tiny-secp256k1-consumer

I've added Babel, TypeScript & Jest

Babel & TypeScript compilation continue to work

Running w/ Jest still fails, but now fails in the uint8array-tools code where the ESM module is also loaded instead of the CommonJS module. I've noticed that repo (which you also seem to be the author of) is also lacking a main field though, so it would probably be best that I add the main field in there as well.

Are there any other tools apart from the 3 above you were thinking of?

To try it out yourself, you need to:

Robin-Hoodie commented 2 years ago

Any feedback @junderw ?

junderw commented 2 years ago

Published as v2.2.1

uint8array-tools as v0.0.7