32 Commits

Author SHA1 Message Date
Adaline Simonian
23a3862ca0
test: introduce snapshot-based smoke tests
- Adds a new test suite with Docker-based smoke tests for all locales.
  Can be run using the ./smoketest.sh script.
- Replaces all calls to Math.random() with a new helper that returns 0.5
  in snapshot testing mode, ensuring deterministic snapshots.
- Similarly replaces all calls to new Date() and Date.now() with new
  helpers that return a fixed date in snapshot testing mode.
- Replaces checks against NODE_ENV with APP_ENV, to ensure that the
  bundles can be built with Nuxt for testing without losing code that
  would otherwise be stripped out by production optimizations.
- Adds a database init script that can be used to initialize the
  database with a single admin user and a long-lived JWT token for use
  in automation tests.
- Adds a JWT decoding/encoding CLI tool for debugging JWTs.

Note: Snapshots are not checked in, and must be generated manually. See
test/__snapshots__/.gitignore for more information.
2025-02-02 23:11:19 -08:00
Benjamin
bbfa210340 JS Modernization (@benshawmean) 2025-01-16 22:24:08 +00:00
Valentyne Stigloher
b25afefc49 (fmt) 2024-10-29 10:56:32 +01:00
Valentyne Stigloher
71a562bba9 (nuxt) do not use import.meta.url directly to reference other files as this breaks in Nitro, use current working directory as convention 2024-09-12 10:11:25 +02:00
Valentyne Stigloher
82051afc2f (nuxt) migrate plugins 2024-09-11 21:29:21 +02:00
Valentyne Stigloher
f8156d5204 (sentry) activate sentry in server scripts 2024-03-05 18:19:34 +01:00
Valentyne Stigloher
7ce1bb0e83 (ts) convert a lot to TypeScript
Co-authored-by: Sky <msurvival65@gmail.com>
Co-authored-by: tecc <tecc@tecc.me>
2024-02-23 17:48:16 +01:00
Andrea Vos
4cd23d5636 remove duplication of isGranted in notify.js (was blocked by .mjs changes) 2024-01-11 21:46:37 +01:00
PronounsPage
fa14ab79d9 (lint) automatically fix lints via yarn lint --fix 2024-01-11 20:36:05 +01:00
Valentyne Stigloher
eb9ebace3a (refactor) migrate from cjs to esm so that
in the case of importing `.json` files, node does support these only via adding `with { type: 'json' }`
and then it is still experimental.
The workaround is to create a require() function which is hidden from webpack via simple-hacky string replacement.
https://nodejs.org/api/esm.html#json-modules
This means that the files are not fully compatible, as webpack supports loading of other files via `import`,
while node does only allow `.js` (experimentally `.json` and `.wasm`).
2023-12-13 23:31:45 +01:00
Andrea Vos
89e9bceac3 [admin] timesheets overview 2023-01-29 22:59:51 +01:00
Andrea Vos
98f21ac6f9 [admin] new admin panel 2022-12-30 13:55:15 +01:00
Andrea Vos
a55d3fe817 [notify] include ban proposals 2022-11-21 20:59:14 +01:00
Andrea Vos
80139fb51d [trans] TranslationMode – make public 2022-08-15 21:10:19 +02:00
Andrea Vos
0304c8716f [admin] make the notification frequency configurable 2022-05-07 10:26:23 -05:00
Andrea Vos
7854805bb8 [notify] skip count == 0 2021-12-23 21:30:33 +01:00
Andrea Vos
cc06049b3e #284 nicer email template 2021-12-03 22:52:08 +01:00
Andrea Vos
491495f6c1 [names] #265 names - notify 2021-09-25 14:57:05 +02:00
Andrea Vos
fcf7479e94 #252 reorganise .env 2021-09-07 19:11:15 +02:00
Andrea Vos
886251430c [notify] also notify about awaiting terms 2021-08-31 19:20:43 +02:00
Andrea Vos
8f11280e81 #229 notify about abuse reports 2021-07-24 19:43:17 +02:00
Andrea Vos
2378cbb892 #207 [bug] fix unclosed db connection 2021-05-18 18:23:52 +02:00
Andrea Vos
1daa38295e #190 restore notifications 2021-04-05 17:15:57 +02:00
Andrea Vos
9c43f4b7ca include sources in notification 2020-12-06 15:23:18 +01:00
Andrea Vos
e23c943f25 #121 dictionaries: save authors, categories, links 2020-12-03 17:01:26 +01:00
Andrea Vos
b93bf4db46 #103 [incl][pl] słownik języka inkluzywnego - notify 2020-11-17 19:37:32 +01:00
Andrea Vos
a2170ad2f6 [nouns] notification emails for admins in db, not in .env 2020-11-05 19:38:11 +01:00
Andrea Vos
deff979215 #87 move backend to express 2020-10-31 21:33:59 +01:00
Andrea Vos
571683ee9f #61 [english][nouns] notify with locales mentioned 2020-10-31 13:26:16 +01:00
Andrea Vos
ba87baf64b #54 user accounts - login/registration flow 2020-10-14 21:49:18 +02:00
Andrea Vos
e451cdf9a3 #68 proper db migrations 2020-10-12 18:46:26 +02:00
Andrea Vos
49f22af6b5 #35 [neutratywy] powiadomienia mailowe o potrzebie moderacji 2020-08-06 18:12:16 +02:00