refactor(esm): migrate server and tests from CommonJS to ESM

Convert all server/, test, and setup files from require()/module.exports
to import/export syntax. Activate ESM globally via "type": "module" in
package.json and load dotenv via --import dotenv/config in npm scripts.
This commit is contained in:
Ulas
2026-04-03 23:11:20 +02:00
parent 2f6127911e
commit b139eea623
24 changed files with 113 additions and 154 deletions
+1 -3
View File
@@ -5,8 +5,6 @@
* Abhängigkeiten: keine
*/
'use strict';
const DAY_MAP = { MO: 1, TU: 2, WE: 3, TH: 4, FR: 5, SA: 6, SU: 0 };
/**
@@ -107,4 +105,4 @@ function nextOccurrence(baseDateStr, rrule) {
return next.toISOString().slice(0, 10); // YYYY-MM-DD
}
module.exports = { parseRRule, nextOccurrence };
export { parseRRule, nextOccurrence };