firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

refactor: remove uuid dependency and use native crypto.randomUUID

Open LeonardoTonizza opened this issue 3 weeks ago • 1 comments

Description

This PR removes the external uuid dependency and replaces it with Node.js native crypto.randomUUID() for UUID generation.

Motivation

Since PR #2756 updated the minimum Node.js version requirement to v18, and crypto.randomUUID() has been available since Node.js v14.17.0, there is no longer a need for the external uuid package dependency.

Changes

  • Removed uuid package from package.json
  • Replaced import { v4 as uuid } from 'uuid' with import { randomUUID } from 'crypto'
  • Updated all uuidv4() calls to randomUUID()
  • Updated tests to use the native implementation

Testing

  • [x] Existing unit tests pass

References

  • Node.js crypto.randomUUID() documentation: https://nodejs.org/api/crypto.html#cryptorandomuuidoptions
  • PR #2756

LeonardoTonizza avatar Nov 16 '25 17:11 LeonardoTonizza