chore: adding package updates + MMKV changes

Updated package versions
Updated mmkv.ts to work with the new layout/design

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
Lance Chant
2025-09-08 13:40:21 +02:00
parent cde205e762
commit b0bb9d10e5
3 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { MMKV } from "react-native-mmkv";
import { storage } from "@/utils/mmkv";
declare module "react-native-mmkv" {
interface MMKV {
@@ -9,7 +9,7 @@ declare module "react-native-mmkv" {
// Add the augmentation methods directly to the MMKV prototype
// This follows the recommended pattern while adding the helper methods your app uses
MMKV.prototype.get = function <T>(key: string): T | undefined {
(storage as any).get = function <T>(key: string): T | undefined {
try {
const serializedItem = this.getString(key);
if (!serializedItem) return undefined;
@@ -20,7 +20,7 @@ MMKV.prototype.get = function <T>(key: string): T | undefined {
}
};
MMKV.prototype.setAny = function (key: string, value: any | undefined): void {
(storage as any).setAny = function (key: string, value: any | undefined): void {
try {
if (value === undefined) {
this.remove(key);

View File

@@ -10,7 +10,7 @@
"@expo/vector-icons": "^15.0.2",
"@gorhom/bottom-sheet": "^5.1.0",
"@jellyfin/sdk": "^0.11.0",
"@kesha-antonov/react-native-background-downloader": "github:kesha-antonov/react-native-background-downloader#6695692",
"@kesha-antonov/react-native-background-downloader": "github:kesha-antonov/react-native-background-downloader#a4cc0d1",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-menu/menu": "^1.2.4",
"@react-navigation/material-top-tabs": "^7.2.14",
@@ -456,7 +456,7 @@
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.30", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q=="],
"@kesha-antonov/react-native-background-downloader": ["@kesha-antonov/react-native-background-downloader@github:kesha-antonov/react-native-background-downloader#6695692", { "peerDependencies": { "react-native": ">=0.57.0" } }, "kesha-antonov-react-native-background-downloader-6695692"],
"@kesha-antonov/react-native-background-downloader": ["@kesha-antonov/react-native-background-downloader@github:kesha-antonov/react-native-background-downloader#a4cc0d1", { "peerDependencies": { "react-native": ">=0.57.0" } }, "kesha-antonov-react-native-background-downloader-a4cc0d1"],
"@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],

View File

@@ -28,7 +28,7 @@
"@expo/vector-icons": "^15.0.2",
"@gorhom/bottom-sheet": "^5.1.0",
"@jellyfin/sdk": "^0.11.0",
"@kesha-antonov/react-native-background-downloader": "github:kesha-antonov/react-native-background-downloader#6695692",
"@kesha-antonov/react-native-background-downloader": "github:kesha-antonov/react-native-background-downloader#main",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-menu/menu": "^1.2.4",
"@react-navigation/material-top-tabs": "^7.2.14",