sindresorhus / element-ready

Detect when an element is ready in the DOM
MIT License
436 stars 15 forks source link

Update many-keys-map to v2 ESM #43

Closed muuvmuuv closed 1 year ago

muuvmuuv commented 1 year ago

I recently stumbled upon an issue while using Jest with element-ready where it has a type error.

  ● Test suite failed to run

           TypeError: many_keys_map_1.default is not a constructor

           > 1 | import elementReady from "element-ready"

During investigation, I just noticed that element-ready has some peers that can be updated. many-keys-map e.g. now is ESM only which match your philosophy of switching to ESM only.

I already tested v2 by doing a pnpm override of many-keys-map (no API changes), and it fixes my issue above.