Skip to content
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 #3402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikeee
Copy link

@nikeee nikeee commented Dec 5, 2024

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No if Node.js ^18 is required (which is the oldest supported version)

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.

@nestjs/graphql is currently downloaded about 580000 times per week, so about 30740000 times per year. uuid@11 is about 3.7 kB in size (gzipped+minified). Removing this dependency saves about 113GB traffic per year.

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.
@nikeee
Copy link
Author

nikeee commented Dec 7, 2024

Sure, will do!

@nikeee
Copy link
Author

nikeee commented Dec 18, 2024

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants