From 03e09fe20d4fabd45f8bf5d3058fadab2f1aadbc Mon Sep 17 00:00:00 2001 From: Thomas Deconinck Date: Wed, 2 Aug 2023 10:38:15 +0200 Subject: [PATCH] feat: upgrade rescript version --- .node-version | 2 +- bsconfig.json | 4 +++- package.json | 18 +++++++++--------- src/ReactNativePicker.res | 12 +++++------- src/ReactNativePickerIOS.res | 12 +++++------- yarn.lock | 26 +++++++++++++------------- 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.node-version b/.node-version index 48082f7..25bf17f 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -12 +18 \ No newline at end of file diff --git a/bsconfig.json b/bsconfig.json index 62bf2ef..a1249d1 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -1,6 +1,8 @@ { "name": "@rescript-react-native/picker", - "reason": { "react-jsx": 3 }, + "jsx": { + "version": 4 + }, "package-specs": { "module": "commonjs", "in-source": true diff --git a/package.json b/package.json index 9a2467c..a0a66e8 100644 --- a/package.json +++ b/package.json @@ -27,22 +27,22 @@ "format:most": "prettier --write \"**/*.{md,json,js,css}\"", "format:re": "find . -name \"*.re\" -or -name \"*.rei\" | grep -v \"node_modules\" | xargs bsrefmt --in-place", "format": "yarn format:most && yarn format:re", - "re:start": "bsb -make-world -w", - "re:build": "bsb -make-world", - "re:clean-build": "bsb -clean-world -make-world", - "start": "yarn re:start", - "build": "yarn re:build", - "test": "yarn re:clean-build", + "res:start": "rescript build -with-deps -w", + "res:build": "rescript build -with-deps", + "res:clean-build": "rescript clean && rescript build -with-deps", + "start": "yarn res:start", + "build": "yarn res:build", + "test": "yarn res:clean-build", "release": "npmpub" }, "devDependencies": { - "bs-platform": "^9.0.0", + "@rescript/react": "^0.11.0", "husky": "^4.0.0", "lint-staged": "^10.0.0", "npmpub": "^5.0.0", "prettier": "^2.0.0", - "@rescript/react": "^0.10.0", - "rescript-react-native": "^0.64.3" + "rescript": "^10.1.4", + "rescript-react-native": "^0.71.1" }, "prettier": { "trailingComma": "all" diff --git a/src/ReactNativePicker.res b/src/ReactNativePicker.res index f43e1c2..ed36c6e 100644 --- a/src/ReactNativePicker.res +++ b/src/ReactNativePicker.res @@ -29,12 +29,11 @@ external make: ( ~accessible: bool=?, ~collapsable: bool=?, ~hitSlop: View.edgeInsets=?, - ~importantForAccessibility: @string - [ + ~importantForAccessibility: [ | #auto | #yes | #no - | @as("no-hide-descendants") #noHideDescendants + | #"no-hide-descendants" ]=?, ~nativeID: string=?, ~needsOffscreenAlphaCompositing: bool=?, @@ -56,12 +55,11 @@ external make: ( ~onResponderTerminationRequest: Event.pressEvent => bool=?, ~onStartShouldSetResponder: Event.pressEvent => bool=?, ~onStartShouldSetResponderCapture: Event.pressEvent => bool=?, - ~pointerEvents: @string - [ + ~pointerEvents: [ | #auto | #none - | @as("box-none") #boxNone - | @as("box-only") #boxOnly + | #"box-none" + | #"box-only" ]=?, ~removeClippedSubviews: bool=?, ~renderToHardwareTextureAndroid: bool=?, diff --git a/src/ReactNativePickerIOS.res b/src/ReactNativePickerIOS.res index 53766a0..ddd0ae8 100644 --- a/src/ReactNativePickerIOS.res +++ b/src/ReactNativePickerIOS.res @@ -22,12 +22,11 @@ external make: ( ~accessible: bool=?, ~collapsable: bool=?, ~hitSlop: View.edgeInsets=?, - ~importantForAccessibility: @string - [ + ~importantForAccessibility: [ | #auto | #yes | #no - | @as("no-hide-descendants") #noHideDescendants + | #"no-hide-descendants" ]=?, ~nativeID: string=?, ~needsOffscreenAlphaCompositing: bool=?, @@ -49,12 +48,11 @@ external make: ( ~onResponderTerminationRequest: Event.pressEvent => bool=?, ~onStartShouldSetResponder: Event.pressEvent => bool=?, ~onStartShouldSetResponderCapture: Event.pressEvent => bool=?, - ~pointerEvents: @string - [ + ~pointerEvents: [ | #auto | #none - | @as("box-none") #boxNone - | @as("box-only") #boxOnly + | #"box-none" + | #"box-only" ]=?, ~removeClippedSubviews: bool=?, ~renderToHardwareTextureAndroid: bool=?, diff --git a/yarn.lock b/yarn.lock index 5e5900a..130ce85 100644 --- a/yarn.lock +++ b/yarn.lock @@ -120,10 +120,10 @@ dependencies: "@types/node" ">= 8" -"@rescript/react@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@rescript/react/-/react-0.10.2.tgz#170d2a5ff34ad09cd614d92467d5efad95202794" - integrity sha512-Qe21P4WnrmrbhbEMQ4dpaXC1/iMMc7JmqjuSpZouSP+s41K5dCXUGY9sds30gajU74lSfJdG2PzSDYcNAcDyVA== +"@rescript/react@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@rescript/react/-/react-0.11.0.tgz#d2545546d823bdb8e6b59daa1790098d1666f79e" + integrity sha512-RzoAO+3cJwXE2D7yodMo4tBO2EkeDYCN/I/Sj/yRweI3S1CY1ZBOF/GMcVtjeIurJJt7KMveqQXTaRrqoGZBBg== "@sindresorhus/df@^1.0.1": version "1.0.1" @@ -256,11 +256,6 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -bs-platform@^9.0.0: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-9.0.2.tgz#a6eac70eb8924a322556dacaccbfbc9b2a0d3a37" - integrity sha512-Ye9JqJ4Oa7mcjjoOVRYI8Uc2Cf8N7jQLWDcdUplY7996d/YErSR7WitmV7XnSwr4EvdrbwjEsg1NxNjUQv3ChA== - callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1116,10 +1111,15 @@ readjson@^2.0.1: dependencies: try-catch "^3.0.0" -rescript-react-native@^0.64.3: - version "0.64.3" - resolved "https://registry.yarnpkg.com/rescript-react-native/-/rescript-react-native-0.64.3.tgz#8fd11a2681cfdd65c02f0ff620186e5adf0c6854" - integrity sha512-PjGDkV3RYiCTk4hCZyaKtZJV69By0AmJuzWyuHZONdeCB0q3DwjVJtA73gu6+jBrdl0OWon6UdXaVRXhhR47cQ== +rescript-react-native@^0.71.1: + version "0.71.1" + resolved "https://registry.yarnpkg.com/rescript-react-native/-/rescript-react-native-0.71.1.tgz#f0fdffa65c49ca0bdd79697899da4a70a2921b1a" + integrity sha512-EpFSC1IAwrdIzhpvrnBx3sXooUfWL++HSv2f8t0OViWaxfuReA60kc7KBKBQ9s4HWijN4QW/H+FU/I/WmdoIdA== + +rescript@^10.1.4: + version "10.1.4" + resolved "https://registry.yarnpkg.com/rescript/-/rescript-10.1.4.tgz#0f37710d371f32a704f17b4e804f66ce3c79a305" + integrity sha512-FFKlS9AG/XrLepWsyw7B+A9DtQBPWEPDPDKghV831Y2KGbie+eeFBOS0xtRHp0xbt7S0N2Dm6hhX+kTZQ/3Ybg== resolve-from@^4.0.0: version "4.0.0"