@umituz/react-native-storage 2.6.14 → 2.6.18
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 +11 -4
- package/src/__tests__/{performance.test.ts → performance.test.tsx} +1 -0
- package/src/cache/__tests__/PerformanceAndMemory.test.ts +1 -0
- package/src/cache/domain/__tests__/Cache.test.ts +1 -0
- package/src/cache/presentation/__tests__/ReactHooks.test.ts +2 -1
- package/src/domain/factories/StoreFactory.ts +1 -1
- package/src/infrastructure/repositories/__tests__/AsyncStorageRepository.test.ts +1 -0
- package/src/infrastructure/repositories/__tests__/BaseStorageOperations.test.ts +1 -0
- package/src/presentation/hooks/CacheStorageOperations.ts +1 -2
- package/src/presentation/hooks/__tests__/usePersistentCache.test.ts +1 -0
- package/src/presentation/hooks/__tests__/useStorage.test.ts +1 -0
- package/src/presentation/hooks/__tests__/useStorageState.test.ts +1 -0
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-storage",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.18",
|
|
4
4
|
"description": "Unified storage solution with AsyncStorage persistence, Zustand state management, and in-memory caching for React Native",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"typecheck": "
|
|
9
|
-
"lint": "
|
|
8
|
+
"typecheck": "tsc --noEmit",
|
|
9
|
+
"lint": "eslint src --ext .ts,.tsx --max-warnings 0",
|
|
10
|
+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
10
11
|
"version:patch": "npm version patch -m 'chore: release v%s'",
|
|
11
12
|
"version:minor": "npm version minor -m 'chore: release v%s'",
|
|
12
13
|
"version:major": "npm version major -m 'chore: release v%s'"
|
|
@@ -43,7 +44,13 @@
|
|
|
43
44
|
"@types/react": "~19.1.10",
|
|
44
45
|
"react": "19.1.0",
|
|
45
46
|
"react-native": "0.81.5",
|
|
46
|
-
"typescript": "~5.9.2"
|
|
47
|
+
"typescript": "~5.9.2",
|
|
48
|
+
"eslint": "^9.39.2",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
50
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
51
|
+
"eslint-plugin-react": "^7.37.5",
|
|
52
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
53
|
+
"eslint-plugin-react-native": "^5.0.0"
|
|
47
54
|
},
|
|
48
55
|
"publishConfig": {
|
|
49
56
|
"access": "public"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
/**
|
|
2
3
|
* React Hooks Integration Tests
|
|
3
4
|
*/
|
|
@@ -432,7 +433,7 @@ describe('React Hooks Integration', () => {
|
|
|
432
433
|
test('should cleanup on unmount', async () => {
|
|
433
434
|
const mockFetcher = jest.fn().mockResolvedValue('value');
|
|
434
435
|
|
|
435
|
-
const { unmount } = renderHook(() =>
|
|
436
|
+
const { result, unmount } = renderHook(() =>
|
|
436
437
|
useCachedValue('test-cache', 'test-key', mockFetcher)
|
|
437
438
|
);
|
|
438
439
|
|
|
@@ -42,8 +42,7 @@ export class CacheStorageOperations {
|
|
|
42
42
|
* Load cached data from storage
|
|
43
43
|
*/
|
|
44
44
|
async loadFromStorage<T>(
|
|
45
|
-
key: string
|
|
46
|
-
_version?: number
|
|
45
|
+
key: string
|
|
47
46
|
): Promise<CachedValue<T> | null> {
|
|
48
47
|
try {
|
|
49
48
|
const result = await storageRepository.getString(key, '');
|