uuidjs / uuid

Generate RFC-compliant UUIDs in JavaScript
MIT License
14.65k stars 904 forks source link

fix: remove wrapper.mjs #822

Closed broofa closed 1 month ago

broofa commented 1 month ago

@ctavan @TrySound : Do we still need the wrapper.mjs file in light of the uuid@v11 refactoring / changes to node since #423 went in?

820 Isn't an issue with uuid per se, but it does speak to the additional code-complexity that comes with the wrapper approach. It'd be nice to get rid of it.

I've scanned #423 but my grasp of the issues there is a bit dated. I need to refresh my memory. In the meantime I'm unsure how relevant this still is.

broofa commented 1 month ago

Looking into this further I'm 99% sure we can kill wrapper.mjs. It was intended as a way to bridge node's experimental ESM support to the CJS code base, which was the preferred implementation at the time. That's not really a relevant concern any longer... not for me, at least. 😁 In fact, in uuid@10 the file wrapper.mjs was importing (dist/index.js) was CJS, not ESM, but it now points to dist/esm/index.js which is, at best, a benign bug that makes wrapper.mjs synonomous with dist/esm/index.js in uuid@v11.0.1 currently.

So... in the interests of mitigating the # of users impacted by this change I'm going to go ahead and push a new patch-release. For anyone impacted by this... uh... "I'm sorry"... and please comment here or open a new issue where we can discuss how / why we need to continue supporting your use case.