Miodec
255c4b944d
fix: unable to link discord if user has no avatar
2025-04-30 18:41:03 +02:00
Miodec
c666d13c96
impr: parse response from discord api with zod
...
!nuf
2025-04-29 13:53:02 +02:00
Christian Fehmer
212b8d38cb
refactor: make funbox settings an array (@fehmer) ( #6487 )
...
change funbox from "hash separated values" to array.
---------
Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-29 11:31:44 +02:00
Miodec
ab9cef010e
chore: swap monkeyerror for error to not expose actual error message to the frontend
2025-04-26 21:53:16 +02:00
Jack
e06f7f41cf
refactor: add trycatch util (@miodec) ( #6492 )
...
Adds trycatch util to cleanup try catch code.
2025-04-26 21:24:39 +02:00
Miodec
a59f99a533
refactor: protect against null, remove nullish coalescing
2025-04-26 18:56:58 +02:00
Seif Soliman
86383cf9ef
refactor(backend): improve redis and json.parse type safety with zod (@byseif21, @miodec) ( #6481 )
...
### Description
refactored backend files to enhance type safety and reliability using
Zod validation and Redis instead of JSON.parse , I tried to avoid the
files that isn't necessary tho so I hope I don't miss any or included
unnecessary ones!! didn't fully test only verified code compilation and
partial tests without Redis!!.
Should Close #5881
Related to #6207
---------
Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-24 16:25:43 +02:00
Miodec
a424f96480
chore: upgrade oxlint
2025-04-23 18:54:33 +02:00
Miodec
d3f3a834e3
refactor: remove unnecessary json parse
2025-04-23 18:43:38 +02:00
Miodec
0b05b3c2fd
refactor: enable ban-ts-comment rule
2025-04-16 19:15:30 +02:00
Jack
cac8835c77
chore: add oxlint (@miodec) ( #6455 )
...
Use oxlint for general linting to provide much quicker feedback. Keep
eslint for type-aware rules. Fully switch to oxlint once it supports
type-aware.
2025-04-16 17:18:50 +02:00
Christian Fehmer
f6d9b7c3ef
impr: lazy load chartData on results (@fehmer) ( #6428 )
...
Optimize results endpoint by removing heavy or unused data.
We load the whole result chart data for up to 1000 results each time,
but it is very unlikely the user will view the charts for all old
results. By removing the size in my tests went down from 1152kb to
276kb.
---------
Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-08 13:46:40 +02:00
Miodec
115b0d7292
impr: pass lboptout to bot linking command
...
!nuf
2025-04-02 22:01:44 +02:00
Miodec
2c13284528
impr: pass lboptout to bot linking command
...
!nuf
2025-04-02 21:55:34 +02:00
Christian Fehmer
b1d75fb077
fix: local development using docker not working with pnpm (@fehmer) ( #6401 )
...
!nuf
2025-03-26 13:11:02 +01:00
Miodec
d567130053
chore: remove logs, cache is fine
2025-03-20 17:56:10 +01:00
Miodec
33977b71e6
chore: ugly console log to check if the cache is working for sure
2025-03-20 17:50:40 +01:00
Miodec
4bfe6c9bf7
impr: cache leaderboard collection size to improve performance
...
!nuf
2025-03-20 14:54:29 +01:00
Christian Fehmer
e647d875f0
impr: error handling on user deletion (@fehmer) ( #6363 )
...
!nuf
2025-03-17 16:05:46 +01:00
Nad Alaba
932d0e166e
build: fix openapi spec path for docs & stats endpoints on dev (@NadAlaba) ( #6343 )
...
### Description
1. fix openapi specification path so that /docs endpoint would work on
dev.
> Error: ENOENT: no such file or directory, stat
'backend/src/static/api/public.html' Stack: Error: ENOENT: no such file
or directory
2. fix openapi specification path so that API Operation would work on
/stats endpoint on dev.
> Cannot read openApi specification from
backend/src/api/routes/../../static/api/openapi.json. Swagger stats will
not fully work.

3. remove unneeded `files` & `ts-node` options from `tsconfig.json` in
various places.
> File 'backend/src/types/types.d.ts' not found.
The file is in the program because:
Part of 'files' list in tsconfig.json
4. add the missing `pnpm test` script to the funbox package.
2025-03-12 16:20:46 +01:00
Christian Fehmer
4d4de260d9
chore: update mongodb version to 5.0.13 (@fehmer) ( #6364 )
2025-03-12 15:29:19 +01:00
Miodec
bd7f06be9a
fix: handle firebase rate limit when requesting email verification
...
!nuf
2025-03-12 12:59:55 +01:00
Miodec
9bbcf40f45
chore: fix test
2025-03-12 08:56:59 +01:00
Miodec
71b5f2875f
chore: temporary object log to track down an error
2025-03-12 08:55:19 +01:00
Miodec
f5f4453624
chore: update error messages
2025-03-12 08:54:54 +01:00
Christian Fehmer
f80dde4c89
chore(self hosting): run selfhosted backend in prod mode (@fehmer) ( #6326 )
...
Co-authored-by: Miodec <jack@monkeytype.com>
2025-03-03 17:43:08 +01:00
Christian Fehmer
660d856f96
refactor: use bearer auth instead of uid auth for tests (@fehmer) ( #6318 )
2025-03-03 12:08:30 +01:00
Christian Fehmer
50f6bd418c
fix: errors not being logged into the database (@fehmer) ( #6323 )
...
!nuf
2025-03-03 11:32:31 +01:00
Christian Fehmer
642c03abdc
fix(docker): fix configuration endpoint, add configuration export (@fehmer) ( #6317 )
...
- fixes /configure endpoint not working in docker image because of the
missing `private` directory
- adds `export configuration` button to api server configuration
2025-02-27 10:48:59 +01:00
Christian Fehmer
41b02155f2
test: fix tests not awaiting expect with resolves or rejects (@fehmer) ( #6308 )
2025-02-26 17:50:24 +01:00
Christian Fehmer
7be66e9cb3
fix: rounding issues causing daily leaderboard to be out of order sometimes (@fehmer) ( #6303 )
2025-02-24 12:04:33 +01:00
Christian Fehmer
05271d6946
impr: log failed worker queue jobs (@fehmer) ( #6295 )
...
!nuf closes #6294
2025-02-22 09:14:59 +01:00
Christian Fehmer
598e167f9b
fix: daily leaderboard worker not giving XP to users (@fehmer) ( #6292 )
2025-02-21 17:40:11 +01:00
Christian Fehmer
8bc23b7c3d
fix: remove user from XP leaderboard if opt-out, reset or deleted (@fehmer) ( #6290 )
...
Ensure user is removed from the weekly XP leaderboards if they either
`opt-out`, `reset` their account or `delete` their account.
2025-02-21 17:09:55 +01:00
Christian Fehmer
8a41ccee97
fix: past leaderboard not fetching the users rank (@fehmer) ( #6289 )
...
Show the users ranking for the last day on the daily and for the last
week on the weekly leaderboard correctly.
- Fix request query schema for the [daily
rank](https://api.monkeytype.com/docs/internal#tag/leaderboards/operation/leaderboards.getDailyRank )
having pagination
- Fix request query schema for the [weekly
rank](https://api.monkeytype.com/docs/internal#tag/leaderboards/operation/leaderboards.getWeeklyXpRank )
missing the `weeksBefore` parameter
- Fix frontend to include the `daysBefore` or `weeksBefore` parameter on
`rank` calls
---------
Co-authored-by: Miodec <jack@monkeytype.com>
2025-02-21 16:52:20 +01:00
Miodec
ba940232a0
chore: update version string format
2025-02-20 11:42:10 +01:00
Christian Fehmer
fd6bf18a4c
fix: update csp entries for redocly (@fehmer) ( #6265 )
...
!nuf
2025-02-14 19:05:00 +01:00
Jack
01dee3fe15
feat: leaderboards remake, weekly xp leaderboards (@miodec) ( #6250 )
2025-02-12 16:34:03 +01:00
Christian Fehmer
e7685c5861
impr: add X-Compatibility-Check header to all responses (@fehmer) ( #6262 )
...
!nuf
2025-02-12 14:37:53 +01:00
Miodec
a0c471a28e
chore: add captcha to the forgot password modal
2025-02-12 12:12:48 +01:00
Christian Fehmer
60f664117f
chore: update @redocly/cli (@fehmer) ( #6255 )
...
Use latest version to get rid of the configuration warnings.
2025-02-11 13:52:36 +01:00
dependabot[bot]
ae9c3ca003
chore(deps-dev): bump vitest from 2.0.5 to 2.1.9 ( #6242 )
...
Bumps
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest )
from 2.0.5 to 2.1.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases ">vitest's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.9</h2>
<p>This release includes security patches for:</p>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/security/advisories/GHSA-8gvc-j273-4wm5 ">Browser
mode serves arbitrary files | CVE-2025-24963</a></li>
<li><a
href="https://github.com/vitest-dev/vitest/security/advisories/GHSA-9crc-q9x8-hgqq ">Remote
Code Execution when accessing a malicious website while Vitest API
server is listening | CVE-2025-24964</a></li>
</ul>
<h3> 🐞 Bug Fixes</h3>
<ul>
<li>backport <a
href="https://redirect.github.com/vitest-dev/vitest/issues/7317 ">vitest-dev/vitest#7317</a>
to v2 - by <a
href="https://github.com/hi-ogawa "><code>@hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/pull/7318 ">vitest-dev/vitest#7318</a></li>
<li>(backport <a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7340 ">#7340</a>
to v2) restrict served files from <code>/__screenshot-error</code> - by
<a href="https://github.com/hi-ogawa "><code>@hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/pull/7343 ">vitest-dev/vitest#7343</a></li>
</ul>
<h5> <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.8...v2.1.9 ">View
changes on GitHub</a></h5>
<h2>v2.1.8</h2>
<h3> 🐞 Bug Fixes</h3>
<ul>
<li>Support Node 21 - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> <a
href="https://github.com/vitest-dev/vitest/commit/92f7a2ad "><!-- raw
HTML omitted -->(92f7a)<!-- raw HTML omitted --></a></li>
</ul>
<h5> <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.7...v2.1.8 ">View
changes on GitHub</a></h5>
<h2>v2.1.7</h2>
<h3> 🐞 Bug Fixes</h3>
<ul>
<li>Revert support for Vite 6 - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> <a
href="https://github.com/vitest-dev/vitest/commit/fbe5c39d "><!-- raw
HTML omitted -->(fbe5c)<!-- raw HTML omitted --></a>
<ul>
<li>This introduced some breaking changes (<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6992 ">vitest-dev/vitest#6992</a>).
We will enable support for it later. In the meantime, you can still use
<code>pnpm.overrides</code> or yarn resolutions to override the
<code>vite</code> version in the <code>vitest</code> package - the APIs
are compatible.</li>
</ul>
</li>
</ul>
<h5> <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.6...v2.1.7 ">View
changes on GitHub</a></h5>
<h2>v2.1.6</h2>
<h2>🚀 Features</h2>
<ul>
<li>Support Vite 6</li>
</ul>
<h5> <a
href="https://github.com/vitest-dev/vitest/compare/v2.1.5...v2.1.6 ">View
changes on GitHub</a></h5>
<h2>v2.1.5</h2>
<h3> 🐞 Bug Fixes</h3>
<ul>
<li><code>dangerouslyIgnoreUnhandledErrors</code> without base reporter
- by <a
href="https://github.com/AriPerkkio "><code>@AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6808 ">vitest-dev/vitest#6808</a>
<a href="https://github.com/vitest-dev/vitest/commit/0bf0ab00 "><!-- raw
HTML omitted -->(0bf0a)<!-- raw HTML omitted --></a></li>
<li>Capture <code>unhandledRejection</code> even when base reporter is
not used - by <a
href="https://github.com/AriPerkkio "><code>@AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6812 ">vitest-dev/vitest#6812</a>
<a href="https://github.com/vitest-dev/vitest/commit/8878b04d "><!-- raw
HTML omitted -->(8878b)<!-- raw HTML omitted --></a></li>
<li>Don't change the working directory when loading workspace projects
- by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6811 ">vitest-dev/vitest#6811</a>
<a href="https://github.com/vitest-dev/vitest/commit/f0aeaca8 "><!-- raw
HTML omitted -->(f0aea)<!-- raw HTML omitted --></a></li>
<li>Remove <code>sequence.concurrent</code> from the
<code>RuntimeConfig</code> type - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6880 ">vitest-dev/vitest#6880</a>
<a href="https://github.com/vitest-dev/vitest/commit/6af73d93 "><!-- raw
HTML omitted -->(6af73)<!-- raw HTML omitted --></a></li>
<li>Stop the runner before restarting, restart on workspace config
change - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6859 ">vitest-dev/vitest#6859</a>
<a href="https://github.com/vitest-dev/vitest/commit/b01df47d "><!-- raw
HTML omitted -->(b01df)<!-- raw HTML omitted --></a></li>
<li>Don't rerun on Esc or Ctrl-C during watch filter - by <a
href="https://github.com/hi-ogawa "><code>@hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6895 ">vitest-dev/vitest#6895</a>
<a href="https://github.com/vitest-dev/vitest/commit/98f76ea7 "><!-- raw
HTML omitted -->(98f76)<!-- raw HTML omitted --></a></li>
<li>Print ssrTransform error - by <a
href="https://github.com/hi-ogawa "><code>@hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6885 ">vitest-dev/vitest#6885</a>
<a href="https://github.com/vitest-dev/vitest/commit/4c96cce7 "><!-- raw
HTML omitted -->(4c96c)<!-- raw HTML omitted --></a></li>
<li>Throw an error and a warning if <code>.poll</code>,
<code>.element</code>, <code>.rejects</code>/<code>.resolves</code>, and
<code>locator.*</code> weren't awaited - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6877 ">vitest-dev/vitest#6877</a>
<a href="https://github.com/vitest-dev/vitest/commit/93b67c24 "><!-- raw
HTML omitted -->(93b67)<!-- raw HTML omitted --></a></li>
<li><strong>browser</strong>:
<ul>
<li>Don't process the default css styles - by <a
href="https://github.com/sheremet-va "><code>@sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/6861 ">vitest-dev/vitest#6861</a>
<a href="https://github.com/vitest-dev/vitest/commit/0d67f04b "><!-- raw
HTML omitted -->(0d67f)<!-- raw HTML omitted --></a></li>
<li>Support non US key input - by <a
href="https://github.com/hi-ogawa "><code>@hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/6873 ">vitest-dev/vitest#6873</a>
<a href="https://github.com/vitest-dev/vitest/commit/5969d8da "><!-- raw
HTML omitted -->(5969d)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c9e59a089d
"><code>c9e59a0</code></a>
chore: release v2.1.9</li>
<li><a
href="e0fe1d81e2
"><code>e0fe1d8</code></a>
fix: backport <a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7317 ">#7317</a>
to v2 (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/7318 ">#7318</a>)</li>
<li><a
href="d69cc75698
"><code>d69cc75</code></a>
bump: 2.1.8</li>
<li><a
href="92f7a2ad18
"><code>92f7a2a</code></a>
fix: support Node 21</li>
<li><a
href="81ed45b3a4
"><code>81ed45b</code></a>
chore: release v2.1.7</li>
<li><a
href="fbe5c39d88
"><code>fbe5c39</code></a>
fix: revert support for Vite 6</li>
<li><a
href="b936702deb
"><code>b936702</code></a>
bump: 2.1.6</li>
<li><a
href="32f23b98b4
"><code>32f23b9</code></a>
chore: release v2.1.5</li>
<li><a
href="417bdb423d
"><code>417bdb4</code></a>
fix(browser): init browsers eagerly when tests are running (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/6876 ">#6876</a>)</li>
<li><a
href="93b67c24b1
"><code>93b67c2</code></a>
fix: throw an error and a warning if <code>.poll</code>,
<code>.element</code>, <code>.rejects</code>/`.resolv...</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v2.1.9/packages/vitest ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/monkeytypegame/monkeytype/network/alerts ).
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-02-08 13:53:20 +01:00
Miodec
93a744b4ee
fix: dont award discord roles if user opted out of leaderboards
2025-01-31 19:42:27 +01:00
Miodec
219b41302e
fix: only send ban event to the bot if the user was actually banned
2025-01-27 11:05:38 +01:00
Miodec
2000cd92c6
fix: auto ban event not sending a task to the discord bot
2025-01-26 20:46:30 +01:00
Miodec
edd2903171
chore: bump eslint version
2025-01-21 11:50:09 +01:00
Miodec
3a065313bf
impr: better email changing logs
...
!nuf
2025-01-15 10:52:48 +01:00
Miodec
2a6af862e7
impr: dont allow taking blocklisted names via update account name
...
!nuf
2025-01-03 23:15:31 +01:00
Jack
fdadb4ae83
refactor: move funboxes to a shared package (@miodec) ( #6063 )
2024-12-04 16:11:07 +01:00
Tamion
bbfafc1cc5
impr(read ahead): show words after correcting typo with backspace (@notTamion) ( #6006 )
2024-11-19 00:01:21 +01:00