Skip to content

Commit 01caa1a

Browse files
Merge pull request #105 from PascalHonegger/update-dependencies
Update dependencies
2 parents dcd2de6 + 7cb45e0 commit 01caa1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+493
-566
lines changed

Diff for: .github/workflows/nodejs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [18.x]
18+
node-version: [22]
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626
- run: npm ci

Diff for: .gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ yarn-error.log*
2929
.merlin
3030
/lib
3131
.bsb.lock
32-
*.bs.js
33-
!**/__mocks__/*.bs.js
32+
*.res.js
33+
!**/__mocks__/*.res.js
3434
_esy/
3535
*.cmt
3636

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.10
1+
22.11

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Coronate is free software, but you're welcome to show your appreciation.
4747

4848
## Development
4949

50-
You will need to install [Node.js] version 18. Coronate might run on other
50+
You will need to install [Node.js] version 22. Coronate might run on other
5151
versions too, but it's not tested on them.
5252

5353
[node.js]: https://nodejs.org/

Diff for: __tests__/Match_test.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ JestDom.init()
1313

1414
test("Ratings are updated correctly after a match.", () => {
1515
let page = render(
16-
<LoadTournament tourneyId=TestData.simplePairing.id>
16+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
1717
{tournament => <PageRound tournament roundId=1 />}
1818
</LoadTournament>,
1919
)

Diff for: __tests__/PagePlayers_test.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ open FireEvent
1212

1313
JestDom.init()
1414

15-
open Belt
15+
open! Belt
1616

1717
module Profile = {
1818
@react.component

Diff for: __tests__/PageTournamentPlayers_test.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open ReactTestingLibrary
1111
test("Deleted players do not crash the bye queue.", () => {
1212
let page = () =>
1313
render(
14-
<LoadTournament tourneyId=TestData.deletedPlayerTourney.id>
14+
<LoadTournament tourneyId=TestData.deletedPlayerTourney.id windowDispatch=None>
1515
{tournament => <PageTourneyPlayers tournament />}
1616
</LoadTournament>,
1717
)

Diff for: __tests__/Pairing_test.res

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
License, v. 2.0. If a copy of the MPL was not distributed with this
66
file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
*/
8-
open Belt
8+
open! Belt
99
open Jest
1010

1111
let players = TestData.players
@@ -47,7 +47,7 @@ describe("The lowest-ranking player is automatically picked for byes.", () => {
4747
)
4848
test("The lowest-ranking player is returned", () =>
4949
switch byedPlayer {
50-
| None => assert false
50+
| None => assert(false)
5151
| Some(player) => expect(Data.Pairing.id(player))->toBe(TestData.newbieMcNewberson.id)
5252
}
5353
)
@@ -59,7 +59,7 @@ test("The bye signup queue works", () => {
5959
// Newbie McNewberson already played the first bye round
6060
let (_, byedPlayer) = Data.Pairing.setByePlayer(byeQueue, Data.Id.dummy, dataPreBye)
6161
switch byedPlayer {
62-
| None => assert false
62+
| None => assert(false)
6363
| Some(player) => expect(Data.Pairing.id(player))->toBe(TestData.joelRobinson.id)
6464
}
6565
})
@@ -69,7 +69,7 @@ test(
6969
let dataPreBye = loadPairData(TestData.byeRoundTourney3)
7070
let (_, byedPlayer) = Data.Pairing.setByePlayer([], Data.Id.dummy, dataPreBye)
7171
switch byedPlayer {
72-
| None => assert false
72+
| None => assert(false)
7373
| Some(player) => expect(Data.Pairing.id(player))->toBe(TestData.newbieMcNewberson.id)
7474
}
7575
},
@@ -105,7 +105,7 @@ JestDom.init()
105105
/* This is quick-and-dirty and fragile. */
106106
test("Players are paired correctly after a draw (more complex).", () => {
107107
let page = render(
108-
<LoadTournament tourneyId={Data.Id.fromString("complex-bye-rounds---")}>
108+
<LoadTournament tourneyId={Data.Id.fromString("complex-bye-rounds---")} windowDispatch=None>
109109
{tournament => <PageRound tournament roundId=4 />}
110110
</LoadTournament>,
111111
)
@@ -116,7 +116,7 @@ test("Players are paired correctly after a draw (more complex).", () => {
116116

117117
test("Auto-matching with bye players works", () => {
118118
let page = render(
119-
<LoadTournament tourneyId=TestData.byeRoundTourney.id>
119+
<LoadTournament tourneyId=TestData.byeRoundTourney.id windowDispatch=None>
120120
{tournament => <PageRound tournament roundId=0 />}
121121
</LoadTournament>,
122122
)
@@ -129,7 +129,7 @@ test("Auto-matching with bye players works", () => {
129129
test("Auto-matching works with manually adjusted scores", () => {
130130
/* This isn't ideal but routing isn't working for tests I think. */
131131
let page = render(
132-
<LoadTournament tourneyId=TestData.scoreTest.id>
132+
<LoadTournament tourneyId=TestData.scoreTest.id windowDispatch=None>
133133
{tournament => <>
134134
<PageTourneyPlayers tournament />
135135
<PageRound tournament roundId=3 />
@@ -161,7 +161,7 @@ test("Auto-matching works with manually adjusted scores", () => {
161161
describe("Manually pairing and byes.", () => {
162162
test("Pairing players does not automatically pre-select the winner.", () => {
163163
let page = render(
164-
<LoadTournament tourneyId=TestData.byeRoundTourney.id>
164+
<LoadTournament tourneyId=TestData.byeRoundTourney.id windowDispatch=None>
165165
{tournament => <PageRound tournament roundId=0 />}
166166
</LoadTournament>,
167167
)
@@ -175,7 +175,7 @@ describe("Manually pairing and byes.", () => {
175175

176176
test("Pairing with a bye player automatically pre-selects the winner.", () => {
177177
let page = render(
178-
<LoadTournament tourneyId=TestData.byeRoundTourney.id>
178+
<LoadTournament tourneyId=TestData.byeRoundTourney.id windowDispatch=None>
179179
{tournament => <PageRound tournament roundId=0 />}
180180
</LoadTournament>,
181181
)
@@ -189,7 +189,7 @@ describe("Manually pairing and byes.", () => {
189189

190190
test("Un-pairing a bye player automatically un-pre-selects the winner.", () => {
191191
let page = render(
192-
<LoadTournament tourneyId=TestData.byeRoundTourney.id>
192+
<LoadTournament tourneyId=TestData.byeRoundTourney.id windowDispatch=None>
193193
{tournament => <PageRound tournament roundId=0 />}
194194
</LoadTournament>,
195195
)

Diff for: __tests__/RoundPanels_test.res

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ JestDom.init()
1515
describe("Tabs auto-change correctly.", () => {
1616
test("When no players are matched, it defaults to the pair-picker", () => {
1717
let page = render(
18-
<LoadTournament tourneyId=TestData.simplePairing.id>
18+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
1919
{tournament => <PageRound tournament roundId=1 />}
2020
</LoadTournament>,
2121
)
@@ -25,7 +25,7 @@ describe("Tabs auto-change correctly.", () => {
2525

2626
test("Tab doesn't change focus if there are still players to be matched.", () => {
2727
let page = render(
28-
<LoadTournament tourneyId=TestData.simplePairing.id>
28+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
2929
{tournament => <PageRound tournament roundId=1 />}
3030
</LoadTournament>,
3131
)
@@ -38,7 +38,7 @@ describe("Tabs auto-change correctly.", () => {
3838

3939
test("The tab selection doesn't change if there are still matched players", () => {
4040
let page = render(
41-
<LoadTournament tourneyId=TestData.simplePairing.id>
41+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
4242
{tournament => <PageRound tournament roundId=1 />}
4343
</LoadTournament>,
4444
)
@@ -57,7 +57,7 @@ describe("Tabs auto-change correctly.", () => {
5757

5858
test("The tab selection changes when all players have been unmatched", () => {
5959
let page = render(
60-
<LoadTournament tourneyId=TestData.simplePairing.id>
60+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
6161
{tournament => <PageRound tournament roundId=1 />}
6262
</LoadTournament>,
6363
)
@@ -71,7 +71,7 @@ describe("Tabs auto-change correctly.", () => {
7171

7272
test("The tab selection changes when all players have been paired", () => {
7373
let page = render(
74-
<LoadTournament tourneyId=TestData.simplePairing.id>
74+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
7575
{tournament => <PageRound tournament roundId=1 />}
7676
</LoadTournament>,
7777
)
@@ -86,7 +86,7 @@ describe("Tabs auto-change correctly.", () => {
8686
test("Matches with deleted players don't crash when edited.", () => {
8787
let page = () =>
8888
render(
89-
<LoadTournament tourneyId=TestData.deletedPlayerTourney.id>
89+
<LoadTournament tourneyId=TestData.deletedPlayerTourney.id windowDispatch=None>
9090
{tournament => <PageRound tournament roundId=0 />}
9191
</LoadTournament>,
9292
)

Diff for: __tests__/Scoring_test.res

+11-9
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ test("K Factor is calculated correctly", () => {
2222
})
2323

2424
test("Ratings are calculated correctly", () => {
25-
let calcRatingsForPair = Data.Ratings.calcNewRatings(
26-
~whiteRating=newb.rating,
27-
~blackRating=master.rating,
28-
~whiteMatchCount=newb.matchCount,
29-
~blackMatchCount=master.matchCount,
30-
)
25+
let calcRatingsForPair =
26+
Data.Ratings.calcNewRatings(
27+
~whiteRating=newb.rating,
28+
~blackRating=master.rating,
29+
~whiteMatchCount=newb.matchCount,
30+
~blackMatchCount=master.matchCount,
31+
...
32+
)
3133
let newbWon = calcRatingsForPair(~result=Data.Match.Result.WhiteWon)
3234
// not really a good example for this next one because they don't change:
3335
let masterWon = calcRatingsForPair(~result=Data.Match.Result.BlackWon)
@@ -55,7 +57,7 @@ open ReactTestingLibrary
5557
open JestDom
5658

5759
let scorePage = (~id) =>
58-
<LoadTournament tourneyId=id>
60+
<LoadTournament tourneyId=id windowDispatch=None>
5961
{({tourney: {name: title, _} as tourney, getPlayer, _}) =>
6062
<PageTourneyScores.ScoreTable size=Expanded tourney getPlayer title />}
6163
</LoadTournament>->render
@@ -90,7 +92,7 @@ open FireEvent
9092
test("Manually adjusting scores works", () => {
9193
/* This isn't ideal but routing isn't working for tests I think. */
9294
let page = render(
93-
<LoadTournament tourneyId=TestData.scoreTest.id>
95+
<LoadTournament tourneyId=TestData.scoreTest.id windowDispatch=None>
9496
{tournament => <>
9597
<PageTourneyPlayers tournament />
9698
<PageTourneyScores tournament />
@@ -111,7 +113,7 @@ test("Manually adjusting scores works", () => {
111113

112114
test("Pairing players twice displays the correct history", () => {
113115
let page = render(
114-
<LoadTournament tourneyId=TestData.simplePairing.id>
116+
<LoadTournament tourneyId=TestData.simplePairing.id windowDispatch=None>
115117
{tournament => <PageRound tournament roundId=1 />}
116118
</LoadTournament>,
117119
)

0 commit comments

Comments
 (0)