Skip to content

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

Merged
TooTallNate merged 1 commit into
vercel:mainfrom
sionicion:remove-uuid
Mar 12, 2024
Merged

Remove uuid package and replace with crypto.randomUUID()#99
TooTallNate merged 1 commit into
vercel:mainfrom
sionicion:remove-uuid

Conversation

@sionicion
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

@hirehamir hirehamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#102 does this in a slightly different way. I guess the maintainers can go with whichever approach they prefer.

@TooTallNate TooTallNate merged commit 6f59a70 into vercel:main Mar 12, 2024
TooTallNate added a commit that referenced this pull request Mar 12, 2024
@sionicion sionicion deleted the remove-uuid branch March 13, 2024 01:56
TooTallNate added a commit that referenced this pull request Dec 19, 2024
Build script has been broken since #99.
@TooTallNate TooTallNate mentioned this pull request Dec 19, 2024
TooTallNate added a commit that referenced this pull request Dec 19, 2024
@TooTallNate TooTallNate mentioned this pull request Dec 19, 2024
TooTallNate added a commit that referenced this pull request Dec 19, 2024
* Revert #93.
* Revert #99.
* Remove Go setup from CI (the test was already previously disabled in #97).
* Remove `pkg` (the test was also disabled in #97).
* Remove `prebuild` and `postbuild` npm scripts - they do not get invoked with pnpm.
* Use `pnpm` in CI.
* Update TypeScript to v4.9.3.

---

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants