From 909d43539f38af645d65222dfad63e2201b62df9 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 5 May 2023 12:12:52 -0700 Subject: [PATCH] [core][util] export `randomUUID` for react-native We have the functionality implemented but didn't export it. This PR adds the export. Related issue https://github.com/Azure/azure-sdk-for-js/issues/25754 --- sdk/core/core-util/CHANGELOG.md | 8 ++------ sdk/core/core-util/src/uuidUtils.native.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sdk/core/core-util/CHANGELOG.md b/sdk/core/core-util/CHANGELOG.md index b8911f8bf483..42c484789407 100644 --- a/sdk/core/core-util/CHANGELOG.md +++ b/sdk/core/core-util/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.3.2 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.3.2 (2023-05-05) ### Bugs Fixed -### Other Changes +- Fix an issue where `randomUUID()` is not exported for react-native [issue #25754](https://github.com/Azure/azure-sdk-for-js/issues/25754) ## 1.3.1 (2023-04-13) diff --git a/sdk/core/core-util/src/uuidUtils.native.ts b/sdk/core/core-util/src/uuidUtils.native.ts index 67038c03f397..fa7bb3c8d663 100644 --- a/sdk/core/core-util/src/uuidUtils.native.ts +++ b/sdk/core/core-util/src/uuidUtils.native.ts @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +/* + * NOTE: When moving this file, please update "react-native" section in package.json. + */ + /** * Generated Universally Unique Identifier * @@ -28,3 +32,12 @@ export function generateUUID(): string { } return uuid; } + +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +export function randomUUID(): string { + return generateUUID(); +}