mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
940 stars 590 forks source link

Use native `crypto.randomUUID()` instead of `hat` module #1274

Open varna opened 1 month ago

varna commented 1 month ago

Reducing number of dependencies by replacing hat module with native crypto.randomUUID() which is well supported:

https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID#browser_compatibility https://caniuse.com/mdn-api_crypto_randomuuid

This would push mapbox-gl-draw dev env to node 20 (or deno/bun). Node 18 is reaching end of maintenance next year, so idk if that's an issue for you.