Skip to content

Commit

Permalink
chore: upgrade bucklescript & reason-react-native
Browse files Browse the repository at this point in the history
  • Loading branch information
cem2ran committed Apr 14, 2020
1 parent 65c49e4 commit 461948e
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 70 deletions.
10 changes: 3 additions & 7 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
"reason": {
"react-jsx": 3
},
"bsc-flags": [
"-bs-super-errors"
],
"bsc-flags": ["-bs-super-errors"],
"bs-dependencies": [
"reason-apollo",
"reason-apollo-hooks",
"reason-react",
"reason-react-native",
"reason-expo",
"@reason-react-native/navigation",
],
"ppx-flags": [
"graphql_ppx/ppx"
"@reason-react-native/navigation"
],
"ppx-flags": ["@baransu/graphql_ppx_re/ppx"],
"sources": [
{
"dir": "src",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
}
},
"dependencies": {
"@baransu/graphql_ppx_re": "0.7.1",
"@react-native-community/masked-view": "^0.1.1",
"@react-navigation/core": "^5.0.0-alpha.16",
"@react-navigation/native": "^5.0.0-alpha.12",
"@react-navigation/stack": "^5.0.0-alpha.27",
"@reason-react-native/navigation": "cem2ran/reason-react-navigation#259ba467c0bf1acac0bd4036755175e398ffda12",
"apollo-boost": "^0.4.4",
"bs-fetch": "^0.5.0",
"bs-platform": "5.2.0",
"bs-platform": "7.2.2",
"expo": "^35.0.0",
"expo-linear-gradient": "~7.0.0",
"graphql": "^14.5.3",
"graphql-tag": "^2.10.1",
"graphql-tools": "^4.0.5",
"graphql_ppx": "^0.2.8",
"react": "16.8.3",
"react-apollo": "^3.1.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
Expand All @@ -51,7 +51,7 @@
"reason-apollo-hooks": "2.5.1",
"reason-expo": "^34.0.0",
"reason-react": "^0.7.0",
"reason-react-native": "^0.60.0"
"reason-react-native": "reason-react-native/reason-react-native#0127d40f58600cd3aa21fbd06b52deeab03d76ce"
},
"devDependencies": {
"@storybook/react-native": "4.2.0-alpha.7",
Expand All @@ -60,7 +60,7 @@
"babel-preset-expo": "^7.0.0",
"expo-cli": "^3.4.1",
"faker": "^4.1.0",
"gentype": "^2.41.0",
"gentype": "^3.21.0",
"now": "^16.3.1",
"npm-run-all": "^4.1.5",
"patch-package": "^6.2.0",
Expand Down
49 changes: 48 additions & 1 deletion patches/reason-apollo+0.17.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ index 719dbb9..3a59e57 100644

type apolloOptions = {
diff --git a/node_modules/reason-apollo/src/graphql-types/ReasonApolloMutation.re b/node_modules/reason-apollo/src/graphql-types/ReasonApolloMutation.re
index dca7636..cdeafe3 100644
index dca7636..838870f 100644
--- a/node_modules/reason-apollo/src/graphql-types/ReasonApolloMutation.re
+++ b/node_modules/reason-apollo/src/graphql-types/ReasonApolloMutation.re
@@ -55,8 +55,8 @@ module Make = (Config: Config) => {
Expand All @@ -90,3 +90,50 @@ index dca7636..cdeafe3 100644
| (None, None) => EmptyResponse
};

@@ -135,7 +135,7 @@ module Make = (Config: Config) => {
~onCompleted: option(unit => unit)=?,
~children: (apolloMutation, renderPropObj) => React.element,
) =>
- <JsMutation mutation=graphqlMutationAST variables onError onCompleted>
+ <JsMutation mutation=graphqlMutationAST ?variables ?onError ?onCompleted>
{(mutation, apolloData) =>
children(
apolloMutationFactory(~jsMutation=mutation),
diff --git a/node_modules/reason-apollo/src/graphql-types/ReasonApolloQuery.re b/node_modules/reason-apollo/src/graphql-types/ReasonApolloQuery.re
index ce99f0e..fd1b482 100644
--- a/node_modules/reason-apollo/src/graphql-types/ReasonApolloQuery.re
+++ b/node_modules/reason-apollo/src/graphql-types/ReasonApolloQuery.re
@@ -182,19 +182,19 @@ module Make = (Config: ReasonApolloTypes.Config) => {
) =>
<JsQuery
query=graphqlQueryAST
- variables
- pollInterval
- notifyOnNetworkStatusChange
- fetchPolicy
- errorPolicy
- ssr
- displayName
- skip
- onCompleted
- onError
- partialRefetch
- delay
- context>
+ ?variables
+ ?pollInterval
+ ?notifyOnNetworkStatusChange
+ ?fetchPolicy
+ ?errorPolicy
+ ?ssr
+ ?displayName
+ ?skip
+ ?onCompleted
+ ?onError
+ ?partialRefetch
+ ?delay
+ ?context>
{apolloData => apolloData |> convertJsInputToReason |> children}
</JsQuery>;
};
\ No newline at end of file
2 changes: 1 addition & 1 deletion patches/reason-apollo-hooks+2.5.1.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/reason-apollo-hooks/src/Mutation.re b/node_modules/reason-apollo-hooks/src/Mutation.re
index aa6e228..1b0f19a 100644
index aa6e228..f5e78cd 100644
--- a/node_modules/reason-apollo-hooks/src/Mutation.re
+++ b/node_modules/reason-apollo-hooks/src/Mutation.re
@@ -4,19 +4,31 @@ module type Config = {
Expand Down
4 changes: 3 additions & 1 deletion src/App.gen.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Post/Post.gen.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Post/Post.re
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open PostData;

let window = Dimensions.get(`window);

let width = window##width;
let width = window.width;

[@react.component]
let make = (~navigation, ~route: Navigation.route) => {
Expand Down
4 changes: 3 additions & 1 deletion src/Profile/Profile.gen.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Profile/components/PhotoGrid.re
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ let keyExtractor = (item, _index) => item##id;

let window = Dimensions.get(`window);

let width = window##width /. 3.;
let width = window.width /. 3.;

let renderItem = (onPress, data) =>
<TouchableWithoutFeedback onPress={_ => onPress(data##item##id)}>
let renderItem = (onPress, data: VirtualizedList.renderItemProps('item)) =>
<TouchableWithoutFeedback onPress={_ => onPress(data.item##id)}>
<Image
key={data##item##id}
key={data.item##id}
source=Image.(
Source.fromUriSource(
uriSource(~uri=data##item##urls##small, ~width, ~height=width, ()),
uriSource(~uri=data.item##urls##small, ~width, ~height=width, ()),
)
)
/>
Expand Down
4 changes: 3 additions & 1 deletion src/Profile/components/Posts.gen.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 18 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,11 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@baransu/[email protected]":
version "0.7.1"
resolved "https://registry.yarnpkg.com/@baransu/graphql_ppx_re/-/graphql_ppx_re-0.7.1.tgz#8146a36a94d56e65692d74488e2bd6cbd4eb8dc9"
integrity sha512-S9RYUWk8IkFxjE1Xl5eohRgbHJP5nCWOD6J1hMV3hY+D43igDrILq1doAXJatYB82BxcsrBC9V+VeU2LtCxIDw==

"@emotion/cache@^0.8.8":
version "0.8.8"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-0.8.8.tgz#2c3bd1aa5fdb88f1cc2325176a3f3201739e726c"
Expand Down Expand Up @@ -4294,10 +4299,10 @@ bs-fetch@^0.5.0:
resolved "https://registry.yarnpkg.com/bs-fetch/-/bs-fetch-0.5.0.tgz#6913b1d1ddfa0b0a4b832357854e9763d61d4b28"
integrity sha512-cGjwRpyNcIaX+p2ssy/38zs7BM/miKNgmOR3NEhxKFete5mR05JcvjuV4raG89oGCG281SU1b56TTAKmf9VCug==

bs-platform@5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-5.2.0.tgz#0ec317273daed573491c105f68ea48826a285b7a"
integrity sha512-miyePsOF9VbuhT5QD5E/hb+l454Fo4MAcg5xV1GJhbWxmejuF/X7mCYUsNrK1UUAaYt8hnoyFdeLG22sxVta9A==
bs-platform@7.2.2:
version "7.2.2"
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.2.2.tgz#76fdc63e4889458ae3d257a0132107a792f2309c"
integrity sha512-PWcFfN+jCTtT/rMaHDhKh+W9RUTpaRunmSF9vbLYcrJbpgCNW6aFKAY33u0P3mLxwuhshN3b4FxqGUBPj6exZQ==

bser@^2.0.0:
version "2.1.0"
Expand Down Expand Up @@ -7133,10 +7138,10 @@ genfun@^5.0.0:
resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==

gentype@^2.41.0:
version "2.41.0"
resolved "https://registry.yarnpkg.com/gentype/-/gentype-2.41.0.tgz#91134f99cd7733ba30d5b4a2126090d0fc6c267a"
integrity sha512-A2VSceEIas+Sk5Pv5EV3LoomdA4NsZ3ZLBfeOYiSG/IZeIZqjgv5zfDzxU/ZNqud8GULdQl7eTIJXObj3O5lrQ==
gentype@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/gentype/-/gentype-3.21.0.tgz#01ce0ee769326bb4a1249ab0b61ef6f5eaa2324a"
integrity sha512-RqDvC9LkoWjdus3Z8x1UVpJD0+INSHVmYFXanzBhbNhya75wI+zVwxdORIrqK8Tuiyhj0eetPWVgqhU9wo17+w==

get-caller-file@^1.0.1:
version "1.0.3"
Expand Down Expand Up @@ -7506,14 +7511,6 @@ graphql@^14.0.2, graphql@^14.5.3:
dependencies:
iterall "^1.2.2"

graphql_ppx@^0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/graphql_ppx/-/graphql_ppx-0.2.8.tgz#2f057a69b3131b95cf4cd9ce1e53eb722e6d8baa"
integrity sha512-3MyMo5Kt1sKKc6JRQgrgz0FF23roFPiffaIVKMfJ/n3qxZ38L2qUrF2oUkyrgPfRAtDJUxAcshR6+q9LJAiZKA==
dependencies:
request "^2.82.0"
yargs "^11.0.0"

growly@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
Expand Down Expand Up @@ -10632,7 +10629,7 @@ os-locale@^2.0.0:
lcid "^1.0.0"
mem "^1.1.0"

os-locale@^3.0.0, os-locale@^3.1.0:
os-locale@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==
Expand Down Expand Up @@ -12410,10 +12407,9 @@ reason-expo@^34.0.0:
resolved "https://registry.yarnpkg.com/reason-expo/-/reason-expo-34.3.2.tgz#c3ed04c5e07c53c79af98e108b4ba1aa439de11d"
integrity sha512-BhMocmNZVYWYd11c8Nzr8eMFUDyH6fR8G60VaStreDF+1zsRyYbslIJF1+1gCySIbnVV6eBtIa7VATQUhBgCBQ==

reason-react-native@^0.60.0:
version "0.60.0"
resolved "https://registry.yarnpkg.com/reason-react-native/-/reason-react-native-0.60.0.tgz#7adb9837f28d79d9f1e009b5d01ae864aff15d51"
integrity sha512-7vq7KIaY1kGb5xnWVewuy8ttBx7/HAgeKfiwDYV3rij6Z89vU6QIheR6rENV8UxaKwRN/Gw168ladWLM042k9A==
reason-react-native@reason-react-native/reason-react-native#0127d40f58600cd3aa21fbd06b52deeab03d76ce:
version "0.61.1"
resolved "https://codeload.github.com/reason-react-native/reason-react-native/tar.gz/0127d40f58600cd3aa21fbd06b52deeab03d76ce"

reason-react@^0.7.0:
version "0.7.0"
Expand Down Expand Up @@ -12666,7 +12662,7 @@ [email protected]:
stealthy-require "^1.1.0"
tough-cookie ">=2.3.3"

[email protected], request@^2.81.0, request@^2.82.0, request@^2.83.0, request@^2.88.0:
[email protected], request@^2.81.0, request@^2.83.0, request@^2.88.0:
version "2.88.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
Expand Down Expand Up @@ -15294,13 +15290,6 @@ yargs-parser@^7.0.0:
dependencies:
camelcase "^4.1.0"

yargs-parser@^9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=
dependencies:
camelcase "^4.1.0"

[email protected]:
version "12.0.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc"
Expand Down Expand Up @@ -15337,24 +15326,6 @@ [email protected]:
y18n "^3.2.1 || ^4.0.0"
yargs-parser "^11.1.1"

yargs@^11.0.0:
version "11.1.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.1.tgz#5052efe3446a4df5ed669c995886cc0f13702766"
integrity sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==
dependencies:
cliui "^4.0.0"
decamelize "^1.1.1"
find-up "^2.1.0"
get-caller-file "^1.0.1"
os-locale "^3.1.0"
require-directory "^2.1.1"
require-main-filename "^1.0.1"
set-blocking "^2.0.0"
string-width "^2.0.0"
which-module "^2.0.0"
y18n "^3.2.1"
yargs-parser "^9.0.2"

yargs@^14.0.0:
version "14.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.0.tgz#f116a9242c4ed8668790b40759b4906c276e76c3"
Expand Down

0 comments on commit 461948e

Please sign in to comment.