philihp / openskill.js

A faster, open-license alternative to Microsoft TrueSkill
https://www.npmjs.com/package/openskill
MIT License
203 stars 19 forks source link

fix: bump sort-unwind to verson without default export #635

Closed philihp closed 3 months ago

philihp commented 3 months ago

I believe there's an issue with the way default exports in CJS is weird, shown with the example in https://github.com/philihp/openskill.js/issues/627#issuecomment-2237978221

I added a named export to sort-unwind, so that should work around this. If that doesn't work, I think there's a tsconfig option that can be flipped (https://www.typescriptlang.org/docs/handbook/modules/appendices/esm-cjs-interop.html), but I don't fully understand the implications of that, and another alternative would be to inline sort-unwind, but I'd prefer to keep modules smaller.

coveralls commented 3 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 88c68b42a6eaa6ad1696d84211c362af0aa0e629 on no-default-export-on-unwind into 519a6359dc31b89f035733d35d682538bef0afad on main.