7070 Commits

Author SHA1 Message Date
Erik Michelson 5b0f3a1c55 chore(format): migrate from prettier to oxfmt
oxfmt is a project from the OXC toolchain, similar to OXLint.
It is based on the Rust-built 'oxidation compiler' and has
increased performance compared to Prettier which is built
in plain JS.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 13cdaf066e chore(ide): add OXC plugin to WebStorm IDE project plugin list
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 5abc428903 chore(lint): fixes according to stricter lint rules
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson a880864b2c chore(lint): replace ESLint with OXLint for performance
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-14 19:46:27 +01:00
Erik Michelson 51407598d9 fix(test): remove warning about isolatedModules in ts-jest diagnostics
This warning spams the output and currently is not critical to us.
Setting `isolatedModules: true` in the tsconfig.json as suggested breaks
the module resolution and imports.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 69ba5c5b8b fix(config): remove invalid logger, that causes a crash in Node 24
This logger statement contains the complete noteConfig.error object which includes
circular object dependencies. Since Node 24 has a rewritten implementation of
console.log that does not silently ignore such errors anymore, we have to remove
this statement. It probably was a leftover from debugging anyways, since the proper
error message is constructed later on and then displayed.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 936b583b12 fix(tsconfig): revert to ES2023 instead of ES2024 for ts-jest compatibility
The updated @tsconfig/node24 package uses ES2024 as default feature set for
ECMAScript. Since ts-jest and probably also @typescript-eslint/parser do not
support ES2024 yet, this is a simple fix. We didn't use any ES2024 features
anyways.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Erik Michelson 941cf87c86 chore(deps): upgrade better-sqlite3 to v12
This is required since better-sqlite3 added support
for Node 24 since version 12.0.0

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 18:34:31 +01:00
Philip Molares e087a9b336 chore: update node to 24.12.0
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 18:34:31 +01:00
Erik Michelson 68e78afa6b fix(realtime): use correct Buffer/ArrayBuffer/Uint8Array conversion
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 17:32:03 +01:00
Erik Michelson bde357c8a0 chore(deps): update @types/node to 20.19.28
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 17:32:03 +01:00
Philip Molares db64b4947b fix(realtime): correctly handle ArrayBuffer
We can just create a big enough ArrayBuffer and create a Uint8Array view
on this buffer to save the data into.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 17:32:03 +01:00
Philip Molares 73bd1d3937 fix(markdown-it-plugins): import of MarkdownIt
Apparently we need to specify the index.js file now instead of
just pointing to the folder.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-12 17:32:03 +01:00
renovate[bot] f3cb59aa2b chore(deps): update dependency typescript to v5.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 17:32:03 +01:00
Erik Michelson e85320d623 fix(docker): use correct tsconfig path and turbo args
The docker build seemed to fail because the tsconfig
for the backend pointed to an out-of-date path, that
didn't exist anymore. Furthermore, the --no-cache
directive was deprecated and should be replaced by
explicitly stating the caching mode for local and
remote cache (empty policy means no caching).

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson af0365d9ad fix(docker): remove bash-dependencies from build script
The build script for the backend relied on some bash specifics.
Since bash is not available in alpine based node docker images,
building failed. This commit replaces bash functions with the
native POSIX equivalents.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson 4b8b36ab76 fix(docker): replace deprecated ENV declarations in Dockerfile
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-12 09:46:41 +01:00
Erik Michelson 5afceb6884 docs(explore): add missing ESDoc comments
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson b75296780f chore(explore): linting fixes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 849807fcaf fix(explore): MariaDB expects named subqueries
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares 0a34f11e29 test(explore): allow some notes to be publiclyVisible
For our testing it necessary to allow some notes to be publicly visible

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Philip Molares d384ea691a refactor(explore): remove tags from search
This is not final and should be reinstated once we figure out how to handle tags

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Erik Michelson 5821d8dd61 feat(explore): show only recently visited notes that a user has access to
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson dabc5da3c3 refactor(explore): extract tags from common queries
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares a4c590230e feat(permissions): publiclyVisible flag for note listing on explore
This field should allow the user to allow pages to be found
easily on the public explore page without exposing all pages directly.

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Philip Molares 7426d8d885 feat(explore): reload explore page if a note is deleted
Because we don't want to show old notes, we need to reload
the explore page after a delete.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Erik Michelson 6ec4cab7fb docs(explore): add ESDoc comments to new components and functions
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson a86a0a97b5 fix(explore): optimize query
This way the query works correctly in all database systems

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson cef615433b fix(explore): show tags only once for notes with multiple visits
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 399287584f refactor(explore): re-design pinned notes, improve UI
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares 6e663aa600 test(explore): add unit tests
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Erik Michelson 1b0a1d0ab2 fix(explore): use correct translations
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares adb0d71c2c test: add e2e test for explore api
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Philip Molares cea5d2700e fix(explore): add default page number
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Philip Molares 0fdeaa70b3 refactor(explore): reorder methods
This alligns the methods to the api controller

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Erik Michelson 87b9cf74dd fix(explore): return null on unpinning from API
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 7d61a774f9 refactor(explore): load pinned notes with the explore page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson f51bc1b061 fix(explore): set initial state for mocking
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 6bb13488f7 refactor(explore): return NoteExploreEntryDto on pinning
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 1e9fc8d081 feat(explore): pin and unpin notes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 0f2c301b4c feat(explore): add section for recently visited notes
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Erik Michelson 4e033863ff feat(explore): add backend logic for the explore page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Philip Molares fa110dbdd3 refactor(explore): extract date utils
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-11 20:21:00 +01:00
Erik Michelson 87257ac3dd feat(explore): add frontend explore page
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2026-01-11 20:21:00 +01:00
Bart Louwers cd62b8bd7b docs(readme): Fix logo for dark backgrounds (#6314) 2026-01-10 22:22:38 +00:00
Philip Molares 72149d49a5 fix(revision): fix cron job to delete old revisions
This function did not use the new database datetime functions and therefore did not correctly work.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-08 00:20:45 +01:00
Philip Molares 17ba34567d docs(config): explain permissions
Add additional explanation for permission interactions

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-08 00:16:12 +01:00
Philip Molares 85fccc4e15 test(noteConfig): test the special permissions interactions
As those interaction are quite special at times we should test them individually

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-08 00:16:12 +01:00
Philip Molares 8fe3821312 fix(noteConfig): correctly handle default everyone and max guest level interaction
Some combinations of the default everyone permission
and max guest level do not work conceptually and need to
throw an error

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2026-01-08 00:16:12 +01:00
Philip Molares 51062b30ad refactor: remove NoteService.toNotePermissionsDto
We already have this function in the PermissionService

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2025-12-27 19:48:08 +01:00