MatrixAI / js-id

ID generation for JavaScript & TypeScript Applications
https://polykey.com
Apache License 2.0
10 stars 1 forks source link

New version of `multiformats` is ESM, and this requires ESM migration #19

Open tegefaulkes opened 1 year ago

tegefaulkes commented 1 year ago

Specification

The multiformats dependency has an internal type error. Right now it's being ignored since we added "skipLibCheck": true to the tsconfig.

We need to update the version to where it has been fixed by multiformats but any version above 10.0.0 fails to resolve the imports.

We need to dig into this further, however, it's low priority since it's a type error inside of the library and a warning at that.

Additional context

Tasks

  1. Update the version of multiformats to a version without the type error.
  2. Resolve any issues with importing multiformats.
CMCDragonkai commented 1 year ago

The new js-multiformats is in fact ESM native. I'm not sure if they even produce CJS modules anymore.

This is part of our overall ESM migration problem: https://github.com/MatrixAI/TypeScript-Demo-Lib/issues/32

I'm adding this issue to the epic in TypeScript-Demo-Lib.

CMCDragonkai commented 3 months ago

This is an example of where ESM can use CJS, but CJS cannot use ESM.