fix(uuid): fall back when crypto.randomUUID is unavailable#1158
Merged
ananaBMaster merged 2 commits intomainfrom Mar 18, 2026
Merged
fix(uuid): fall back when crypto.randomUUID is unavailable#1158ananaBMaster merged 2 commits intomainfrom
ananaBMaster merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: d02da69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ananaBMaster
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Changes
Description
getRandomUUID()helper that falls back tocrypto.getRandomValues()whencrypto.randomUUID()is unavailableDEFAULT_CONFIGimport with agetRandomValues-only crypto implementationRelated Issue
Closes #1157
How Has This Been Tested?
Added unit tests
Verified through manual testing
SKIP_FREE_API=true pnpm exec vitest run src/utils/__tests__/crypto-polyfill.test.ts src/utils/constants/__tests__/config.test.ts src/utils/config/__tests__/init.test.ts src/utils/server/edge-tts/__tests__/signature.test.ts src/entrypoints/selection.content/selection-toolbar/custom-action-button/__tests__/use-custom-action-execution.test.tspnpm exec tsc --noEmitpnpm buildremote push hook:
nx run @read-frog/extension:lint,nx run @read-frog/extension:type-check,nx run @read-frog/extension:test(75 files, 789 tests passed)Screenshots
Checklist
Additional Information
Summary by cubic
Add a shared
getRandomUUID()that falls back tocrypto.getRandomValues()whencrypto.randomUUID()is missing, and remove the globalrandomUUIDpolyfill. All UUIDs now use the helper to avoid crashes and brittle startup ordering; closes #1157.getRandomUUID()(analytics, TTS, translation, queues, content scripts, YouTube subtitles, backups, provider/config/custom action flows).crypto.randomUUIDglobally; the helper only requiresgetRandomValues.DEFAULT_CONFIGinitialization withoutrandomUUID, and verified the module does not patchcrypto.randomUUID.Written for commit d02da69. Summary will update on new commits.