firebase-admin-node
firebase-admin-node copied to clipboard
refactor: remove uuid dependency and use native crypto.randomUUID
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
uuidpackage frompackage.json - Replaced
import { v4 as uuid } from 'uuid'withimport { randomUUID } from 'crypto' - Updated all
uuidv4()calls torandomUUID() - 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