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

[image-picker] Avoid dependency on uuid #20476

Merged
merged 1 commit into from Dec 17, 2022
Merged

Conversation

LinusU
Copy link
Contributor

@LinusU LinusU commented Dec 14, 2022

Why

Older versions of uuid is deprecated. And, as far as I could tell, there was no need for it in this module.

uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

How

I removed setting an id on the generated input element, since it's never referred to after being set.

I updated the code to use String(Math.random()) instead of uuid.v4(), in order to get a random string.

(changed per #20477 (comment))

Test Plan

I have copied the built files into node_modules for our Expo Web project, built again, and tested.

Checklist

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Dec 14, 2022
@EvanBacon EvanBacon merged commit 638a104 into expo:main Dec 17, 2022
@LinusU LinusU deleted the image-picker-uuid branch December 19, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants