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

fix: crypto.getRandomValues check for older node versions and min nod… #1053

Merged
merged 4 commits into from
Oct 12, 2022

Conversation

vanGalilea
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why, and How?

This PR fixes issue #992 by checking weather crypto.getRandomValues exists and fallbacks to our own implementation of generating a uuid. crypto.getRandomValues is being supported from node 17.4.0 onwards

Changelog

  • Targeting node v16 and higher to prevent future mishaps (APIs that are partially supported) similar to this. We were a bit behind with our engine node version (v14, while v18 will become LTS soon).

@github-actions
Copy link
Contributor

Size Change: +152 B (0%)

Total Size: 312 kB

Filename Size Change
dist/browser.es.js 68.3 kB +33 B (0%)
dist/browser.full-bundle.min.js 37.2 kB +27 B (0%)
dist/browser.js 69.2 kB +31 B (0%)
dist/index.es.js 68.3 kB +32 B (0%)
dist/index.js 69.3 kB +29 B (0%)

compressed-size-action

@vanGalilea vanGalilea merged commit 3a5f6f6 into master Oct 12, 2022
@vanGalilea vanGalilea deleted the fix/crypto-get-random-value-error branch October 12, 2022 08:38
@github-actions github-actions bot mentioned this pull request Oct 12, 2022
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.

None yet

2 participants