Skip to content

Commit c951ede

Browse files
committed
Simplify/update some dev dependencies versions
1 parent 5750a08 commit c951ede

File tree

4 files changed

+288
-511
lines changed

4 files changed

+288
-511
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
"release": "npmpub"
4141
},
4242
"devDependencies": {
43-
"bs-platform": "^5.2.0",
44-
"husky": "^1.3.0",
45-
"lint-staged": "^10.1.1",
43+
"bs-platform": "^8.0.0",
44+
"husky": "^4.0.0",
45+
"lint-staged": "^10.0.0",
4646
"npmpub": "^5.0.0",
47-
"prettier": "^1.18.0"
47+
"prettier": "^2.0.0"
4848
},
4949
"prettier": {
5050
"trailingComma": "all"

src/ReactNativeKeychain.bs.js

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,36 @@ var Js_dict = require("bs-platform/lib/js/js_dict.js");
44
var Js_json = require("bs-platform/lib/js/js_json.js");
55
var Belt_Option = require("bs-platform/lib/js/belt_Option.js");
66

7-
var SecurityLevel = { };
7+
var SecurityLevel = {};
88

9-
var Accessible = { };
9+
var Accessible = {};
1010

11-
var AccessControl = { };
11+
var AccessControl = {};
1212

13-
var AuthenticationType = { };
13+
var AuthenticationType = {};
1414

15-
var BiometryType = { };
15+
var BiometryType = {};
1616

1717
function decodeGetGenericPasswordResult(result) {
18-
var match = Js_json.classify(result);
19-
if (typeof match === "number" || match.tag !== /* JSONObject */2) {
18+
var dict = Js_json.classify(result);
19+
if (typeof dict === "number") {
2020
return ;
21-
} else {
22-
var dict = match[0];
23-
var match$1 = Belt_Option.map(Js_dict.get(dict, "service"), Js_json.classify);
24-
var match$2 = Belt_Option.map(Js_dict.get(dict, "username"), Js_json.classify);
25-
var match$3 = Belt_Option.map(Js_dict.get(dict, "password"), Js_json.classify);
26-
if (match$1 !== undefined) {
27-
var match$4 = match$1;
28-
if (typeof match$4 === "number" || match$4.tag || match$2 === undefined) {
29-
return ;
30-
} else {
31-
var match$5 = match$2;
32-
if (typeof match$5 === "number" || match$5.tag || match$3 === undefined) {
33-
return ;
34-
} else {
35-
var match$6 = match$3;
36-
if (typeof match$6 === "number" || match$6.tag) {
37-
return ;
38-
} else {
39-
return /* record */[
40-
/* service */match$4[0],
41-
/* username */match$5[0],
42-
/* password */match$6[0]
43-
];
44-
}
45-
}
46-
}
47-
} else {
48-
return ;
49-
}
5021
}
22+
if (dict.TAG !== /* JSONObject */2) {
23+
return ;
24+
}
25+
var dict$1 = dict._0;
26+
var match = Belt_Option.map(Js_dict.get(dict$1, "service"), Js_json.classify);
27+
var match$1 = Belt_Option.map(Js_dict.get(dict$1, "username"), Js_json.classify);
28+
var match$2 = Belt_Option.map(Js_dict.get(dict$1, "password"), Js_json.classify);
29+
if (match !== undefined && !(typeof match === "number" || match.TAG || !(match$1 !== undefined && !(typeof match$1 === "number" || match$1.TAG || !(match$2 !== undefined && !(typeof match$2 === "number" || match$2.TAG)))))) {
30+
return {
31+
service: match._0,
32+
username: match$1._0,
33+
password: match$2._0
34+
};
35+
}
36+
5137
}
5238

5339
exports.SecurityLevel = SecurityLevel;

src/ReactNativeKeychain.re

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ type getGenericPasswordOptions;
107107
[@bs.obj]
108108
external getGenericPasswordOptions:
109109
(~authenticationPrompt: string=?, ~service: string=?, unit) =>
110-
getGenericPasswordOptions =
111-
"";
110+
getGenericPasswordOptions;
112111

113112
[@bs.module "react-native-keychain"]
114113
external getGenericPassword: unit => Js.Promise.t(getGenericPasswordResult) =
@@ -137,8 +136,7 @@ external setGenericPasswordOptions:
137136
~securityLevel: SecurityLevel.t=?,
138137
unit
139138
) =>
140-
setGenericPasswordOptions =
141-
"";
139+
setGenericPasswordOptions;
142140

143141
[@bs.module "react-native-keychain"]
144142
external setGenericPassword:
@@ -166,8 +164,7 @@ external setGenericPasswordWithService:
166164
type resetGenericPasswordOptions;
167165
[@bs.obj]
168166
external resetGenericPasswordOptions:
169-
(~service: string=?, unit) => resetGenericPasswordOptions =
170-
"";
167+
(~service: string=?, unit) => resetGenericPasswordOptions;
171168

172169
[@bs.module "react-native-keychain"]
173170
external resetGenericPassword: unit => Js.Promise.t(bool) =

0 commit comments

Comments
 (0)