Skip to content

Commit

Permalink
chore: use UUID generator library
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandkakonyi committed Nov 28, 2023
1 parent 7955765 commit 150bc5e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
5 changes: 3 additions & 2 deletions integration_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/metro-config": "^0.72.11",
"@types/cavy": "^3.2.7",
"babel-plugin-module-resolver": "^5.0.0",
"cavy-cli": "^3.0.0",
"metro-react-native-babel-preset": "0.76.8",
"pod-install": "^0.1.39",
"@types/cavy": "^3.2.7",
"cavy-cli": "^3.0.0"
"react-native-uuid": "^2.0.1"
},
"engines": {
"node": ">=16"
Expand Down
6 changes: 3 additions & 3 deletions integration_test/playertesting/PlayerWorld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SourceConfig,
TimeChangedEvent,
} from 'bitmovin-player-react-native';
import { UUID } from './helpers/UUID';
import uuid from 'react-native-uuid';
import { Event } from 'bitmovin-player-react-native';
import { EventType } from './EventType';
import {
Expand Down Expand Up @@ -66,7 +66,7 @@ export default class PlayerWorld {
}

const player = new Player({
nativeId: `player-${UUID()}`,
nativeId: `player-${uuid.v4()}`,
...config,
});
player.initialize();
Expand Down Expand Up @@ -265,7 +265,7 @@ export default class PlayerWorld {
private addEventListener = <T extends Event>(
listener: (event: T) => void
): (() => void) => {
const key = UUID();
const key = uuid.v4() as string;
this.eventListeners[key] = async (event) => listener(event as T);
return () => {
delete this.eventListeners[key];
Expand Down
6 changes: 0 additions & 6 deletions integration_test/playertesting/helpers/UUID.ts

This file was deleted.

5 changes: 5 additions & 0 deletions integration_test/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,11 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-native-uuid@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/react-native-uuid/-/react-native-uuid-2.0.1.tgz#ed4e2dfb1683eddb66967eb5dca140dfe1abddb9"
integrity sha512-cptnoIbL53GTCrWlb/+jrDC6tvb7ypIyzbXNJcpR3Vab0mkeaaVd5qnB3f0whXYzS+SMoSQLcUUB0gEWqkPC0g==

"react-native@npm:[email protected]":
version "0.72.6-1"
resolved "https://registry.yarnpkg.com/react-native-tvos/-/react-native-tvos-0.72.6-1.tgz#86fea7bf2e5abf55147d83e131b15eb94e6e75bf"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@
"@babel/core": "7.22.10",
"@babel/preset-env": "7.22.10",
"@babel/runtime": "7.22.10",
"babel-plugin-module-resolver": "5.0.0",
"metro-react-native-babel-preset": "0.72.3",
"@commitlint/config-conventional": "17.7.0",
"@react-native-community/eslint-config": "3.1.0",
"@types/jest": "^28.1.2",
"@types/lodash.omit": "4.5.0",
"@types/react": "~17.0.21",
"@types/react-native": "0.70.0",
"babel-plugin-module-resolver": "5.0.0",
"commitlint": "17.7.1",
"eslint": "8.24.0",
"eslint-config-prettier": "8.5.0",
Expand All @@ -75,6 +74,7 @@
"jest": "^28.1.1",
"lint-staged": "13.0.3",
"metro-config": "0.72.3",
"metro-react-native-babel-preset": "0.72.3",
"prettier": "2.7.1",
"react": "18.2.0",
"react-native": "0.72.6",
Expand Down

0 comments on commit 150bc5e

Please sign in to comment.