Add vitest, add json validation tests, fix broken json files (#566)

This commit is contained in:
Håvard Gjøby Thom
2024-11-28 15:50:40 +01:00
committed by GitHub
parent 000f206d90
commit 03be08be63
208 changed files with 3312 additions and 928 deletions

View File

@@ -9,11 +9,9 @@ import {
} from "@/components/ui/select";
import { OperatingSystems } from "@/config/siteConfig";
import { PlusCircle, Trash2 } from "lucide-react";
import { memo, useCallback, useEffect, useRef } from "react";
import { memo, useCallback, useRef } from "react";
import { z } from "zod";
import { InstallMethodSchema, ScriptSchema } from "../_schemas/schemas";
type Script = z.infer<typeof ScriptSchema>;
import { InstallMethodSchema, ScriptSchema, type Script } from "../_schemas/schemas";
type InstallMethodProps = {
script: Script;
@@ -194,11 +192,11 @@ function InstallMethod({
</SelectContent>
</Select>
<Select
value={method.resources.version ? String(method.resources.version) : undefined}
value={method.resources.version || undefined}
onValueChange={(value) =>
updateInstallMethod(index, "resources", {
...method.resources,
version: value ? Number(value) : null,
version: value || null,
})
}
disabled={method.type === "alpine"}