mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
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:
@@ -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 }) =>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user