Upgrade all Javascript dependencies

Changes which were needed after the upgrade:

- Replace vite-plugin-virtual (vite 8 incompatible) with vite's
  built-in `define` for the buildTimeConfig injection

- tsconfig: drop deprecated `baseUrl` (TS 5+ resolves `paths`
  relative to tsconfig)

- Vitest 4: import `defineConfig` from `vitest/config` so `test`
  is valid in vite configs

- Zod 4: rename `.errors` to `.issues`, make `ZodSchema` a
  type-only import, drop the removed `SafeParseReturnType`

- Tighten/loosen generic casts in localStore to match stricter
  zod 4 inference

- ESLint 9 `no-useless-assignment`: remove redundant initializers
  and dead reassignments; disable the rule where Svelte's reactive
  blocks confuse the analyser

- Svelte/eslint `prefer-svelte-reactivity`: disable for legacy
  Svelte usages of URL / Set

- Misc naming-convention and prefer-const fixes
This commit is contained in:
Rūdolfs Ošiņš
2026-04-22 17:48:45 +02:00
parent 9ca1d7973e
commit b2f74ebd15
24 changed files with 1958 additions and 2110 deletions
+5 -6
View File
@@ -146,12 +146,11 @@
return patchReviews;
}
let revisionId: string;
$: if (view.name === "diff") {
revisionId = patch.revisions[patch.revisions.length - 1].id;
} else {
revisionId = view.revision;
}
// eslint-disable-next-line no-useless-assignment
$: revisionId =
view.name === "diff"
? patch.revisions[patch.revisions.length - 1].id
: view.revision;
$: uniqueEmbeds = uniqBy(
patch.revisions.flatMap(({ discussions }) =>
+2 -4
View File
@@ -50,8 +50,7 @@
$: fetchCommitCount(repo.rid, commit);
let selectedBranch: string | undefined;
let commitButtonVariant: ComponentProps<CommitButton>["variant"] | undefined =
undefined;
let commitButtonVariant: ComponentProps<CommitButton>["variant"] | undefined;
// Revision may be a commit ID, a branch name or `undefined` which means the
// default branch. We assign `selectedBranch` accordingly.
@@ -65,8 +64,7 @@
$: lastCommit = tree.lastCommit;
$: onCanonical = Boolean(
!peer &&
selectedBranch ===
repo.payloads["xyz.radicle.project"].data.defaultBranch,
selectedBranch === repo.payloads["xyz.radicle.project"].data.defaultBranch,
);
$: if (onCanonical) {
commitButtonVariant = "right";
@@ -174,6 +174,7 @@
} else if (!selectedBranch) {
selectedTab = "branches";
}
// eslint-disable-next-line no-useless-assignment
lastSelectedBranch = selectedBranch;
}
}