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(core): drop nanoid for three UUID utils #901

Merged
merged 1 commit into from
May 13, 2022
Merged

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented May 13, 2022

Why

The introduction of nanoid in 90f9ffa relies on crypto which is not available in some contexts like react-native.

What

I've removed the nanoid dependency and used three's UUID helpers for now, although I've written a polyfill for other projects if that's preferred:

const uuid = () =>
  '00-0-4-1-000'.replace(/\d/g, (s) =>
    (((Math.random() + Number(s)) * 0x10000) >> Number(s)).toString(16).padStart(4, '0').toUpperCase(),
  )

Checklist

  • Documentation updated
  • Storybook entry added
  • Ready to be merged

Shader HMR Sandbox

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit abe7888:

Sandbox Source
funny-cannon-8rv23l Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@CodyJasonBennett CodyJasonBennett merged commit c19b450 into master May 13, 2022
@CodyJasonBennett CodyJasonBennett deleted the fix-nanoid branch May 13, 2022 06:33
@pmndrs pmndrs deleted a comment from vercel bot May 24, 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.

1 participant