vercel / fun

ƒun - Local serverless function λ development runtime
Apache License 2.0
482 stars 26 forks source link

Remove uuid package and replace with crypto.randomUUID() #99

Closed sionicion closed 6 months ago

sionicion commented 7 months ago

In my NextJS projects I get the following warning from npm:

npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

I tracked it down to this package, and I found the instances where uuid() was used and replaced it with crypto.randomUUID(), then I removed the package and its types. Crypto's function is actually supposed to be much faster than using the uuid package.