Skip to content

Commit 95a8610

Browse files
committed
update rescript to v12-beta.11, fix monorepo setup
1 parent f6ea0cb commit 95a8610

File tree

18 files changed

+118
-90
lines changed

18 files changed

+118
-90
lines changed

.changeset/silver-windows-beg.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@rescript-relay-router-example/client-rendering": patch
3+
"@rescript-relay-router-example/express": patch
4+
"rescript-relay-router": patch
5+
"@rescript-relay-router/test-utils": patch
6+
---
7+
8+
update rescript to v12-beta.11, fix the monorepo setup to use rewatch

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
yarn install --immutable
3535
- name: Format ReScript
3636
run: |
37-
yarn workspaces foreach run rescript format -all
37+
yarn rescript format
3838
- name: Build all projects
3939
run: |
4040
yarn build

examples/client-rendering/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"@remix-run/web-fetch": "^4.1.3",
27-
"@rescript/react": "0.13.0",
27+
"@rescript/react": "0.14.0",
2828
"@testing-library/dom": "^10.4.0",
2929
"@testing-library/react": "^16.1.0",
3030
"@vitejs/plugin-react-refresh": "1.3.6",
@@ -44,7 +44,7 @@
4444
"react-dom": "^18.2.0",
4545
"react-relay": "17.0.0",
4646
"relay-runtime": "17.0.0",
47-
"rescript": "12.0.0-alpha.13",
47+
"rescript": "12.0.0-beta.11",
4848
"rescript-relay": "3.0.0",
4949
"rollup": "^2",
5050
"rollup-plugin-visualizer": "5.5.0",

examples/client-rendering/rescript.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2-
"name": "main",
3-
"uncurried": true,
2+
"name": "@rescript-relay-router-example/client-rendering",
43
"jsx": {
5-
"version": 4,
6-
"mode": "automatic"
4+
"version": 4
75
},
6+
"namespace": true,
87
"version": "0.1.0",
98
"sources": [
109
{
@@ -25,12 +24,10 @@
2524
],
2625
"suffix": ".res.mjs",
2726
"ppx-flags": [["rescript-relay/ppx", "-uncurried"]],
28-
"bs-dependencies": [
27+
"dependencies": [
2928
"@rescript/react",
3029
"rescript-relay",
3130
"rescript-relay-router"
3231
],
33-
"bs-dev-dependencies": ["@rescript-relay-router/test-utils"],
34-
"bsc-flags": [],
35-
"pinned-dependencies": ["rescript-relay-router"]
32+
"dev-dependencies": ["@rescript-relay-router/test-utils"]
3633
}

examples/client-rendering/src/components/Layout.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let make = (~queryRef, ~children) => {
1212

1313
<div>
1414
<h1> {React.string("My fine site")} </h1>
15-
<div style={ReactDOM.Style.make(~display="flex", ~flexDirection="row", ())}>
15+
<div style={{display: "flex", flexDirection: "row"}}>
1616
{links
1717
->Array.map(((label, link)) =>
1818
<RelayRouter.Link key=label to_=link> {React.string(label)} </RelayRouter.Link>

examples/client-rendering/src/components/SingleTodoDisplay.res

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ let make = (~todo) => {
4646
},
4747
},
4848
)
49-
}}>
49+
}}
50+
>
5051
{React.string(completed ? "Uncomplete" : "Complete")}
5152
</button>
5253
} else {
@@ -64,7 +65,8 @@ let make = (~todo) => {
6465
})
6566
},
6667
)
67-
}}>
68+
}}
69+
>
6870
{React.string("Show more")}
6971
</button>
7072
}}

examples/express/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"@remix-run/web-fetch": "^4.1.3",
31-
"@rescript/react": "0.13.0",
31+
"@rescript/react": "0.14.0",
3232
"@vitejs/plugin-react-refresh": "1.3.3",
3333
"chalk": "^5.0.1",
3434
"chokidar": "^3.5.3",
@@ -46,7 +46,7 @@
4646
"react-dom": "^18.2.0",
4747
"react-relay": "17.0.0",
4848
"relay-runtime": "17.0.0",
49-
"rescript": "12.0.0-alpha.13",
49+
"rescript": "12.0.0-beta.11",
5050
"rescript-relay": "3.0.0",
5151
"rollup": "^2",
5252
"rollup-plugin-visualizer": "5.5.0",

examples/express/rescript.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2-
"name": "main",
3-
"uncurried": true,
2+
"name": "@rescript-relay-router-example/express",
43
"jsx": {
5-
"version": 4,
6-
"mode": "automatic"
4+
"version": 4
75
},
6+
"namespace": true,
87
"version": "0.1.0",
98
"sources": [
109
{
@@ -21,11 +20,5 @@
2120
],
2221
"suffix": ".res.mjs",
2322
"ppx-flags": [["rescript-relay/ppx", "-uncurried"]],
24-
"bs-dependencies": [
25-
"@rescript/react",
26-
"rescript-relay",
27-
"rescript-relay-router"
28-
],
29-
"bsc-flags": [],
30-
"pinned-dependencies": ["rescript-relay-router"]
23+
"dependencies": ["@rescript/react", "rescript-relay", "rescript-relay-router"]
3124
}

examples/express/src/components/Layout.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let make = (~queryRef, ~children) => {
1212

1313
<div>
1414
<h1> {React.string("My fine site")} </h1>
15-
<div style={ReactDOM.Style.make(~display="flex", ~flexDirection="row", ())}>
15+
<div style={{display: "flex", flexDirection: "row"}}>
1616
{links
1717
->Array.map(((label, link)) =>
1818
<RelayRouter.Link key=label to_=link> {React.string(label)} </RelayRouter.Link>

examples/express/src/components/SingleTodoDisplay.res

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ let make = (~todo) => {
4646
},
4747
},
4848
)
49-
}}>
49+
}}
50+
>
5051
{React.string(completed ? "Uncomplete" : "Complete")}
5152
</button>
5253
} else {
@@ -64,7 +65,8 @@ let make = (~todo) => {
6465
})
6566
},
6667
)
67-
}}>
68+
}}
69+
>
6870
{React.string("Show more")}
6971
</button>
7072
}}

0 commit comments

Comments
 (0)