Skip to content

Commit 757e6b5

Browse files
committed
rescript 8.2 & rrn 0.63
1 parent 69b2ab1 commit 757e6b5

File tree

11 files changed

+34
-64
lines changed

11 files changed

+34
-64
lines changed

bsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
],
1919
"bsc-flags": ["-bs-no-version-header"],
2020
"warnings": {
21-
"number": "+102-105"
21+
"error": true,
22+
"number": "-30"
2223
},
24+
"warnings-number-30-is-useless": "https://github.com/ocaml/ocaml/pull/9046",
2325
"bs-dependencies": ["reason-react", "reason-react-native"]
2426
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@react-navigation/material-bottom-tabs": "^5.0.0",
1111
"@react-navigation/drawer": "^5.0.0",
1212
"reason-react": "^0.9.0",
13-
"reason-react-native": "^0.62.0"
13+
"reason-react-native": "^0.63.0"
1414
},
1515
"publishConfig": {
1616
"access": "public"
@@ -45,13 +45,13 @@
4545
"release": "npmpub"
4646
},
4747
"devDependencies": {
48-
"bs-platform": "^8.0.0",
48+
"bs-platform": "^8.2.0",
4949
"husky": "^4.0.0",
5050
"lint-staged": "^10.0.0",
5151
"npmpub": "^5.0.0",
5252
"prettier": "^2.0.0",
5353
"reason-react": "^0.9.0",
54-
"reason-react-native": "^0.62.0"
54+
"reason-react-native": "^0.63.0"
5555
},
5656
"prettier": {
5757
"trailingComma": "all"

src/BottomTabs.re

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,7 @@ module Make = (M: {type params;}) => {
214214
~initialRouteName: string=?,
215215
~screenOptions: optionsCallback=?,
216216
~children: React.element,
217-
~backBehavior: [@bs.string] [
218-
| `initialRoute
219-
| `order
220-
| `history
221-
| `none
222-
]
223-
=?,
217+
~backBehavior: [ | `initialRoute | `order | `history | `none]=?,
224218
~_lazy: bool=?,
225219
~tabBar: Js.t(bottomTabBarProps) => React.element=?,
226220
~tabBarOptions: bottomTabBarOptions=?,

src/Core.re

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module EventConsumer = (M: {type params;}) => {
8282
external addListener:
8383
(
8484
navigation,
85-
[@bs.string] [ | `focus | `blur | `tabPress],
85+
[ | `focus | `blur | `tabPress],
8686
eventListenerCallback('data)
8787
) =>
8888
unsubscribe =
@@ -91,7 +91,7 @@ module EventConsumer = (M: {type params;}) => {
9191
external removeListener:
9292
(
9393
navigation,
94-
[@bs.string] [ | `focus | `blur | `tabPress],
94+
[ | `focus | `blur | `tabPress],
9595
eventListenerCallback('data)
9696
) =>
9797
unsubscribe =

src/Drawer.re

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,11 @@ module Make = (M: {type params;}) => {
127127
~initialRouteName: string=?,
128128
~screenOptions: optionsCallback=?,
129129
~children: React.element,
130-
~backBehavior: [@bs.string] [
131-
| `initialRoute
132-
| `order
133-
| `history
134-
| `none
135-
]
136-
=?,
130+
~backBehavior: [ | `initialRoute | `order | `history | `none]=?,
137131
//DrawerNavigationConfig
138132
~drawerBackgroundColor: string=?,
139-
~drawerPosition: [@bs.string] [ | `left | `right]=?,
140-
~drawerType: [@bs.string] [ | `front | `back | `slide]=?,
133+
~drawerPosition: [ | `left | `right]=?,
134+
~drawerType: [ | `front | `back | `slide]=?,
141135
/*
142136
~drawerWidth: [@bs.unwrap] [
143137
| `Static(float)
@@ -155,7 +149,7 @@ module Make = (M: {type params;}) => {
155149
=?,
156150
~minSwipeDistance: float=?,
157151
~overlayColor: string=?,
158-
~statusBarAnimation: [@bs.string] [ | `slide | `none | `fade]=?,
152+
~statusBarAnimation: [ | `slide | `none | `fade]=?,
159153
//TODO: ~gestureHandlerProps: React.ComponentProps<typeof PanGestureHandler>;
160154
~_lazy: bool=?,
161155
~unmountInactiveRoutes: bool=?,

src/Example.bs.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ var Stack$ReactNavigation = require("./Stack.bs.js");
66
var Native = require("@react-navigation/native");
77

88
function Example$HomeScreen(Props) {
9-
Props.navigation;
10-
Props.route;
119
return React.createElement(ReactNative.Text, {
1210
children: "Hello Reasonable Person!"
1311
});
@@ -18,8 +16,6 @@ var HomeScreen = {
1816
};
1917

2018
function Example$ModalScreen(Props) {
21-
Props.navigation;
22-
Props.route;
2319
return React.createElement(ReactNative.Text, {
2420
children: "Hello From Modal"
2521
});
@@ -38,8 +34,6 @@ var $$Screen = include.$$Screen;
3834
var $$Navigator = include.$$Navigator;
3935

4036
function Example$MainStackScreen(Props) {
41-
Props.navigation;
42-
Props.route;
4337
return React.createElement($$Navigator.make, {
4438
children: React.createElement($$Screen.make, {
4539
name: "Home",

src/Example.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
module HomeScreen = {
55
open ReactNative;
66
[@react.component]
7-
let make = (~navigation, ~route) =>
7+
let make = (~navigation as _, ~route as _) =>
88
<Text> {j|Hello Reasonable Person!|j}->React.string </Text>;
99
};
1010

1111
module ModalScreen = {
1212
open ReactNative;
1313
[@react.component]
14-
let make = (~navigation, ~route) =>
14+
let make = (~navigation as _, ~route as _) =>
1515
<Text> {j|Hello From Modal|j}->React.string </Text>;
1616
};
1717

@@ -22,7 +22,7 @@ module MainStackScreen = {
2222
};
2323
include Stack.Make(StakeParams);
2424
[@react.component]
25-
let make = (~navigation, ~route) =>
25+
let make = (~navigation as _, ~route as _) =>
2626
<Navigator>
2727
<Screen
2828
name="Home"

src/MaterialBottomTabs.re

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,7 @@ module Make = (M: {type params;}) => {
153153
~initialRouteName: string=?,
154154
~screenOptions: optionsCallback=?,
155155
~children: React.element,
156-
~backBehavior: [@bs.string] [
157-
| `initialRoute
158-
| `order
159-
| `history
160-
| `none
161-
]
162-
=?,
156+
~backBehavior: [ | `initialRoute | `order | `history | `none]=?,
163157
~shifting: bool=?,
164158
~labeled: bool=?,
165159
~activeColor: string=?,

src/MaterialTopTabs.re

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,19 +208,13 @@ module Make = (M: {type params;}) => {
208208
~initialRouteName: string=?,
209209
~screenOptions: optionsCallback=?,
210210
~children: React.element,
211-
~backBehavior: [@bs.string] [
212-
| `initialRoute
213-
| `order
214-
| `history
215-
| `none
216-
]
217-
=?,
211+
~backBehavior: [ | `initialRoute | `order | `history | `none]=?,
218212
~_lazy: bool=?,
219213
~lazyPreloadDistance: int=?,
220214
~lazyPlaceholder: React.component({. "route": route})=?,
221215
~tabBar: Js.t(materialTopTabBarProps) => React.element=?,
222216
~tabBarOptions: materialTopTabBarOptions=?,
223-
~tabBarPosition: [@bs.string] [ | `top | `bottom]=?,
217+
~tabBarPosition: [ | `top | `bottom]=?,
224218
~removeClippedSubviews: bool=?,
225219
~keyboardDismissMode: [@bs.string] [
226220
| `auto

src/Stack.re

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,15 @@ module TransitionSpec = {
8888
overshootClamping: bool,
8989
};
9090
[@bs.obj]
91-
external spring:
92-
(~animation: [@bs.string] [ | `spring], ~config: springConfig) => t;
91+
external spring: (~animation: [ | `spring], ~config: springConfig) => t;
9392

9493
type timingConfig = {
9594
duration: int,
9695
easing: ReactNative.Easing.t,
9796
};
9897

9998
[@bs.obj]
100-
external timing:
101-
(~animation: [@bs.string] [ | `timing], ~config: timingConfig) => t;
99+
external timing: (~animation: [ | `timing], ~config: timingConfig) => t;
102100
};
103101

104102
type transitionSpec = {
@@ -219,14 +217,14 @@ module Make = (M: {type params;}) => {
219217
~cardOverlay: unit => React.element=?,
220218
~cardStyle: ReactNative.Style.t=?,
221219
~animationEnabled: bool=?,
222-
~animationTypeForReplace: [@bs.string] [ | `push | `pop]=?,
220+
~animationTypeForReplace: [ | `push | `pop]=?,
223221
~gestureEnabled: bool=?,
224222
~gestureResponseDistance: gestureResponseDistance=?,
225223
~gestureVelocityImpact: float=?,
226224
// StackHeaderOptions
227225
~headerShown: bool=?,
228226
~headerTitle: HeaderTitle.t=?,
229-
~headerTitleAlign: [@bs.string] [ | `left | `center]=?,
227+
~headerTitleAlign: [ | `left | `center]=?,
230228
~headerTitleStyle: ReactNative.Style.t=?,
231229
~headerTitleContainerStyle: ReactNative.Style.t=?,
232230
~headerTintColor: ReactNative.Color.t=?,
@@ -247,7 +245,7 @@ module Make = (M: {type params;}) => {
247245
~headerStyle: ReactNative.Style.t=?,
248246
~headerTransparent: bool=?,
249247
// TransitionPreset
250-
~gestureDirection: [@bs.string] [ | `horizontal | `vertical]=?,
248+
~gestureDirection: [ | `horizontal | `vertical]=?,
251249
~transitionSpec: transitionSpec=?,
252250
~cardStyleInterpolator: stackCardStyleInterpolator=?,
253251
~headerStyleInterpolator: stackHeaderStyleInterpolator=?,
@@ -338,8 +336,8 @@ module Make = (M: {type params;}) => {
338336
(
339337
~initialRouteName: string=?,
340338
~screenOptions: optionsCallback=?,
341-
~mode: [@bs.string] [ | `card | `modal]=?,
342-
~headerMode: [@bs.string] [ | `float | `screen | `none]=?,
339+
~mode: [ | `card | `modal]=?,
340+
~headerMode: [ | `float | `screen | `none]=?,
343341
~keyboardHandlingEnabled: bool=?,
344342
~children: React.element,
345343
~key: string=?,

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ braces@^3.0.1:
251251
dependencies:
252252
fill-range "^7.0.1"
253253

254-
bs-platform@^8.0.0:
255-
version "8.0.3"
256-
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-8.0.3.tgz#574e41ec04fee381d4c400dac547735368caa48f"
257-
integrity sha512-I7wulOPM0/NGamwm9CDh9rGjW1oIKltPwwEIOJrL8DBFRXI8OFSACtWGlpaoOw76Xpf+KcVokr00keS2NlzA3A==
254+
bs-platform@^8.2.0:
255+
version "8.3.2"
256+
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-8.3.2.tgz#c307f1cc2d2397c3d088c7f3b62e9f493283cdcf"
257+
integrity sha512-iOTi5JIlNPoCPq31NS9ET79FLyCpwTL2JZbgHz35LzY9Bch1iDtbBR3FVGhRbjphxelAP4fLlFONfUNp5Y3a5g==
258258

259259
callsites@^3.0.0:
260260
version "3.1.0"
@@ -1104,10 +1104,10 @@ readjson@^2.0.1:
11041104
dependencies:
11051105
try-catch "^3.0.0"
11061106

1107-
reason-react-native@^0.62.0:
1108-
version "0.62.0"
1109-
resolved "https://registry.yarnpkg.com/reason-react-native/-/reason-react-native-0.62.0.tgz#0f10e442a5bbb1a05124c9f595fed79673b0218a"
1110-
integrity sha512-tq13KJHk0D0otBviH9DJvejdcncxhCu8qR+AAiOWq4oQBC0cm9Zrl6+h+Wi+80pc9Cbe8KyMhcZh9N7e/X2dFA==
1107+
reason-react-native@^0.63.0:
1108+
version "0.63.0"
1109+
resolved "https://registry.yarnpkg.com/reason-react-native/-/reason-react-native-0.63.0.tgz#08de85136a41809b9a66cac066d4ea6975406000"
1110+
integrity sha512-rE1OOph5Jxceost2ahdvX+VXJ2RPNyefX9FMXa/OXgqmLKjFeZuyVOySUj41UoohOYyKmZWbgansDGccwYrdUQ==
11111111

11121112
reason-react@^0.9.0:
11131113
version "0.9.1"

0 commit comments

Comments
 (0)