Skip to content

Commit b6cd68a

Browse files
committed
Merge branch 'master' into solid-presets
2 parents f65071e + ba8c39c commit b6cd68a

196 files changed

Lines changed: 19276 additions & 8710 deletions

File tree

Some content is hidden

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

.github/workflows/fix-formatting.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
version: ${{ env.PNPM_VERSION }}
3535

3636
- name: Install formatter
37-
run: pnpm install -D -w oxfmt
37+
run: pnpm install -D -w oxfmt --ignore-scripts
3838

3939
- name: Get changed files
4040
id: get-changed-files
@@ -52,10 +52,11 @@ jobs:
5252
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');
5353
5454
- name: Fix formatting
55+
env:
56+
CHANGED_FILES: ${{ steps.get-changed-files.outputs.result }}
5557
run: |
56-
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
5758
if [ -n "$CHANGED_FILES" ]; then
58-
pnpm oxfmt $CHANGED_FILES --no-error-on-unmatched-pattern
59+
echo "$CHANGED_FILES" | tr ' ' '\n' | xargs pnpm oxfmt --no-error-on-unmatched-pattern
5960
fi
6061
6162
- name: Commit changes

.github/workflows/monkey-ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
should-build-be: ${{ steps.export-changes.outputs.should-build-be }}
2929
should-build-fe: ${{ steps.export-changes.outputs.should-build-fe }}
3030
should-build-pkg: ${{ steps.export-changes.outputs.should-build-pkg }}
31-
assets-json: ${{ steps.export-changes.outputs.assets-json }}
31+
assets-or-styles: ${{ steps.export-changes.outputs.assets-or-styles }}
3232

3333
steps:
3434
- name: Full checkout
@@ -41,8 +41,9 @@ jobs:
4141
id: filter
4242
with:
4343
filters: |
44-
json:
44+
assets-or-styles:
4545
- 'frontend/static/**/*'
46+
- '**/*.{scss,css}'
4647
be-src:
4748
- 'backend/**/*.{ts,js,json,lua,css,html}'
4849
- 'backend/package.json'
@@ -64,13 +65,13 @@ jobs:
6465
echo "should-build-pkg=${{ steps.filter.outputs.pkg-src }}" >> $GITHUB_OUTPUT
6566
echo "should-build-be=${{ steps.filter.outputs.be-src }}" >> $GITHUB_OUTPUT
6667
echo "should-build-fe=${{ steps.filter.outputs.fe-src }}" >> $GITHUB_OUTPUT
67-
echo "assets-json=${{ steps.filter.outputs.json }}" >> $GITHUB_OUTPUT
68+
echo "assets-or-styles=${{ steps.filter.outputs.assets-or-styles }}" >> $GITHUB_OUTPUT
6869
6970
prime-cache:
7071
name: prime-cache
7172
runs-on: ubuntu-latest
7273
needs: [pre-ci]
73-
if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
74+
if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-or-styles == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
7475
steps:
7576
- name: Checkout pnpm-lock
7677
uses: actions/checkout@v4
@@ -216,7 +217,7 @@ jobs:
216217
name: ci-assets
217218
needs: [pre-ci, prime-cache]
218219
runs-on: ubuntu-latest
219-
if: needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
220+
if: needs.pre-ci.outputs.assets-or-styles == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
220221
steps:
221222
- uses: actions/checkout@v4
222223
with:
@@ -228,6 +229,10 @@ jobs:
228229
id: filter
229230
with:
230231
filters: |
232+
styles:
233+
- '**/*.{scss,css}'
234+
json:
235+
- 'frontend/static/**/*.json'
231236
languages:
232237
- 'frontend/static/languages/**'
233238
quotes:
@@ -265,7 +270,12 @@ jobs:
265270
- name: Install dependencies
266271
run: pnpm install
267272

273+
- name: Lint styles
274+
if: steps.filter.outputs.styles == 'true'
275+
run: npm run lint-styles
276+
268277
- name: Lint JSON
278+
if: steps.filter.outputs.json == 'true'
269279
run: npm run lint-json-assets
270280

271281
- name: Validate language assets

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ frontend/static/webfonts-preview
132132
.turbo
133133
frontend/.env.sentry-build-plugin
134134
.claude/worktrees
135-
1024MiB
135+
1024MiB

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ All of the [contributors](https://github.com/monkeytypegame/monkeytype/graphs/co
6969

7070
# Support
7171

72-
If you wish to support further development and feel extra awesome, you can [donate](https://ko-fi.com/monkeytype), [become a Patron](https://www.patreon.com/monkeytype) or [buy a t-shirt](https://www.monkeytype.store/).
72+
If you wish to support further development and feel extra awesome, you can [donate](https://ko-fi.com/monkeytype), [become a Patron](https://www.patreon.com/monkeytype), or [buy a t-shirt](https://www.monkeytype.store/).

backend/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
"mjml": "4.15.0",
4646
"mongodb": "6.3.0",
4747
"mustache": "4.2.0",
48-
"nodemailer": "8.0.4",
48+
"nodemailer": "8.0.5",
4949
"object-hash": "3.0.0",
5050
"prom-client": "15.1.3",
5151
"rate-limiter-flexible": "5.0.3",
5252
"simple-git": "3.32.3",
5353
"string-similarity": "4.0.4",
5454
"swagger-stats": "0.99.7",
5555
"ua-parser-js": "0.7.33",
56-
"uuid": "10.0.0",
56+
"uuid": "14.0.0",
5757
"winston": "3.6.0",
5858
"zod": "3.23.8"
5959
},
@@ -77,11 +77,11 @@
7777
"@types/swagger-stats": "0.95.11",
7878
"@types/ua-parser-js": "0.7.36",
7979
"@types/uuid": "10.0.0",
80-
"@vitest/coverage-v8": "4.0.15",
80+
"@vitest/coverage-v8": "4.1.5",
8181
"concurrently": "8.2.2",
8282
"openapi3-ts": "2.0.2",
83-
"oxlint": "1.59.0",
84-
"oxlint-tsgolint": "0.20.0",
83+
"oxlint": "1.60.0",
84+
"oxlint-tsgolint": "0.21.0",
8585
"readline-sync": "1.4.10",
8686
"supertest": "7.1.4",
8787
"testcontainers": "11.11.0",

backend/private/style.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ body {
8181
bottom: 3rem;
8282
background-color: var(--sub-alt-color);
8383
color: var(--text-color);
84-
font-style: bold;
84+
font-weight: bold;
8585
border-radius: 3px;
8686
padding: 1rem 2rem;
8787
cursor: pointer;
@@ -189,10 +189,6 @@ input[type="checkbox"] {
189189
}
190190
}
191191

192-
.tooltip:hover .tooltip-text {
193-
display: block;
194-
}
195-
196192
.tooltip-text {
197193
display: none;
198194
color: var(--text-color);
@@ -202,3 +198,7 @@ input[type="checkbox"] {
202198
padding: 10px;
203199
border-radius: var(--roundness);
204200
}
201+
202+
.tooltip:hover .tooltip-text {
203+
display: block;
204+
}

backend/src/utils/result.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,14 @@ export function replaceLegacyValues(result: DBResult): DBResult {
122122
};
123123
}
124124

125+
if (typeof result.mode2 === "number") {
126+
result.mode2 = (result.mode2 as number).toString();
127+
}
128+
129+
//legacy value for english_1k
130+
if ((result.language as string) === "english_expanded") {
131+
result.language = "english_1k";
132+
}
133+
125134
return result;
126135
}

frontend/__tests__/components/common/AsyncContent.spec.tsx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe("AsyncContent", () => {
142142
query: {
143143
result: string | Error;
144144
},
145-
options?: Omit<Props<unknown>, "query" | "queries" | "children">,
145+
options?: Omit<Props<{ result: string }>, "queries" | "children">,
146146
): {
147147
container: HTMLElement;
148148
} {
@@ -160,12 +160,18 @@ describe("AsyncContent", () => {
160160
}));
161161

162162
return (
163-
<AsyncContent query={myQuery} {...(options as Props<string>)}>
164-
{(data: string | undefined) => (
163+
<AsyncContent
164+
queries={{ result: myQuery }}
165+
{...(options as Props<{ result: string | undefined }>)}
166+
>
167+
{({ resultData }) => (
165168
<>
166169
static content
167-
<Show when={data !== undefined} fallback={<div>no data</div>}>
168-
<div data-testid="content">{data}</div>
170+
<Show
171+
when={resultData() !== undefined}
172+
fallback={<div>no data</div>}
173+
>
174+
<div data-testid="content">{resultData()}</div>
169175
</Show>
170176
</>
171177
)}
@@ -318,7 +324,10 @@ describe("AsyncContent", () => {
318324
first: string | Error | undefined;
319325
second: string | Error | undefined;
320326
},
321-
options?: Omit<Props<unknown>, "query" | "queries" | "children">,
327+
options?: Omit<
328+
Props<{ first: string; second: string }>,
329+
"queries" | "children"
330+
>,
322331
): {
323332
container: HTMLElement;
324333
} {
@@ -347,24 +356,20 @@ describe("AsyncContent", () => {
347356
}));
348357

349358
type Q = { first: string | undefined; second: string | undefined };
359+
350360
return (
351361
<AsyncContent
352362
queries={{ first: firstQuery, second: secondQuery }}
353363
{...(options as Props<Q>)}
354364
>
355-
{(results: {
356-
first: string | undefined;
357-
second: string | undefined;
358-
}) => (
365+
{({ firstData, secondData }) => (
359366
<>
360367
<Show
361-
when={
362-
results.first !== undefined && results.second !== undefined
363-
}
368+
when={firstData() !== undefined && secondData() !== undefined}
364369
fallback={<div>no data</div>}
365370
>
366-
<div data-testid="first">{results.first}</div>
367-
<div data-testid="second">{results.second}</div>
371+
<div data-testid="first">{firstData()}</div>
372+
<div data-testid="second">{secondData()}</div>
368373
</Show>
369374
</>
370375
)}

0 commit comments

Comments
 (0)