@umituz/react-native-exception 1.2.11 → 1.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-exception",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "Exception handling and error tracking for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -27,12 +27,14 @@
27
27
  "peerDependencies": {
28
28
  "@umituz/react-native-firebase": "latest",
29
29
  "@umituz/react-native-firebase-auth": "latest",
30
+ "@umituz/react-native-uuid": "latest",
30
31
  "react": ">=18.2.0",
31
32
  "react-native": ">=0.74.0"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@umituz/react-native-firebase": "latest",
35
36
  "@umituz/react-native-firebase-auth": "latest",
37
+ "@umituz/react-native-uuid": "latest",
36
38
  "@types/react": "~19.1.10",
37
39
  "react": "19.1.0",
38
40
  "react-native": "0.81.5",
@@ -3,8 +3,7 @@
3
3
  * Pure business logic representation of errors and exceptions
4
4
  */
5
5
 
6
- import 'react-native-get-random-values';
7
- import { v4 as uuidv4 } from 'uuid';
6
+ import { generateUUID } from '@umituz/react-native-uuid';
8
7
 
9
8
  export type ExceptionSeverity = 'fatal' | 'error' | 'warning' | 'info';
10
9
  export type ExceptionCategory = 'network' | 'validation' | 'authentication' | 'authorization' | 'business-logic' | 'system' | 'storage' | 'unknown';
@@ -51,7 +50,7 @@ export function createException(
51
50
  context: ExceptionContext = {}
52
51
  ): ExceptionEntity {
53
52
  return {
54
- id: uuidv4(),
53
+ id: generateUUID(),
55
54
  message: error.message,
56
55
  stackTrace: error.stack,
57
56
  severity,
@@ -70,7 +69,7 @@ export function createErrorLog(
70
69
  exception: ExceptionEntity
71
70
  ): ErrorLog {
72
71
  return {
73
- id: uuidv4(),
72
+ id: generateUUID(),
74
73
  exceptionId: exception.id,
75
74
  userId: exception.context.userId,
76
75
  message: exception.message,