Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/redux-persist-filesystem-storage/index.d.ts b/node_modules/redux-persist-filesystem-storage/index.d.ts
index b0caa94..76b0442 100644
--- a/node_modules/redux-persist-filesystem-storage/index.d.ts
+++ b/node_modules/redux-persist-filesystem-storage/index.d.ts
diff --git a/index.d.ts b/index.d.ts
index b0caa94ceaa9afaa6c112947a328887e580f76a2..76b0442a7367f39d8ae9300825815edda5b02c44 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -12,6 +12,7 @@ declare module 'redux-persist-filesystem-storage' {
setItem: (
key: string,
Expand All @@ -10,24 +10,30 @@ index b0caa94..76b0442 100644
callback?: (error?: Error) => void,
) => Promise<void>

diff --git a/node_modules/redux-persist-filesystem-storage/index.js b/node_modules/redux-persist-filesystem-storage/index.js
index d69afb6..0ca3a25 100644
--- a/node_modules/redux-persist-filesystem-storage/index.js
+++ b/node_modules/redux-persist-filesystem-storage/index.js
@@ -41,11 +41,14 @@ const FilesystemStorage = {
diff --git a/index.js b/index.js
index d69afb678b3d06760ad59831457cfd5c51fdb89b..8d5ecb060a91f137c865ed21f891b640d3cc65fe 100644
--- a/index.js
+++ b/index.js
@@ -41,11 +41,19 @@ const FilesystemStorage = {
onStorageReady = onStorageReadyFactory(options.storagePath);
},

- setItem: (key: string, value: string, callback?: (error: ?Error) => void) =>
- ReactNativeBlobUtil.fs
+ setItem: (key: string, value: string, isIOS: boolean = false, callback?: (error: ?Error) => void) => {
ReactNativeBlobUtil.fs
+ return ReactNativeBlobUtil.fs
.writeFile(pathForKey(key), value, options.encoding)
- .then(() => callback && callback())
- .catch(error => callback && callback(error)),
+ .then(() => {
+ if (isIOS) ReactNativeBlobUtil.ios.excludeFromBackupKey(pathForKey(key));
+ callback && callback();
+ }).catch(error => callback && callback(error));
+ }).catch((error) => {
+ if (!callback) {
+ throw error;
+ }
+ callback(error);
+ });
+ },

getItem: onStorageReady(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
"redux": "^4.2.1",
"redux-mock-store": "1.5.4",
"redux-persist": "6.0.0",
"redux-persist-filesystem-storage": "^4.2.0",
"redux-persist-filesystem-storage": "patch:redux-persist-filesystem-storage@npm%3A4.2.0#~/.yarn/patches/redux-persist-filesystem-storage-npm-4.2.0-3a6fff24ab.patch",
"redux-saga": "^1.3.0",
"redux-thunk": "^2.4.2",
"reselect": "^5.1.1",
Expand Down
13 changes: 11 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35767,7 +35767,7 @@ __metadata:
redux-devtools-expo-dev-plugin: "npm:^1.0.0"
redux-mock-store: "npm:1.5.4"
redux-persist: "npm:6.0.0"
redux-persist-filesystem-storage: "npm:^4.2.0"
redux-persist-filesystem-storage: "patch:redux-persist-filesystem-storage@npm%3A4.2.0#~/.yarn/patches/redux-persist-filesystem-storage-npm-4.2.0-3a6fff24ab.patch"
redux-saga: "npm:^1.3.0"
redux-saga-test-plan: "npm:^4.0.6"
redux-thunk: "npm:^2.4.2"
Expand Down Expand Up @@ -41509,7 +41509,7 @@ __metadata:
languageName: node
linkType: hard

"redux-persist-filesystem-storage@npm:^4.2.0":
"redux-persist-filesystem-storage@npm:4.2.0":
version: 4.2.0
resolution: "redux-persist-filesystem-storage@npm:4.2.0"
dependencies:
Expand All @@ -41518,6 +41518,15 @@ __metadata:
languageName: node
linkType: hard

"redux-persist-filesystem-storage@patch:redux-persist-filesystem-storage@npm%3A4.2.0#~/.yarn/patches/redux-persist-filesystem-storage-npm-4.2.0-3a6fff24ab.patch":
version: 4.2.0
resolution: "redux-persist-filesystem-storage@patch:redux-persist-filesystem-storage@npm%3A4.2.0#~/.yarn/patches/redux-persist-filesystem-storage-npm-4.2.0-3a6fff24ab.patch::version=4.2.0&hash=4dfd27"
dependencies:
react-native-blob-util: "npm:^0.18.0"
checksum: 10/fa556e2d1784a5e664e2e7024fa2255b08334e0dacf8993acca676cb912ad82c0f8ef3ba9ec2597d455f9dded83acf3343cc0a66d4e2fc14486e31dd9efe6def
languageName: node
linkType: hard

"redux-persist@npm:6.0.0":
version: 6.0.0
resolution: "redux-persist@npm:6.0.0"
Expand Down