Commit d1aed10
committed
refactor: reorganize storage logic and improve performance
- Moved utility functions and constants to a new internal module for better organization.
- Simplified storage operations by consolidating common logic into reusable functions.
- Enhanced caching mechanisms for raw values to reduce redundant storage access.
- Improved batch processing for storage operations, allowing for more efficient data handling.
- Updated type definitions and added new features for better type safety and clarity.
- Refactored listener management to streamline event handling across different storage scopes.
- Adjusted migration handling to ensure compatibility with new storage structures.
- Updated task dependencies in turbo.json to include code generation step before build.1 parent 34869d6 commit d1aed10
32 files changed
Lines changed: 3351 additions & 2241 deletions
File tree
- .github/workflows
- apps/example
- app
- components
- packages/react-native-nitro-storage
- android/src/main
- cpp
- java/com/nitrostorage
- cpp
- bindings
- core
- ios
- nitrogen/generated/ios
- scripts
- src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
7 | 42 | | |
8 | 43 | | |
9 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
| |||
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| 102 | + | |
89 | 103 | | |
90 | 104 | | |
91 | 105 | | |
| |||
155 | 169 | | |
156 | 170 | | |
157 | 171 | | |
| 172 | + | |
| 173 | + | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
| |||
184 | 200 | | |
185 | 201 | | |
186 | 202 | | |
| 203 | + | |
187 | 204 | | |
| 205 | + | |
| 206 | + | |
188 | 207 | | |
189 | 208 | | |
190 | 209 | | |
| |||
202 | 221 | | |
203 | 222 | | |
204 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
205 | 236 | | |
206 | 237 | | |
207 | 238 | | |
| |||
243 | 274 | | |
244 | 275 | | |
245 | 276 | | |
246 | | - | |
| 277 | + | |
247 | 278 | | |
248 | 279 | | |
249 | 280 | | |
250 | 281 | | |
251 | 282 | | |
252 | 283 | | |
253 | 284 | | |
| 285 | + | |
254 | 286 | | |
255 | 287 | | |
256 | 288 | | |
| |||
292 | 324 | | |
293 | 325 | | |
294 | 326 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 327 | + | |
| 328 | + | |
300 | 329 | | |
301 | 330 | | |
302 | 331 | | |
| |||
309 | 338 | | |
310 | 339 | | |
311 | 340 | | |
| 341 | + | |
312 | 342 | | |
313 | 343 | | |
314 | 344 | | |
| |||
404 | 434 | | |
405 | 435 | | |
406 | 436 | | |
407 | | - | |
| 437 | + | |
408 | 438 | | |
409 | 439 | | |
410 | 440 | | |
| |||
415 | 445 | | |
416 | 446 | | |
417 | 447 | | |
| 448 | + | |
418 | 449 | | |
419 | 450 | | |
420 | 451 | | |
| |||
424 | 455 | | |
425 | 456 | | |
426 | 457 | | |
| 458 | + | |
427 | 459 | | |
428 | 460 | | |
429 | 461 | | |
| |||
0 commit comments