chore(deps): upgrade to TypeScript 6, Vite 8, and @vitejs/plugin-react 6

- TypeScript 5.9 → 6.0: add types: ["node"] to base tsconfig, remove
  deprecated baseUrl where unused, add ignoreDeprecations for docs app,
  fix node_modules/ prefix imports with proper package exports
- Vite 7 → 8 + @vitejs/plugin-react 5 → 6: add vite as direct dep
- Add CSS module type declarations for TS6 compatibility
- Update renovate test for pnpm v11 allowBuilds migration
This commit is contained in:
Thomas Camlong committed 2026-06-11 22:28:21 +02:00
1 parent f1fb760c69
commit 38ce6edd17
14 files changed
+801 -803

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"ignoreDeprecations": "6.0",
"baseUrl": ".",
"target": "es5",
"lib": [
@@ -2,7 +2,7 @@
import type { SegmentedControlItem } from "@mantine/core";
import { Button, Fieldset, Grid, Group, SegmentedControl, Stack, Textarea, TextInput } from "@mantine/core";
import { WidgetIntegrationSelect } from "node_modules/@homarr/widgets/src/widget-integration-select";
import { WidgetIntegrationSelect } from "@homarr/widgets/widget-integration-select";
import type { z } from "zod/v4";
import { clientApi } from "@homarr/api/client";
@@ -2,7 +2,7 @@ import { Badge, Card } from "@mantine/core";
import { useElementSize } from "@mantine/hooks";
import { QueryErrorResetBoundary } from "@tanstack/react-query";
import combineClasses from "clsx";
import { NoIntegrationSelectedError } from "node_modules/@homarr/widgets/src/errors";
import { NoIntegrationSelectedError } from "@homarr/widgets/errors/classes";
import { ErrorBoundary } from "react-error-boundary";
import { useRequiredBoard } from "@homarr/boards/context";
-1
View File
@@ -1,7 +1,6 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"],
"@homarr/node-unifi": ["../../node_modules/@types/node-unifi"]
+1 -2
View File
@@ -1,9 +1,8 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
"~/*": ["./src/*"],
"@homarr/node-unifi": ["../../node_modules/@types/node-unifi"]
},
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
+1 -2
View File
@@ -1,9 +1,8 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
"~/*": ["./src/*"],
"@homarr/node-unifi": ["../../node_modules/@types/node-unifi"]
},
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
+1
View File
@@ -56,6 +56,7 @@
"testcontainers": "catalog:",
"turbo": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-tsconfig-paths": "catalog:",
"vitest": "catalog:"
},
@@ -0,0 +1,2 @@
declare const classes: Record<string, string>;
export default classes;
@@ -0,0 +1,2 @@
declare const classes: Record<string, string>;
export default classes;
+2
View File
@@ -17,6 +17,8 @@
"./custom-api/component": "./src/custom-api/component.tsx",
"./custom-api/extract-display-data": "./src/custom-api/extract-display-data.ts",
"./errors": "./src/errors/component.tsx",
"./errors/classes": "./src/errors/index.ts",
"./widget-integration-select": "./src/widget-integration-select.tsx",
"./modals": "./src/modals/index.ts",
"./prefetch": "./src/prefetch.ts"
},
+776 -786
View File
File diff suppressed because it is too large. Load diff
+3 -2
View File
@@ -93,7 +93,7 @@ catalog:
"@types/ws": ^8.18.1
"@types/xml2js": ^0.4.14
"@umami/node": ^0.4.0
"@vitejs/plugin-react": ^5.2.0
"@vitejs/plugin-react": ^6.0.2
"@vitest/coverage-v8": ^4.1.8
"@vitest/ui": ^4.1.8
"@xterm/addon-canvas": ^0.7.0
@@ -175,7 +175,8 @@ catalog:
tsdav: ^2.2.2
tsx: 4.20.4
turbo: ^2.9.16
typescript: ^5.9.3
typescript: ^6.0.3
vite: ^8.0.16
undici: 8.4.0
use-deep-compare-effect: ^1.8.1
video.js: ^8.23.7
+8 -5
View File
@@ -1,22 +1,25 @@
import fs from "fs/promises";
import { join } from "path";
import json5 from "json5";
import { parse } from "yaml";
import { describe, test } from "vitest";
describe("Renovate configuration tests", () => {
test("automerge should be disabled for onlyBuiltDependencies", async () => {
const packageJson = await import("../package.json");
test("automerge should be disabled for allowBuilds dependencies", async () => {
const workspaceYaml = await fs.readFile(join(__dirname, "../pnpm-workspace.yaml"), "utf-8").then(parse);
const renovateConfig = await fs.readFile(join(__dirname, "../.github/renovate.json5"), "utf-8").then(json5.parse);
const onlyBuiltDependencies = packageJson.pnpm.onlyBuiltDependencies;
const allowedBuilds = Object.entries(workspaceYaml.allowBuilds ?? {})
.filter(([, allowed]) => allowed === true)
.map(([name]) => name);
const automergeDisabledDeps = renovateConfig.packageRules
.filter((rule: any) => rule.automerge === false)
.flatMap((rule: any) => rule.matchPackageNames || []);
const missingDeps = onlyBuiltDependencies.filter((dep: string) => !automergeDisabledDeps.includes(dep));
const missingDeps = allowedBuilds.filter((dep: string) => !automergeDisabledDeps.includes(dep));
if (missingDeps.length > 0) {
throw new Error(
`The following onlyBuiltDependencies are missing automerge disable rules in renovate.json5: ${missingDeps.join(", ")}`,
`The following allowBuilds dependencies are missing automerge disable rules in renovate.json5: ${missingDeps.join(", ")}`,
);
}
});
+2 -3
View File
@@ -19,10 +19,9 @@
"noUncheckedIndexedAccess": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"baseUrl": ".",
"types": ["node"],
"paths": {
"@homarr/node-unifi": ["${configDir}/../../node_modules/@types/node-unifi"],
"*": ["node_modules/*"]
"@homarr/node-unifi": ["${configDir}/../../node_modules/@types/node-unifi"]
}
},
"exclude": ["node_modules", "build", "dist", ".next"]