Commit graph

103 commits

Author SHA1 Message Date
dependabot[bot] dfdf3fc6cd
chore(deps-dev): bump typescript from 5.3.3 to 5.5.4 (@dependabot) (#5734) 2024-08-08 12:44:22 +02:00
dependabot[bot] 613687cbf8
chore(deps-dev): bump autoprefixer from 10.4.14 to 10.4.20 (@dependabot) (#5732)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.14 to 10.4.20.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.14...10.4.20)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 12:11:28 +02:00
Miodec 594db598da chore(deps): bump firebase version 2024-07-31 00:50:21 +02:00
Jack 2720c07664
chore: switch from npm to pnpm (#5690)
* pnpm

* v4, pnpm lock

* checkout, node setup

* cache dir

* path, name

* store path

* name

* setup pnpm, get store then check cache

* unnecessary if

* missing dependencies

* fix docker

* lock file name

* remove prop

* wip

* fix

* reduce image sizes

* save exact

* correct command

* lock

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2024-07-30 22:36:19 +02:00
Jack 1110248f7b
chore: upgrade node to 20.16.0 (#5688)
* nooOoOoOOoOoode

* ci

* nvm

* env is back baby, cache

* cache name, restore keys

* remove restore keys

* package lock

* conditional node setup

* unnecessary assertion

* update rule

* lock
2024-07-30 18:44:35 +02:00
Rizwan Mustafa 1164f4a114
chore: bump throttle-debounce to 5.0.2 (#5684) 2024-07-30 14:53:04 +02:00
dependabot[bot] 3b29ad4b1d
chore(deps): bump stemmer from 2.0.0 to 2.0.1 (#5679)
Bumps [stemmer](https://github.com/words/stemmer) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/words/stemmer/releases)
- [Commits](https://github.com/words/stemmer/compare/2.0.0...2.0.1)

---
updated-dependencies:
- dependency-name: stemmer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30 12:33:31 +02:00
Miodec 471e844c6b chore: remove hard npm version requirement 2024-07-29 11:49:28 +02:00
Christian Fehmer 7f9f704dcd
impr: use tsrest/zod for config endpoints (@fehmer) (#5649)
!nuf
2024-07-29 11:31:14 +02:00
Christian Fehmer 40514cd248
chore: start application in dev mode using docker (@fehmer) (#5647)
* chore: start application in dev mode using docker (@fehmer)

* expose port env variable

* regen lock

* regen lock

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-07-24 19:48:01 +02:00
dependabot[bot] b5444d827d
chore(deps-dev): bump vite from 5.1.2 to 5.1.7 in /frontend (#5639)
* chore(deps-dev): bump vite from 5.1.2 to 5.1.7 in /frontend

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.2 to 5.1.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.1.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* package-lock.json

---------

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>
2024-07-22 16:11:31 +02:00
dependabot[bot] 26c60c683b
chore(deps-dev): bump postcss from 8.4.27 to 8.4.31 in /frontend (#5640)
* chore(deps-dev): bump postcss from 8.4.27 to 8.4.31 in /frontend

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* package-lock.json

---------

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>
2024-07-22 16:11:17 +02:00
Jack 3e88ac2f12
refactor: restructure project to a true monorepo (#5626)
* split ts files

* packages

* nomore workspace?

* blah

* build, exports

* declaration

* blargh

* turrrrbo

* fix fontawesome paths

* allow file in eslint, fix ts errors

* optimise package, update tsconfig

* fix ts

* update turbo config

* eslint split

* fix imports

* fix types

* lock

* add turbo task

* script

* test task

* pretty scripts

* update prettier ignore

* no cache for tests

* lint task

* turbo

* no out

* depend on env

* fix mono breaking things

* odl

* fix version dependency of mongodb-memory-server

* Revert "fix version dependency of mongodb-memory-server"

This reverts commit 52ffac47b1.

* update vitest-mongodb

* release scripts

* update ci

* update dev script

* ignore issues around firebase config

* add check ts tasks

* import isaxioserror

* shared types package

* replace tsnodedev with tsx

* fix import

* shared types

* module

* backend imports

* declaration

* node version

* test code

* assert json

* verbatim

* type

* lodash

* ts ver

* fix fix fix?

* remove assert

* remove module and resolution

* cleanup

* tsconfig

* fix frontend

* remove unecessary props

* more unused

* remove skiplib

* declaration map, dev script

* remove install scripts

* fix regex

* move shared types to package

* dont include shared types

* remove path

* update scripts

* test code

* test code

* fix backend types

* fully fix backend

* fix frontend d.ts

* add .js to imports

* remove module

* revert add .js

* update tsconfig

* use bundler module resolution

* almost all frontend types

* mooore

* date fns

* fix backend docker

* fix ape keys

* fix type

* clean rimraf type

* fix shared-types in workspace

* fix import resolving

* fix docker builds

* ignore type problems on slim-select until new version is released

* turrrrbo

* fix npm ci

* fix lint task

* expose env variables needed by frontend build

* fix dependencies

* package-lock

* backend watch ts and lint

* add fe and be build scripts to root

* fix dev not building packages

* shared-types missing eslint

* move shared types back to dev-deps

* add packages to labeler

* add packages step to ci

* typo

* filter update

* remove concurrently from root

* add scripts

* abbreviate

* rename

* yeet

* fixed path

* test pkg

* consistent ordering

* rename

* Revert "backend imports"

This reverts commit d715198829.

* fix missing imports, remove last .js

* remove test package

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2024-07-22 15:08:11 +02:00
Jack 8f4d291fcf
Revert "impr: use tsrest/zod for type-safety on both ends (@fehmer) (#5479)" (#5619)
This reverts commit 4c9e949f10.
2024-07-16 17:29:09 +02:00
Christian Fehmer 4c9e949f10
impr: use tsrest/zod for type-safety on both ends (@fehmer) (#5479)
!nuf
2024-07-16 15:24:06 +02:00
Miodec 0db50e30d8 chore: add firebase tools dependency 2024-07-16 13:38:14 +02:00
Christian Fehmer 66c09a462f
impr: reduce initial loading time of settings page (@fehmer) (#5583) 2024-07-09 21:23:28 +02:00
Miodec 79874fe4e9 chore: upgrade vite-plugin-pwa
also change injectRegister parameter
2024-06-12 16:38:20 +02:00
Christian Fehmer fad3f6e8d1
impr: optimize use of fontawesome (fehmer) (#5423)
!nuf
2024-06-07 11:29:04 +02:00
Christian Fehmer 59615fb02c
feat(account page): add test activity graph (fehmer, Singh233) (#5309)
* wip

* wip frontend

* cleanup

* wip

* refactoring

* wip

* first working version

* wip

* update calendar with new result

* add migration script

* dates are hard

* fix naming inconsistencies

* requested changes on migration

* timezones

* update date-fns, use date-fns/utc

* resolve cyclic dependency by extracting test activity calender into new file

* cleanup

* fix increment

* fix

* tests

* test coverage

* test migration

* migration more logging

* migration add unique index on uid if missing

* update legend styling

* 53 columns

* wip

* move dropdown and legend to the top
add dropdown border
yeet hotpink
invisible filler boxes
remove year from month format

* responsive update

* lowercase months

* handle current year, fix tests

* handle year change

* make days square again

* handle newly created users correctly

* move css

* add wrapper for easier styling
rework some font sizes/widths
reorder styles

* media queries

* align

* rework styling once more

* dont commit debug

* add days full to fill the space a bit

* show partial months

* hover on 0 tests

* start dynamic calendar on sunday

* no activity

* hover

* remove label on fillers

* remove label on fillers

* fix months, update tests for months

* adjust tests to new requirements

* cleanup

* fix migration

* impr(commandline): add "add/remove quote to favorites" commands

closes #5368

* chore: remove daily lb which is no longer in the backend

* fix: dropdown element flashing for couple frames on page load

* feat(language): add japanese romaji 1k (nthngnssmnnglss)

* fix: optional chaining

!nuf

* fix(words generator): infinite custom text tests not working correctly

* chore: missing languages in list and group files

* fix(language): remove duplicates

!nuf

* add readline sync to confirm

* gh action complaints

* unnecessary check

* premium only

* add years to drop down only if premium

* Update setup-tests.ts

* test fix

* cleanup

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-05-15 15:23:36 +02:00
Christian Fehmer 059c9e271b
test: update to vitest 1.6.0, use v8 coverage provider (#5389) 2024-05-13 13:25:21 +02:00
Christian Fehmer 12146282e2
chore: update vitest to 1.5.0 (#5313) 2024-04-17 13:21:11 +02:00
Sanidhya Singh 9aeaa31d2c
impr: replace JSONSchema with ajv for faster validation (sanidhyas3s) (#5145)
* impr: replace JSONSchema with ajv for faster validation

* Remove JSONSchema from packages

* Add ajv in dev-dependencies

* move dep to frontend

* Fix validation schema for different languages and error messages

* fix double space

* different way of showing errors

* por que no los dos

* return on failed schema

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-03-11 20:00:10 +01:00
Christian Fehmer b4af0917b2
chore: improve docker files for local development (#5157) 2024-03-04 16:10:22 +01:00
Christian Fehmer 91982e285d
chore: fix ESLint complaining about typescript version (#5153)
Co-authored-by: Jack <jack@monkeytype.com>
2024-02-29 22:44:33 +01:00
Paul Ebose a0416d3eba
impr(dev): allow docker compose to start the backend server (plbstl, Miodec) (#4995)
* chore: allow backend docker compose to start the api-server alongside redis & mongodb

* chore: update node versions in docker compose

* chore: add an extra compose file in backend

* docs: update advanced contribution guide with docker compose changes

* add docker script
support server_open env variable

* move files

* npm scripts
rename file

* add docker ignore

* fix redis not working

* rename file

* mounting root instead

* update docs

* update docs table of contents

* restart on fail

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-02-28 14:17:09 +01:00
Christian Fehmer b20df42f2f
test: replace jest with vitest on frontend (fehmer) (#5105)
* test: replace jest with vitest on frontend

* vscode config

* use prettier to format modfifications on save
2024-02-26 12:23:50 +01:00
Jack 8f6bfbb708
build: replace webpack with vite (#5096) 2024-02-22 02:24:20 +01:00
Jack 01790d8a3a
refactor: shared user types (#5080)
* move user to shared definitions

this includes whatever user can have on it, tags, presets and so on

* profiles, mail and others

* fix logic

* yeet

* same as master for now

* tsc fixes

* remove comment

* fix tests

* chore: omit ips

* fix(language): remove some unnecessarily capitalised words in german 1k

* fix(typing): first space sometimes soft locking the website

* perf: speed up settings page loading

* fix: use selected typing speed unit on personal best popup (fehmer) (#5070)

* fix: Use selected typing speed unit on personal best popup

* refactor

* refactor

* test coverage

* use Format in more places

* Make config mockable

* dependency injection

* wip

* fix

* test

* touch

* fix(language): typos in russian_10k.json (kae) (#5082)

* Update russian_10k.json

- fixed typos
- removed duplicates

* - fixed extra typos

* remove duplicates

* fix(language): typos in russian_10k.json

* feat: add copy missed words to result screen (fehmer) (#5086)

* feat: Add copy missed words to result screen

* remove margin

* update icons

---------

Co-authored-by: Miodec <jack@monkeytype.com>

* impr(funbox): add 46 group languages to wikipedia funbox (RealCyGuy) (#5078)

* impr: provide all-time LB results during LB update (fehmer) (#5074)

Try to provide LB results during the LB update. There is a very small time-frame where
already running queries might fail during the update. For now we keep the 503 error in this
cases and monitor how often this happens on production.

* impr(funbox): add ` (grave accent, 96) and ~ (tilde, 126) to specials (#5073)

* impr: add testWords and wordsHistory to copy result stats (#5085)

* feat: add testWords and wordsHistory to copy result stats

* fix

* add fe ts dep

---------

Co-authored-by: Christian Fehmer <fehmer@users.noreply.github.com>
Co-authored-by: Andrey Kuznetsov <akuznetsov@outlook.com>
Co-authored-by: Cyrus Yip <cyruscmyip1@gmail.com>
Co-authored-by: fitzsim <fitzsim@fitzsim.org>
2024-02-19 17:15:15 +01:00
Miodec aec04bc8cc chore: remove grecaptcha types
it didnt work anyway
2024-02-17 18:44:14 +01:00
Jack 3e0be2e210
refactor: replace select2 with slim-select (#5065)
* i cant figure this oooout

* fix: closing commandline causing settings page update

* remove log

* fix event looping issues
rerendering selects when updating settings

* remove comment

* move section back to where it should be

* update styling

* move redrawing to settings group

* no need to save to a variable

* types

* fix styles

* search placeholder

* fix structure

* fix styles

* using slim for the rest of selects

* disabled styling

* use slim

* styling

* use slim

* multi select styling

* use slim

* use slim

* use slim

* use slim

* remove everything else related to select2

* last select2 mention

* comment

* fix(settings page): font family buttons not working

* fix: input indicators remaining visible after leaving the login page (underscoore) (#5062)

* chore: update node version to 18.19.1 (#5060)

* impr(quote): add Code C quotes (penguin-teal) (#5053)

* fix: question mark appearing next to unrated quotes

* removed unnecessary link

---------

Co-authored-by: Ajay kumar <ajaykumar.bit.1995@gmail.com>
Co-authored-by: Christian Fehmer <fehmer@users.noreply.github.com>
Co-authored-by: penguin-teal <130006737+penguin-teal@users.noreply.github.com>
2024-02-17 12:12:15 +01:00
Christian Fehmer 6cf2e4f5f5
chore: update node version to 18.19.1 (#5060) 2024-02-15 21:23:29 +01:00
Christian Fehmer 0fef619d06
refactor: null-safe usage of Auth.currentUser (fehmer) (#5048)
* fix: error on leaderboard when no user is present

* refactor simple popups

* popups, commandline

* fixes?

* more

* more

* review comments

---------

Co-authored-by: Jack <jack@monkeytype.com>
2024-02-13 19:03:50 +01:00
Christian Fehmer 9d7e5b1ddb
test: add jquery and mocks to frontend tests (#5013) 2024-02-07 16:11:07 +01:00
Christian Fehmer 97e2baa915
refactor: import jquery and jquery plugins using webpack (fehmer) (#4880)
* refactor: import jquery and jquery plugins using webpack

* move select import to index

* moved imports to the top

* unnecessary types

* ignoring requires in this file

* importing html2cavnas as needed instead of globally

---------

Co-authored-by: Jack <jack@monkeytype.com>
2024-02-07 13:12:12 +01:00
Miodec 7e33b4891e chore: upgrade jest 2024-02-05 13:01:09 +01:00
Jack 0124ee6345
chore: upgrade axios from 0.21.4 to 1.6.4 (#4986)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-AXIOS-6032459
- https://snyk.io/vuln/SNYK-JS-AXIOS-6124857
- https://snyk.io/vuln/SNYK-JS-AXIOS-6144788

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-01-31 13:05:45 +01:00
Christian Fehmer 6aa7a72727
test: configure testing for frontend code (fehmer) (#4879)
* test: configure testing for frontend code

* remove test coverage thresholds, cleanup
2024-01-08 15:26:57 +01:00
Christian Fehmer 39eb13b4fa build: fix development mode detection on windows (fehmer) (#4724)
* fix: development mode detection on windows

* fix: development mode detection on windows
2023-10-17 12:41:59 +01:00
Christian Fehmer 0f6884a5be
impr: detect development mode based on config instead of window.location (fehmer) (#4703)
* impr: detect development mode based on config instead of window.location

* Allow access to /configure on the backend using non-local ip

* Use webpack define plugin

* take BACKEND_URL from env
2023-10-09 18:46:40 +01:00
Miodec 18b4e62f13 chore: release v1.17.14 2023-09-25 14:15:45 +01:00
Miodec e3f66b165e build: add deploy-preview script 2023-08-31 14:05:21 +02:00
Miodec 9bb1a87e08 chore: upgrade firebase 2023-08-25 11:45:18 +02:00
Miodec 940cc018ea build: upgrade dependencies
This also fixes issue where the dev server would die when using firefox
2023-08-13 12:34:54 +02:00
Miodec c47c66146f style: add normalize.css 2023-08-12 14:59:11 +02:00
Miodec 6ae332e769 build: add postcss and autoprefixer
Autoprefixer will automatically add vendor prefixes to css on build
2023-08-12 14:59:11 +02:00
Miodec 0b69b2e1e3 added knip to find unused exports 2023-08-10 18:32:33 +02:00
Miodec 38a316715b moved to node 18.17.1 lts 2023-08-10 17:38:27 +02:00
Miodec 99a7972c13 updated firebase version 2023-07-10 13:01:11 +02:00
Miodec e3cb26d30c added eslint to frontend to fix linting issues 2023-06-22 23:52:55 +02:00