PeculiarVentures / x509

@peculiar/x509 is an easy to use TypeScript/Javascript library based on @peculiar/asn1-schema that makes generating X.509 Certificates and Certificate Requests as well as validating certificate chains easy
https://peculiarventures.github.io/x509/
MIT License
78 stars 10 forks source link

Can't use version 1.5.1 NPM package for browser mode #14

Closed ThibsG closed 2 years ago

ThibsG commented 2 years ago

Hello,

We were just updating from 1.4 to 1.5 and it selected 1.5.1 but it breaks the build:

ERROR in ../jslib/node_modules/@peculiar/x509/build/x509.es.js 36:0-38
Module not found: Error: Can't resolve 'webcrypto-core' in '/jslib/node_modules/@peculiar/x509/build'
resolve 'webcrypto-core' in '/jslib/node_modules/@peculiar/x509/build'

Digging into recent commits, sounds like updating webcrypto-core dev-dependency (https://github.com/PeculiarVentures/x509/commit/90bce88a4187032d043b655e5ca788d2105f612f) and using it later on (https://github.com/PeculiarVentures/x509/commit/db1917ecf4a16cf48bef89adbbf57d1e39c1a460) are the cause of this break.

Edit: forcing dependency to 1.5.0 works well

microshine commented 2 years ago

I'm fixing it. I used some constants from the webcrypto-core but forgot to add that module to dependencies

microshine commented 2 years ago

@ThibsG I published v1.5.2. Please try it and let me know if current issue is fixed

ThibsG commented 2 years ago

@microshine , it works now!

Thanks a lot for solving the issue this fast!

microshine commented 2 years ago

Thank you too for your fast testing!