| #
638a1042 |
| 17-Dec-2022 |
Linus Unnebäck <[email protected]> |
[image-picker] Avoid dependency on uuid (#20476)
# Why
Older versions of uuid is deprecated. And, as far as I could tell, there
was no need for it in this module.
> [email protected]: Please upgrade
[image-picker] Avoid dependency on uuid (#20476)
# Why
Older versions of uuid is deprecated. And, as far as I could tell, there
was no need for it in this module.
> [email protected]: 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
https://github.com/expo/expo/pull/20477#discussion_r1049065418)
# Test Plan
I have copied the built files into `node_modules` for our Expo Web
project, built again, and tested.
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
show more ...
|