-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): Use crypto.randomUUID()
instead of uuid
module
#2252
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@nikeee is attempting to deploy a commit to the Poimandres Team on Vercel. A member of the Team first needs to authorize it. |
The `crypto` global is available in all supported Node.js versions as well as [in all major browsers](https://caniuse.com/mdn-api_crypto_randomuuid). The uuid module is rendered unnecessary for uuidv4. `@react-three/drei` is currently downloaded about 253000 times per week, so about 13409000 times per year. `uuid@9` is about 3.7 kB in size (gzipped+minified). Removing this dependency saves about 50GB traffic per year.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Note: the global |
what about https://react.dev/reference/react/useId |
I think that would be even better in the context of react. Should I change this PR? |
Done |
Why
The
crypto
global is available in all supported Node.js versions as well as in all major browsers. The uuid module is rendered unnecessary for uuidv4.@react-three/drei
is currently downloaded about 253000 times per week, so about 13409000 times per year.uuid@9
is about 3.7 kB in size (gzipped+minified). Removing this dependency saves about 50GB traffic per year.Checklist