unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
1.92k stars 109 forks source link

fix: esm bug in jest #420

Closed eryue0220 closed 1 month ago

eryue0220 commented 1 month ago

This pr is to solve #418

ashvardanian commented 1 month ago

Can this break compatibility with other JS environments?

eryue0220 commented 1 month ago

Can this break compatibility with other JS environments?

Oh, you're right. It will break esm compatibility 🤣. Because nodejs requires the esm module must have a .mjs extension or add "type": "module" in package.json, but I forgot it.

I think I need to upgrade the build tool to vite, because tsc couldn't configure the target file extension.

eryue0220 commented 1 month ago

Sorry, I didn't notice that dist-package-esm.json has done what I said before. Now it won't break compatibility with other JS environments.

ashvardanian commented 1 month ago

@eryue0220 did you push any changes? Are the module exports supposed to be deleted?

eryue0220 commented 1 month ago

@eryue0220 did you push any changes? Are the module exports supposed to be deleted?

No any other changes. Yes it's supposed to be deleted.