fix(guide): escape quotes that broke app.js; add a syntax check for src/ (1.89.1)

This commit is contained in:
larssand committed 2026-11-10 16:05:53 +01:00
1 parent 89c7afee2f
commit 379dd52c7f
6 files changed
+33 -5

No files matched your search

+4
View File
@@ -8,6 +8,10 @@ The application version is maintained in `package.json` and displayed in the adm
No changes recorded yet.
## 1.89.1
- Fix: the app loaded as a blank page after 1.89.0 (a quote in a guide text broke app.js). A new test checks that every file in src/ parses.
## 1.89.0
- Day autopilot: when qualifying is done for a class but its finals are not created yet, the status says "Waiting: check qualifying and press 🏁 Create finals for <classes>" instead of "every heat has been run". Finals are still never created automatically.
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "rc-racecore",
"version": "1.89.0",
"version": "1.89.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rc-racecore",
"version": "1.89.0",
"version": "1.89.1",
"hasInstallScript": true,
"dependencies": {
"better-sqlite3": "^12.11.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rc-racecore",
"version": "1.89.0",
"version": "1.89.1",
"private": true,
"description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence",
"engines": {
+2 -2
View File
@@ -2357,7 +2357,7 @@ const TRANSLATIONS = {
"guide.day_flow_5": "5. Kvalet skapas direkt som riktiga heat (Q1 H1, Q1 H2 …) enligt Förare per kvalheat och Antal kvalrundor. Antal varv, tider och starttyp kan finjusteras under Hantera → Raceformat.",
"guide.day_flow_6": "6. När practice är kört: Hantera → Skapa kval från practice. Kvalheaten byggs då om efter practice-resultatet och ersätter de gamla, så inga dubbletter uppstår. Hoppar du över det körs kvalet i deltagarlistans ordning.",
"guide.day_flow_7": "7. Kör kvalet på Race Day. Flest varv vinner och vid lika antal varv vinner lägst total tid. Vill du sortera om kommande heat efter aktuell ranking: Reseeda kommande kval.",
"guide.day_flow_8": "8. När alla kval är körda: tryck 🏁 Alla kval är körda – skapa finaler på Race Day (eller Hantera → Format → Skapa finaler från kval). Korrigera kvalet först om det behövs; finalerna skapas aldrig automatiskt, och med ▶ Kör dagen automatiskt väntar den med texten "Skapa finaler för …" och klassernas namn. A-, B- och C-finaler byggs enligt Förare per final, antal finalheat och räknade finalheat.",
"guide.day_flow_8": "8. När alla kval är körda: tryck 🏁 Alla kval är körda – skapa finaler på Race Day (eller Hantera → Format → Skapa finaler från kval). Korrigera kvalet först om det behövs; finalerna skapas aldrig automatiskt, och med ▶ Kör dagen automatiskt väntar den med texten \"Skapa finaler för …\" och klassernas namn. A-, B- och C-finaler byggs enligt Förare per final, antal finalheat och räknade finalheat.",
"guide.day_flow_9": "9. Kör finalerna, lägsta finalen först. Vid gridstart räknar speakern ner 10 … 3, säger \"Start på tonen\" och sedan kommer tonen. Med bump-ups: Applicera bump-ups när en lägre final är klar. Dagens schema på Race Day lägger alla klasser i en körordning med tider.",
"guide.race_wizard_title": "Create Race Wizard",
"guide.race_wizard_1": "1. Börja i Race Setup och använd wizarden när du skapar ett nytt race, i stället för att bygga allt direkt i Hantera.",
@@ -4617,7 +4617,7 @@ const TRANSLATIONS = {
"guide.day_flow_5": "5. Qualifying is created straight away as real heats (Q1 H1, Q1 H2 …) by Drivers per qualifying heat and Qualifying rounds. Laps, times and start type can be fine-tuned under Manage → Race format.",
"guide.day_flow_6": "6. When practice has run: Manage → Generate qualifying from practice. The heats are rebuilt from the practice result and replace the old ones, so nothing is duplicated. Skip it and qualifying runs in entry-list order.",
"guide.day_flow_7": "7. Run qualifying on Race Day. Most laps wins; on equal laps the lowest total time wins. To re-sort the coming heats by the current ranking: Reseed upcoming qualifying.",
"guide.day_flow_8": "8. When all qualifying has run: press 🏁 All qualifying run – create finals on Race Day (or Manage → Format → Create finals from qualifying). Correct qualifying first if needed; finals are never created automatically, and ▶ Run the day automatically waits, saying "Create finals for …" with the class names. A, B and C finals are built by Drivers per final, final legs and counted legs.",
"guide.day_flow_8": "8. When all qualifying has run: press 🏁 All qualifying run – create finals on Race Day (or Manage → Format → Create finals from qualifying). Correct qualifying first if needed; finals are never created automatically, and ▶ Run the day automatically waits, saying \"Create finals for …\" with the class names. A, B and C finals are built by Drivers per final, final legs and counted legs.",
"guide.day_flow_9": "9. Run the finals, lowest final first. On a grid start the announcer counts 10 … 3, says \"Starting to the sound of the tone\" and the tone follows. With bump-ups: Apply bump-ups when a lower final is done. Today's schedule on Race Day puts every class in one running order with times.",
"guide.race_wizard_title": "Create Race Wizard",
"guide.race_wizard_1": "1. Start in Race Setup and use the wizard when creating a new race instead of building everything directly in Manage.",
+23
View File
@@ -0,0 +1,23 @@
// Every browser file must parse: unit tests never load app.js, so a stray quote in a
// translation string would otherwise only show up as a blank page.
import test from "node:test";
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import { copyFileSync, mkdtempSync, readdirSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
test("every file in src/ parses as JavaScript", () => {
const src = new URL("../src/", import.meta.url).pathname;
const dir = mkdtempSync(join(tmpdir(), "rc-syntax-"));
try {
const bad = readdirSync(src).filter((name) => name.endsWith(".js")).filter((name) => {
const copy = join(dir, name.replace(/\.js$/, ".mjs"));
copyFileSync(join(src, name), copy);
return spawnSync(process.execPath, ["--check", copy], { encoding: "utf8" }).status !== 0;
});
assert.deepEqual(bad, []);
} finally {
rmSync(dir, { recursive: true, force: true });
}
});
+1
View File
@@ -1,4 +1,5 @@
import "./auth.test.js";
import "./frontend_syntax.test.js";
import "./backend_url.test.js";
import "./houseofrc_logic.test.js";
import "./stint_laps_view.test.js";