diff --git a/apps/yaak-client/commands/commands.tsx b/apps/yaak-client/commands/commands.tsx index e1b09484..40618a77 100644 --- a/apps/yaak-client/commands/commands.tsx +++ b/apps/yaak-client/commands/commands.tsx @@ -143,7 +143,7 @@ export const syncWorkspace = createFastMutation< } return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {model} {name} diff --git a/apps/yaak-client/components/DnsOverridesEditor.tsx b/apps/yaak-client/components/DnsOverridesEditor.tsx index 45a4c246..bcdb5483 100644 --- a/apps/yaak-client/components/DnsOverridesEditor.tsx +++ b/apps/yaak-client/components/DnsOverridesEditor.tsx @@ -1,5 +1,6 @@ import type { DnsOverride, Workspace } from "@yaakapp-internal/models"; import { patchModel } from "@yaakapp-internal/models"; +import { fireAndForget } from "../lib/fireAndForget"; import { HStack, Table, @@ -37,7 +38,7 @@ export function DnsOverridesEditor({ workspace }: Props) { const handleChange = useCallback( (overrides: DnsOverride[]) => { - patchModel(workspace, { settingDnsOverrides: overrides }); + fireAndForget(patchModel(workspace, { settingDnsOverrides: overrides })); }, [workspace], ); diff --git a/apps/yaak-client/components/DynamicForm.tsx b/apps/yaak-client/components/DynamicForm.tsx index 575b07a9..4b99f268 100644 --- a/apps/yaak-client/components/DynamicForm.tsx +++ b/apps/yaak-client/components/DynamicForm.tsx @@ -511,16 +511,14 @@ function HttpRequestArg({ help={arg.description} value={value} disabled={arg.disabled} - options={[ - ...httpRequests.map((r) => { + options={httpRequests.map((r) => { return { label: buildRequestBreadcrumbs(r, folders).join(" / ") + (r.id === activeHttpRequest?.id ? " (current)" : ""), value: r.id, }; - }), - ]} + })} /> ); } diff --git a/apps/yaak-client/components/EnvironmentEditDialog.tsx b/apps/yaak-client/components/EnvironmentEditDialog.tsx index ff59e926..effc819d 100644 --- a/apps/yaak-client/components/EnvironmentEditDialog.tsx +++ b/apps/yaak-client/components/EnvironmentEditDialog.tsx @@ -14,6 +14,7 @@ import { import { useHotKey } from "../hooks/useHotKey"; import { atomWithKVStorage } from "../lib/atoms/atomWithKVStorage"; import { deleteModelWithConfirm } from "../lib/deleteModelWithConfirm"; +import { fireAndForget } from "../lib/fireAndForget"; import { jotaiStore } from "../lib/jotai"; import { isBaseEnvironment, isSubEnvironment } from "../lib/model_util"; import { resolvedModelName } from "../lib/resolvedModelName"; @@ -116,7 +117,7 @@ function EnvironmentEditDialogSidebar({ const treeRef = useRef(null); const { baseEnvironment, baseEnvironments } = useEnvironmentsBreakdown(); - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps -- none useLayoutEffect(() => { if (selectedEnvironmentId == null) return; treeRef.current?.selectItem(selectedEnvironmentId); @@ -173,7 +174,9 @@ function EnvironmentEditDialogSidebar({ "sidebar.selected.delete", useCallback(() => { const items = getSelectedTreeModels(); - if (items) handleDeleteSelected(items); + if (items) { + fireAndForget(handleDeleteSelected(items)); + } }, [getSelectedTreeModels, handleDeleteSelected]), { enable: treeHasFocus, priority: 100 }, ); diff --git a/apps/yaak-client/components/ExportDataDialog.tsx b/apps/yaak-client/components/ExportDataDialog.tsx index 37e9f83d..fe5263a5 100644 --- a/apps/yaak-client/components/ExportDataDialog.tsx +++ b/apps/yaak-client/components/ExportDataDialog.tsx @@ -55,7 +55,7 @@ function ExportDataDialogContent({ const handleToggleAll = () => { setSelectedWorkspaces( - // biome-ignore lint/performance/noAccumulatingSpread: none + // oxlint-disable-next-line no-accumulating-spread allSelected ? {} : workspaces.reduce((acc, w) => ({ ...acc, [w.id]: true }), {}), ); }; diff --git a/apps/yaak-client/components/FolderLayout.tsx b/apps/yaak-client/components/FolderLayout.tsx index 34e2f41e..d95cf31d 100644 --- a/apps/yaak-client/components/FolderLayout.tsx +++ b/apps/yaak-client/components/FolderLayout.tsx @@ -42,7 +42,7 @@ export function FolderLayout({ folder, style }: Props) { }, [folder.id, folders, requests]); const handleSendAll = useCallback(() => { - sendAllAction?.call(folder); + void sendAllAction?.call(folder); }, [sendAllAction, folder]); return ( diff --git a/apps/yaak-client/components/GrpcProtoSelectionDialog.tsx b/apps/yaak-client/components/GrpcProtoSelectionDialog.tsx index 872a7b3e..902acf44 100644 --- a/apps/yaak-client/components/GrpcProtoSelectionDialog.tsx +++ b/apps/yaak-client/components/GrpcProtoSelectionDialog.tsx @@ -27,7 +27,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp const services = grpc.reflect.data; const serverReflection = protoFiles.length === 0 && services != null; let reflectError = grpc.reflect.error ?? null; - const reflectionUnimplemented = `${reflectError}`.match(/unimplemented/i); + const reflectionUnimplemented = String(reflectError).match(/unimplemented/i); if (reflectionUnimplemented) { reflectError = null; @@ -100,7 +100,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Found services{" "} {services?.slice(0, 5).map((s, i) => { return ( - + m.name).join(",")}> {s.name} {i === services.length - 1 ? "" : i === services.length - 2 ? " and " : ", "} @@ -116,7 +116,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Server reflection found services {services?.map((s, i) => { return ( - + m.name).join(",")}> {s.name} {i === services.length - 1 ? "" : i === services.length - 2 ? " and " : ", "} @@ -140,8 +140,8 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp {protoFiles.map((f, i) => { const parts = f.split("/"); + // oxlint-disable-next-line no-array-index-key -- none return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none diff --git a/apps/yaak-client/components/GrpcResponsePane.tsx b/apps/yaak-client/components/GrpcResponsePane.tsx index 5a6f422f..601b3e12 100644 --- a/apps/yaak-client/components/GrpcResponsePane.tsx +++ b/apps/yaak-client/components/GrpcResponsePane.tsx @@ -48,7 +48,7 @@ export function GrpcResponsePane({ style, methodType, activeRequest }: Props) { ); // Set the active message to the first message received if unary - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps useEffect(() => { if (events.length === 0 || activeEvent != null || methodType !== "unary") { return; diff --git a/apps/yaak-client/components/ImportCurlButton.tsx b/apps/yaak-client/components/ImportCurlButton.tsx index c0de6b2d..28575c70 100644 --- a/apps/yaak-client/components/ImportCurlButton.tsx +++ b/apps/yaak-client/components/ImportCurlButton.tsx @@ -13,9 +13,9 @@ export function ImportCurlButton() { const importCurl = useImportCurl(); const [isLoading, setIsLoading] = useState(false); - // biome-ignore lint/correctness/useExhaustiveDependencies: none + // oxlint-disable-next-line react-hooks/exhaustive-deps -- none useEffect(() => { - readText().then(setClipboardText); + void readText().then(setClipboardText); }, [focused]); if (!clipboardText?.trim().startsWith("curl ")) { diff --git a/apps/yaak-client/components/JsonBodyEditor.tsx b/apps/yaak-client/components/JsonBodyEditor.tsx index cdcef87a..fe019379 100644 --- a/apps/yaak-client/components/JsonBodyEditor.tsx +++ b/apps/yaak-client/components/JsonBodyEditor.tsx @@ -4,6 +4,7 @@ import { patchModel } from "@yaakapp-internal/models"; import { Banner, Icon } from "@yaakapp-internal/ui"; import { useCallback, useMemo } from "react"; import { useKeyValue } from "../hooks/useKeyValue"; +import { fireAndForget } from "../lib/fireAndForget"; import { textLikelyContainsJsonComments } from "../lib/jsonComments"; import type { DropdownItem } from "./core/Dropdown"; import { Dropdown } from "./core/Dropdown"; @@ -57,12 +58,12 @@ export function JsonBodyEditor({ forceUpdateKey, heightMode, request }: Props) { } else { delete newBody.sendJsonComments; } - patchModel(request, { body: newBody }); + fireAndForget(patchModel(request, { body: newBody })); }, [request, autoFix]); const handleDropdownOpen = useCallback(() => { if (!bannerDismissed) { - setBannerDismissed(true); + fireAndForget(setBannerDismissed(true)); } }, [bannerDismissed, setBannerDismissed]); diff --git a/apps/yaak-client/components/RouteError.tsx b/apps/yaak-client/components/RouteError.tsx index 0e6ba1a7..1e442e00 100644 --- a/apps/yaak-client/components/RouteError.tsx +++ b/apps/yaak-client/components/RouteError.tsx @@ -4,7 +4,7 @@ import { DetailsBanner } from "./core/DetailsBanner"; export default function RouteError({ error }: { error: unknown }) { console.log("Error", error); const stringified = JSON.stringify(error); - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none const message = (error as any).message ?? stringified; const stack = typeof error === "object" && error != null && "stack" in error ? String(error.stack) : null; diff --git a/apps/yaak-client/components/Settings/SettingsCertificates.tsx b/apps/yaak-client/components/Settings/SettingsCertificates.tsx index 81b5de1c..b42b2593 100644 --- a/apps/yaak-client/components/Settings/SettingsCertificates.tsx +++ b/apps/yaak-client/components/Settings/SettingsCertificates.tsx @@ -236,7 +236,7 @@ export function SettingsCertificates() { {certificates.map((cert, index) => ( { const items = getSelectedTreeModels(); - if (items) handleDeleteSelected(items); + if (items) void handleDeleteSelected(items); }, [getSelectedTreeModels, handleDeleteSelected]), { enable: treeHasFocus }, ); diff --git a/apps/yaak-client/components/TemplateFunctionDialog.tsx b/apps/yaak-client/components/TemplateFunctionDialog.tsx index f0df7946..e5d8c86e 100644 --- a/apps/yaak-client/components/TemplateFunctionDialog.tsx +++ b/apps/yaak-client/components/TemplateFunctionDialog.tsx @@ -138,7 +138,7 @@ function InitializedTemplateFunctionDialog({ }); const tooLarge = rendered.data ? rendered.data.length > 10000 : false; - // biome-ignore lint/correctness/useExhaustiveDependencies: Only update this on rendered data change to keep secrets hidden on input change + // oxlint-disable-next-line react-hooks/exhaustive-deps -- Only update this on rendered data change to keep secrets hidden on input change const dataContainsSecrets = useMemo(() => { for (const [name, value] of Object.entries(argValues)) { const arg = templateFunction.data?.args.find((a) => "name" in a && a.name === name); diff --git a/apps/yaak-client/components/WorkspaceEncryptionSetting.tsx b/apps/yaak-client/components/WorkspaceEncryptionSetting.tsx index a1571827..8e837ce9 100644 --- a/apps/yaak-client/components/WorkspaceEncryptionSetting.tsx +++ b/apps/yaak-client/components/WorkspaceEncryptionSetting.tsx @@ -126,7 +126,7 @@ export function WorkspaceEncryptionSetting({ size, expanded, onDone, onEnabledEn await enableEncryption(workspaceMeta.workspaceId); setJustEnabledEncryption(true); } catch (err) { - setError(`Failed to enable encryption: ${err}`); + setError(`Failed to enable encryption: ${String(err)}`); } }} > @@ -284,7 +284,7 @@ function HighlightedKey({ keyText, show }: { keyText: string; show: boolean }) { keyText.split("").map((c, i) => { return ( storageKey diff --git a/apps/yaak-client/components/core/Dropdown.tsx b/apps/yaak-client/components/core/Dropdown.tsx index c9ca5955..25664e6a 100644 --- a/apps/yaak-client/components/core/Dropdown.tsx +++ b/apps/yaak-client/components/core/Dropdown.tsx @@ -32,6 +32,7 @@ import { useStateWithDeps } from "../../hooks/useStateWithDeps"; import { generateId } from "../../lib/generateId"; import { getNodeText } from "../../lib/getNodeText"; import { jotaiStore } from "../../lib/jotai"; +import { fireAndForget } from "../../lib/fireAndForget"; import { ErrorBoundary } from "../ErrorBoundary"; import { Button } from "./Button"; import { Hotkey } from "./Hotkey"; @@ -611,7 +612,7 @@ const Menu = forwardRef @@ -759,8 +760,7 @@ const Menu = forwardRef {item.label} @@ -774,7 +774,7 @@ const Menu = forwardRef @@ -782,7 +782,6 @@ const Menu = forwardRef {activeSubmenu && ( - // biome-ignore lint/a11y/noStaticElementInteractions: Container div that cancels hover timeout
{ diff --git a/apps/yaak-client/components/core/Editor/Editor.tsx b/apps/yaak-client/components/core/Editor/Editor.tsx index b3ee5d3b..d9b8e1ed 100644 --- a/apps/yaak-client/components/core/Editor/Editor.tsx +++ b/apps/yaak-client/components/core/Editor/Editor.tsx @@ -327,7 +327,7 @@ function EditorInner({ ); // Update the language extension when the language changes - // biome-ignore lint/correctness/useExhaustiveDependencies: intentionally limited deps + // oxlint-disable-next-line react-hooks/exhaustive-deps -- intentionally limited deps useEffect(() => { if (cm.current === null) return; const { view, languageCompartment } = cm.current; @@ -361,7 +361,7 @@ function EditorInner({ ]); // Initialize the editor when ref mounts - // biome-ignore lint/correctness/useExhaustiveDependencies: only reinitialize when necessary + // oxlint-disable-next-line react-hooks/exhaustive-deps -- only reinitialize when necessary const initEditorRef = useCallback( function initEditorRef(container: HTMLDivElement | null) { if (container === null) { diff --git a/apps/yaak-client/components/core/Hotkey.tsx b/apps/yaak-client/components/core/Hotkey.tsx index 485d13d5..2a4bc11a 100644 --- a/apps/yaak-client/components/core/Hotkey.tsx +++ b/apps/yaak-client/components/core/Hotkey.tsx @@ -35,7 +35,7 @@ export function HotkeyRaw({ labelParts, className, variant }: HotkeyRawProps) { )} > {labelParts.map((char, index) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key
{char}
diff --git a/apps/yaak-client/components/core/Input.tsx b/apps/yaak-client/components/core/Input.tsx index c636daf3..35bc826c 100644 --- a/apps/yaak-client/components/core/Input.tsx +++ b/apps/yaak-client/components/core/Input.tsx @@ -142,7 +142,7 @@ function BaseInput({ isFocused: () => editorRef.current?.hasFocus ?? false, value: () => editorRef.current?.state.doc.toString() ?? "", dispatch: (...args) => { - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any editorRef.current?.dispatch(...(args as any)); }, selectAll() { @@ -327,7 +327,11 @@ function BaseInput({ {type === "password" && !disableObscureToggle && ( ( { // Remove empty headers on initial render and ensure they all have valid ids (pairs didn't use to have IDs) const newPairs: PairWithId[] = []; diff --git a/apps/yaak-client/components/core/PlainInput.tsx b/apps/yaak-client/components/core/PlainInput.tsx index af5465a7..95cbaec8 100644 --- a/apps/yaak-client/components/core/PlainInput.tsx +++ b/apps/yaak-client/components/core/PlainInput.tsx @@ -195,7 +195,7 @@ export const PlainInput = forwardRef<{ focus: () => void }, PlainInputProps>(fun key={forceUpdateKey} type={type === "password" && !obscured ? "text" : type} name={name} - // biome-ignore lint/a11y/noAutofocus: Who cares + // oxlint-disable-next-line jsx-a11y/no-autofocus autoFocus={autoFocus} defaultValue={defaultValue ?? undefined} autoComplete="off" @@ -213,7 +213,11 @@ export const PlainInput = forwardRef<{ focus: () => void }, PlainInputProps>(fun {type === "password" && !hideObscureToggle && ( ({ if (e.key === "ArrowRight") { e.preventDefault(); const newIndex = Math.abs((selectedIndex + 1) % options.length); - options[newIndex] && setSelectedValue(options[newIndex].value); + if (options[newIndex]) { setSelectedValue(options[newIndex].value); } const child = containerRef.current?.children[newIndex] as HTMLButtonElement; child.focus(); } else if (e.key === "ArrowLeft") { e.preventDefault(); const newIndex = Math.abs((selectedIndex - 1) % options.length); - options[newIndex] && setSelectedValue(options[newIndex].value); + if (options[newIndex]) { setSelectedValue(options[newIndex].value); } const child = containerRef.current?.children[newIndex] as HTMLButtonElement; child.focus(); } diff --git a/apps/yaak-client/components/core/Tabs/Tabs.tsx b/apps/yaak-client/components/core/Tabs/Tabs.tsx index 43052326..e287ae55 100644 --- a/apps/yaak-client/components/core/Tabs/Tabs.tsx +++ b/apps/yaak-client/components/core/Tabs/Tabs.tsx @@ -23,6 +23,7 @@ import { } from "react"; import { useKeyValue } from "../../../hooks/useKeyValue"; import { computeSideForDragMove, DropMarker } from "@yaakapp-internal/ui"; +import { fireAndForget } from "../../../lib/fireAndForget"; import { ErrorBoundary } from "../../ErrorBoundary"; import type { ButtonProps } from "../Button"; import { Button } from "../Button"; @@ -142,7 +143,7 @@ export const Tabs = forwardRef(function Tabs( forwardedRef, () => ({ setActiveTab: (value: string) => { - onChangeValue(value); + fireAndForget(onChangeValue(value)); }, }), [onChangeValue], diff --git a/apps/yaak-client/components/core/Tooltip.tsx b/apps/yaak-client/components/core/Tooltip.tsx index a34ad362..94d71a50 100644 --- a/apps/yaak-client/components/core/Tooltip.tsx +++ b/apps/yaak-client/components/core/Tooltip.tsx @@ -110,7 +110,7 @@ export function Tooltip({ children, className, content, tabIndex, size = "md" }: />
- {/** biome-ignore lint/a11y/useSemanticElements: Needs to be usable in other buttons */} + {/* oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- Needs to be usable in other buttons */} ), }); - sync({ force: true }); + fireAndForget(sync({ force: true })); }, onError(err) { showErrorToast({ diff --git a/apps/yaak-client/components/git/HistoryDialog.tsx b/apps/yaak-client/components/git/HistoryDialog.tsx index a87b0aef..b1f78c0f 100644 --- a/apps/yaak-client/components/git/HistoryDialog.tsx +++ b/apps/yaak-client/components/git/HistoryDialog.tsx @@ -27,7 +27,7 @@ export function HistoryDialog({ log }: Props) { {log.map((l) => ( - + {l.message || No message} diff --git a/apps/yaak-client/components/graphql/GraphQLDocsExplorer.tsx b/apps/yaak-client/components/graphql/GraphQLDocsExplorer.tsx index e149c2e5..9bcc287f 100644 --- a/apps/yaak-client/components/graphql/GraphQLDocsExplorer.tsx +++ b/apps/yaak-client/components/graphql/GraphQLDocsExplorer.tsx @@ -43,7 +43,7 @@ interface Props { type ExplorerItem = | { kind: "type"; type: GraphQLType; from: ExplorerItem } - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none | { kind: "field"; type: GraphQLField; from: ExplorerItem } | { kind: "input_field"; type: GraphQLInputField; from: ExplorerItem } | null; @@ -144,7 +144,7 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({ ) : (
@@ -180,14 +180,14 @@ function GraphQLExplorerHeader({ {crumbs.map((crumb, i) => { return ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line no-array-index-key -- none {i > 0 && } {crumb === item || item == null ? ( ) : crumb === item ? null : ( { const fieldItem: ExplorerItem = toExplorerItem(field, item); return ( -
+
Arguments {item.type.args.map((a) => { return ( -
+
+
+
( {item.type.args.map((arg) => (
{item.type.args.length > 1 && <>  } @@ -672,7 +672,7 @@ function Subheading({ children, count }: { children: ReactNode; count?: number } interface SearchResult { name: string; - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none type: GraphQLNamedType | GraphQLField | GraphQLInputField; score: number; from: GraphQLNamedType | null; @@ -796,7 +796,11 @@ function GqlSchemaSearch({ label="search" hideLabel defaultValue={value} - placeholder={focused ? `Search ${currentItem?.type.toString() ?? "Schema"}` : "Search"} + placeholder={ + focused + ? `Search ${currentItem != null && "name" in currentItem.type ? currentItem.type.name : "Schema"}` + : "Search" + } leftSlot={
@@ -895,10 +899,10 @@ function DocMarkdown({ children, className }: { children: string | null; classNa function walkTypeGraph( schema: GraphQLSchema, - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none start: GraphQLType | GraphQLField | GraphQLInputField | null, cb: ( - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none type: GraphQLNamedType | GraphQLField | GraphQLInputField, from: GraphQLNamedType | null, path: string[], @@ -906,7 +910,7 @@ function walkTypeGraph( ) { const visited = new Set(); const queue: Array<{ - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any -- none current: GraphQLType | GraphQLField | GraphQLInputField; from: GraphQLNamedType | null; path: string[]; @@ -926,7 +930,7 @@ function walkTypeGraph( } while (queue.length > 0) { - // biome-ignore lint/style/noNonNullAssertion: none + // oxlint-disable-next-line no-non-null-assertion -- none const { current, from, path } = queue.shift()!; if (!isNamedType(current)) continue; @@ -979,7 +983,7 @@ function walkTypeGraph( } } -// biome-ignore lint/suspicious/noExplicitAny: none +// oxlint-disable-next-line no-explicit-any -- none function toExplorerItem(t: any, from: ExplorerItem | null): ExplorerItem | null { if (t == null) return null; diff --git a/apps/yaak-client/components/responseViewers/CsvViewer.tsx b/apps/yaak-client/components/responseViewers/CsvViewer.tsx index b5e0a286..fe94480d 100644 --- a/apps/yaak-client/components/responseViewers/CsvViewer.tsx +++ b/apps/yaak-client/components/responseViewers/CsvViewer.tsx @@ -43,7 +43,7 @@ export function CsvViewerInner({ text, className }: { text: string | null; class {parsed.data.map((row, i) => ( - // biome-ignore lint/suspicious/noArrayIndexKey: none + // oxlint-disable-next-line react/no-array-index-key {parsed.meta.fields?.map((key) => ( {row[key] ?? ""} diff --git a/apps/yaak-client/components/responseViewers/MultipartViewer.tsx b/apps/yaak-client/components/responseViewers/MultipartViewer.tsx index a5c1db24..c3258af1 100644 --- a/apps/yaak-client/components/responseViewers/MultipartViewer.tsx +++ b/apps/yaak-client/components/responseViewers/MultipartViewer.tsx @@ -73,7 +73,7 @@ export function MultipartViewer({ data, boundary, idPrefix = "multipart" }: Prop > {parts.map((part, i) => ( { +fireAndForget(import("react-pdf").then(({ pdfjs }) => { pdfjs.GlobalWorkerOptions.workerSrc = new URL( "pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url, ).toString(); -}); +})); interface Props { bodyPath?: string; @@ -56,7 +57,7 @@ export function PdfViewer({ bodyPath, data }: Props) { externalLinkTarget="_blank" externalLinkRel="noopener noreferrer" > - {Array.from(new Array(numPages), (_, index) => ( + {Array.from({ length: numPages ?? 0 }, (_, index) => ( { // Skip introspection if automatic is disabled and we already have one if (options.disabled) { @@ -141,14 +141,14 @@ function tryParseIntrospectionToSchema( let parsedResponse: IntrospectionQuery; try { parsedResponse = JSON.parse(content).data; - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any } catch (e: any) { return { error: String("message" in e ? e.message : e) }; } try { return { schema: buildClientSchema(parsedResponse, {}) }; - // biome-ignore lint/suspicious/noExplicitAny: none + // oxlint-disable-next-line no-explicit-any } catch (e: any) { return { error: String("message" in e ? e.message : e) }; } diff --git a/apps/yaak-client/lib/initGlobalListeners.tsx b/apps/yaak-client/lib/initGlobalListeners.tsx index 882011e7..cd27f68e 100644 --- a/apps/yaak-client/lib/initGlobalListeners.tsx +++ b/apps/yaak-client/lib/initGlobalListeners.tsx @@ -36,7 +36,7 @@ export function initGlobalListeners() { }); // Show errors for any plugins that failed to load during startup - invokeCmd<[string, string][]>("cmd_plugin_init_errors").then((errors) => { + void invokeCmd<[string, string][]>("cmd_plugin_init_errors").then((errors) => { for (const [dir, err] of errors) { const name = dir.split(/[/\\]/).pop() ?? dir; showToast({ @@ -93,7 +93,7 @@ export function initGlobalListeners() { done, }, }; - emit(event.id, result); + void emit(event.id, result); }; const values = await showPromptForm({ @@ -122,7 +122,7 @@ export function initGlobalListeners() { // Listen for update events listenToTauriEvent("update_available", async ({ payload }) => { console.log("Got update available", payload); - showUpdateAvailableToast(payload); + void showUpdateAvailableToast(payload); }); listenToTauriEvent("notification", ({ payload }) => { diff --git a/apps/yaak-client/package.json b/apps/yaak-client/package.json index 7d60d9a8..7b6a8d52 100644 --- a/apps/yaak-client/package.json +++ b/apps/yaak-client/package.json @@ -48,6 +48,7 @@ "eventemitter3": "^5.0.1", "focus-trap-react": "^11.0.4", "fuzzbunny": "^1.0.1", + "graphql": "^16.13.1", "hexy": "^0.3.5", "history": "^5.3.0", "jotai": "^2.18.0", diff --git a/apps/yaak-client/routeTree.gen.ts b/apps/yaak-client/routeTree.gen.ts index d2d93192..30ef4069 100644 --- a/apps/yaak-client/routeTree.gen.ts +++ b/apps/yaak-client/routeTree.gen.ts @@ -8,131 +8,133 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -import { Route as rootRouteImport } from "./routes/__root"; -import { Route as IndexRouteImport } from "./routes/index"; -import { Route as WorkspacesIndexRouteImport } from "./routes/workspaces/index"; -import { Route as WorkspacesWorkspaceIdIndexRouteImport } from "./routes/workspaces/$workspaceId/index"; -import { Route as WorkspacesWorkspaceIdSettingsRouteImport } from "./routes/workspaces/$workspaceId/settings"; -import { Route as WorkspacesWorkspaceIdRequestsRequestIdRouteImport } from "./routes/workspaces/$workspaceId/requests/$requestId"; +import { Route as rootRouteImport } from './routes/__root' +import { Route as IndexRouteImport } from './routes/index' +import { Route as WorkspacesIndexRouteImport } from './routes/workspaces/index' +import { Route as WorkspacesWorkspaceIdIndexRouteImport } from './routes/workspaces/$workspaceId/index' +import { Route as WorkspacesWorkspaceIdSettingsRouteImport } from './routes/workspaces/$workspaceId/settings' +import { Route as WorkspacesWorkspaceIdRequestsRequestIdRouteImport } from './routes/workspaces/$workspaceId/requests/$requestId' const IndexRoute = IndexRouteImport.update({ - id: "/", - path: "/", + id: '/', + path: '/', getParentRoute: () => rootRouteImport, -} as any); +} as any) const WorkspacesIndexRoute = WorkspacesIndexRouteImport.update({ - id: "/workspaces/", - path: "/workspaces/", + id: '/workspaces/', + path: '/workspaces/', getParentRoute: () => rootRouteImport, -} as any); -const WorkspacesWorkspaceIdIndexRoute = WorkspacesWorkspaceIdIndexRouteImport.update({ - id: "/workspaces/$workspaceId/", - path: "/workspaces/$workspaceId/", - getParentRoute: () => rootRouteImport, -} as any); -const WorkspacesWorkspaceIdSettingsRoute = WorkspacesWorkspaceIdSettingsRouteImport.update({ - id: "/workspaces/$workspaceId/settings", - path: "/workspaces/$workspaceId/settings", - getParentRoute: () => rootRouteImport, -} as any); +} as any) +const WorkspacesWorkspaceIdIndexRoute = + WorkspacesWorkspaceIdIndexRouteImport.update({ + id: '/workspaces/$workspaceId/', + path: '/workspaces/$workspaceId/', + getParentRoute: () => rootRouteImport, + } as any) +const WorkspacesWorkspaceIdSettingsRoute = + WorkspacesWorkspaceIdSettingsRouteImport.update({ + id: '/workspaces/$workspaceId/settings', + path: '/workspaces/$workspaceId/settings', + getParentRoute: () => rootRouteImport, + } as any) const WorkspacesWorkspaceIdRequestsRequestIdRoute = WorkspacesWorkspaceIdRequestsRequestIdRouteImport.update({ - id: "/workspaces/$workspaceId/requests/$requestId", - path: "/workspaces/$workspaceId/requests/$requestId", + id: '/workspaces/$workspaceId/requests/$requestId', + path: '/workspaces/$workspaceId/requests/$requestId', getParentRoute: () => rootRouteImport, - } as any); + } as any) export interface FileRoutesByFullPath { - "/": typeof IndexRoute; - "/workspaces": typeof WorkspacesIndexRoute; - "/workspaces/$workspaceId/settings": typeof WorkspacesWorkspaceIdSettingsRoute; - "/workspaces/$workspaceId": typeof WorkspacesWorkspaceIdIndexRoute; - "/workspaces/$workspaceId/requests/$requestId": typeof WorkspacesWorkspaceIdRequestsRequestIdRoute; + '/': typeof IndexRoute + '/workspaces': typeof WorkspacesIndexRoute + '/workspaces/$workspaceId/settings': typeof WorkspacesWorkspaceIdSettingsRoute + '/workspaces/$workspaceId': typeof WorkspacesWorkspaceIdIndexRoute + '/workspaces/$workspaceId/requests/$requestId': typeof WorkspacesWorkspaceIdRequestsRequestIdRoute } export interface FileRoutesByTo { - "/": typeof IndexRoute; - "/workspaces": typeof WorkspacesIndexRoute; - "/workspaces/$workspaceId/settings": typeof WorkspacesWorkspaceIdSettingsRoute; - "/workspaces/$workspaceId": typeof WorkspacesWorkspaceIdIndexRoute; - "/workspaces/$workspaceId/requests/$requestId": typeof WorkspacesWorkspaceIdRequestsRequestIdRoute; + '/': typeof IndexRoute + '/workspaces': typeof WorkspacesIndexRoute + '/workspaces/$workspaceId/settings': typeof WorkspacesWorkspaceIdSettingsRoute + '/workspaces/$workspaceId': typeof WorkspacesWorkspaceIdIndexRoute + '/workspaces/$workspaceId/requests/$requestId': typeof WorkspacesWorkspaceIdRequestsRequestIdRoute } export interface FileRoutesById { - __root__: typeof rootRouteImport; - "/": typeof IndexRoute; - "/workspaces/": typeof WorkspacesIndexRoute; - "/workspaces/$workspaceId/settings": typeof WorkspacesWorkspaceIdSettingsRoute; - "/workspaces/$workspaceId/": typeof WorkspacesWorkspaceIdIndexRoute; - "/workspaces/$workspaceId/requests/$requestId": typeof WorkspacesWorkspaceIdRequestsRequestIdRoute; + __root__: typeof rootRouteImport + '/': typeof IndexRoute + '/workspaces/': typeof WorkspacesIndexRoute + '/workspaces/$workspaceId/settings': typeof WorkspacesWorkspaceIdSettingsRoute + '/workspaces/$workspaceId/': typeof WorkspacesWorkspaceIdIndexRoute + '/workspaces/$workspaceId/requests/$requestId': typeof WorkspacesWorkspaceIdRequestsRequestIdRoute } export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath; + fileRoutesByFullPath: FileRoutesByFullPath fullPaths: - | "/" - | "/workspaces" - | "/workspaces/$workspaceId/settings" - | "/workspaces/$workspaceId" - | "/workspaces/$workspaceId/requests/$requestId"; - fileRoutesByTo: FileRoutesByTo; + | '/' + | '/workspaces' + | '/workspaces/$workspaceId/settings' + | '/workspaces/$workspaceId' + | '/workspaces/$workspaceId/requests/$requestId' + fileRoutesByTo: FileRoutesByTo to: - | "/" - | "/workspaces" - | "/workspaces/$workspaceId/settings" - | "/workspaces/$workspaceId" - | "/workspaces/$workspaceId/requests/$requestId"; + | '/' + | '/workspaces' + | '/workspaces/$workspaceId/settings' + | '/workspaces/$workspaceId' + | '/workspaces/$workspaceId/requests/$requestId' id: - | "__root__" - | "/" - | "/workspaces/" - | "/workspaces/$workspaceId/settings" - | "/workspaces/$workspaceId/" - | "/workspaces/$workspaceId/requests/$requestId"; - fileRoutesById: FileRoutesById; + | '__root__' + | '/' + | '/workspaces/' + | '/workspaces/$workspaceId/settings' + | '/workspaces/$workspaceId/' + | '/workspaces/$workspaceId/requests/$requestId' + fileRoutesById: FileRoutesById } export interface RootRouteChildren { - IndexRoute: typeof IndexRoute; - WorkspacesIndexRoute: typeof WorkspacesIndexRoute; - WorkspacesWorkspaceIdSettingsRoute: typeof WorkspacesWorkspaceIdSettingsRoute; - WorkspacesWorkspaceIdIndexRoute: typeof WorkspacesWorkspaceIdIndexRoute; - WorkspacesWorkspaceIdRequestsRequestIdRoute: typeof WorkspacesWorkspaceIdRequestsRequestIdRoute; + IndexRoute: typeof IndexRoute + WorkspacesIndexRoute: typeof WorkspacesIndexRoute + WorkspacesWorkspaceIdSettingsRoute: typeof WorkspacesWorkspaceIdSettingsRoute + WorkspacesWorkspaceIdIndexRoute: typeof WorkspacesWorkspaceIdIndexRoute + WorkspacesWorkspaceIdRequestsRequestIdRoute: typeof WorkspacesWorkspaceIdRequestsRequestIdRoute } -declare module "@tanstack/react-router" { +declare module '@tanstack/react-router' { interface FileRoutesByPath { - "/": { - id: "/"; - path: "/"; - fullPath: "/"; - preLoaderRoute: typeof IndexRouteImport; - parentRoute: typeof rootRouteImport; - }; - "/workspaces/": { - id: "/workspaces/"; - path: "/workspaces"; - fullPath: "/workspaces"; - preLoaderRoute: typeof WorkspacesIndexRouteImport; - parentRoute: typeof rootRouteImport; - }; - "/workspaces/$workspaceId/": { - id: "/workspaces/$workspaceId/"; - path: "/workspaces/$workspaceId"; - fullPath: "/workspaces/$workspaceId"; - preLoaderRoute: typeof WorkspacesWorkspaceIdIndexRouteImport; - parentRoute: typeof rootRouteImport; - }; - "/workspaces/$workspaceId/settings": { - id: "/workspaces/$workspaceId/settings"; - path: "/workspaces/$workspaceId/settings"; - fullPath: "/workspaces/$workspaceId/settings"; - preLoaderRoute: typeof WorkspacesWorkspaceIdSettingsRouteImport; - parentRoute: typeof rootRouteImport; - }; - "/workspaces/$workspaceId/requests/$requestId": { - id: "/workspaces/$workspaceId/requests/$requestId"; - path: "/workspaces/$workspaceId/requests/$requestId"; - fullPath: "/workspaces/$workspaceId/requests/$requestId"; - preLoaderRoute: typeof WorkspacesWorkspaceIdRequestsRequestIdRouteImport; - parentRoute: typeof rootRouteImport; - }; + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/workspaces/': { + id: '/workspaces/' + path: '/workspaces' + fullPath: '/workspaces' + preLoaderRoute: typeof WorkspacesIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/workspaces/$workspaceId/': { + id: '/workspaces/$workspaceId/' + path: '/workspaces/$workspaceId' + fullPath: '/workspaces/$workspaceId' + preLoaderRoute: typeof WorkspacesWorkspaceIdIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/workspaces/$workspaceId/settings': { + id: '/workspaces/$workspaceId/settings' + path: '/workspaces/$workspaceId/settings' + fullPath: '/workspaces/$workspaceId/settings' + preLoaderRoute: typeof WorkspacesWorkspaceIdSettingsRouteImport + parentRoute: typeof rootRouteImport + } + '/workspaces/$workspaceId/requests/$requestId': { + id: '/workspaces/$workspaceId/requests/$requestId' + path: '/workspaces/$workspaceId/requests/$requestId' + fullPath: '/workspaces/$workspaceId/requests/$requestId' + preLoaderRoute: typeof WorkspacesWorkspaceIdRequestsRequestIdRouteImport + parentRoute: typeof rootRouteImport + } } } @@ -141,8 +143,9 @@ const rootRouteChildren: RootRouteChildren = { WorkspacesIndexRoute: WorkspacesIndexRoute, WorkspacesWorkspaceIdSettingsRoute: WorkspacesWorkspaceIdSettingsRoute, WorkspacesWorkspaceIdIndexRoute: WorkspacesWorkspaceIdIndexRoute, - WorkspacesWorkspaceIdRequestsRequestIdRoute: WorkspacesWorkspaceIdRequestsRequestIdRoute, -}; + WorkspacesWorkspaceIdRequestsRequestIdRoute: + WorkspacesWorkspaceIdRequestsRequestIdRoute, +} export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) - ._addFileTypes(); + ._addFileTypes() diff --git a/apps/yaak-proxy/hooks/useActionMetadata.ts b/apps/yaak-proxy/hooks/useActionMetadata.ts index 8d4b3040..672472ab 100644 --- a/apps/yaak-proxy/hooks/useActionMetadata.ts +++ b/apps/yaak-proxy/hooks/useActionMetadata.ts @@ -3,11 +3,13 @@ import { useEffect, useState } from "react"; import { rpc } from "../lib/rpc"; /** Look up metadata for a specific action invocation. */ +// oxlint-disable-next-line no-redundant-type-constituents -- ActionMetadata resolves at runtime export function useActionMetadata(action: ActionInvocation): ActionMetadata | null { + // oxlint-disable-next-line no-redundant-type-constituents -- ActionMetadata resolves at runtime const [meta, setMeta] = useState(null); useEffect(() => { - getActions().then((actions) => { + void getActions().then((actions) => { const match = actions.find( ([inv]) => inv.scope === action.scope && inv.action === action.action, ); diff --git a/apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts b/apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts index 31d7fa46..a38a0065 100644 --- a/apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts +++ b/apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts @@ -16,7 +16,7 @@ export function useRpcQueryWithEvent< const query = useRpcQuery(cmd, payload, opts); useRpcEvent(event, () => { - queryClient.invalidateQueries({ queryKey: [cmd, payload] }); + void queryClient.invalidateQueries({ queryKey: [cmd, payload] }); }); return query; diff --git a/apps/yaak-proxy/lib/fireAndForget.ts b/apps/yaak-proxy/lib/fireAndForget.ts new file mode 100644 index 00000000..050f4f66 --- /dev/null +++ b/apps/yaak-proxy/lib/fireAndForget.ts @@ -0,0 +1,5 @@ +export function fireAndForget(promise: Promise) { + promise.catch((err: unknown) => { + console.error("Unhandled async error:", err); + }); +} diff --git a/apps/yaak-proxy/lib/hotkeys.ts b/apps/yaak-proxy/lib/hotkeys.ts index 29eb79cf..58351377 100644 --- a/apps/yaak-proxy/lib/hotkeys.ts +++ b/apps/yaak-proxy/lib/hotkeys.ts @@ -38,6 +38,7 @@ export async function initHotkeys(): Promise<() => void> { const bindings: ActionBinding[] = actions .filter( + // oxlint-disable-next-line no-redundant-type-constituents -- ActionMetadata resolves at runtime (entry): entry is [ActionInvocation, ActionMetadata & { defaultHotkey: string }] => entry[1].defaultHotkey != null, ) @@ -51,7 +52,7 @@ export async function initHotkeys(): Promise<() => void> { for (const binding of bindings) { if (matchesEvent(binding.keys, e)) { e.preventDefault(); - rpc("execute_action", binding.invocation); + void rpc("execute_action", binding.invocation); return; } } diff --git a/apps/yaak-proxy/main.tsx b/apps/yaak-proxy/main.tsx index 6ec4699f..1e197fb0 100644 --- a/apps/yaak-proxy/main.tsx +++ b/apps/yaak-proxy/main.tsx @@ -13,15 +13,15 @@ const queryClient = new QueryClient(); const jotaiStore = createStore(); // Load initial models from the database -rpc("list_models", {}).then((res) => { +void rpc("list_models", {}).then((res) => { jotaiStore.set(dataAtom, (prev) => replaceAll(prev, "http_exchange", res.httpExchanges)); }); // Register hotkeys from action metadata -initHotkeys(); +void initHotkeys(); // Subscribe to model change events from the backend -listen("model_write", (payload) => { +void listen("model_write", (payload) => { jotaiStore.set(dataAtom, (prev) => applyChange(prev, "http_exchange", payload.model, payload.change), ); diff --git a/crates-tauri/yaak-app-client/src/lib.rs b/crates-tauri/yaak-app-client/src/lib.rs index 3d4e4334..c67a96b7 100644 --- a/crates-tauri/yaak-app-client/src/lib.rs +++ b/crates-tauri/yaak-app-client/src/lib.rs @@ -1460,12 +1460,6 @@ async fn cmd_reload_plugins( Ok(errors) } -#[tauri::command] -async fn cmd_plugin_init_errors( - plugin_manager: State<'_, PluginManager>, -) -> YaakResult> { - Ok(plugin_manager.take_init_errors().await) -} #[tauri::command] async fn cmd_plugin_info( @@ -1746,7 +1740,6 @@ pub fn run() { cmd_new_child_window, cmd_new_main_window, cmd_plugin_info, - cmd_plugin_init_errors, cmd_reload_plugins, cmd_render_template, cmd_restart, diff --git a/crates-tauri/yaak-license/index.ts b/crates-tauri/yaak-license/index.ts index a55abce5..774e53df 100644 --- a/crates-tauri/yaak-license/index.ts +++ b/crates-tauri/yaak-license/index.ts @@ -29,7 +29,7 @@ export function useLicense() { await queryClient.invalidateQueries({ queryKey: CHECK_QUERY_KEY }); }); return () => { - unlisten.then((fn) => fn()); + void unlisten.then((fn) => fn()); }; }, []); diff --git a/crates/yaak-git/index.ts b/crates/yaak-git/index.ts index a53f4a05..6c179a50 100644 --- a/crates/yaak-git/index.ts +++ b/crates/yaak-git/index.ts @@ -95,8 +95,8 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => { const handleError = (err: unknown) => { showToast({ - id: `${err}`, - message: `${err}`, + id: String(err), + message: String(err), color: "danger", timeout: 5000, }); diff --git a/crates/yaak-models/guest-js/store.ts b/crates/yaak-models/guest-js/store.ts index 45417124..4d8bbe52 100644 --- a/crates/yaak-models/guest-js/store.ts +++ b/crates/yaak-models/guest-js/store.ts @@ -86,6 +86,7 @@ export function getModel>>>>>> main } *plugin_manager.init_errors.lock().await = init_errors; } @@ -199,13 +195,8 @@ impl PluginManager { Ok(plugin_manager) } -<<<<<<< HEAD - /// Take and clear any plugin initialization errors. - /// Returns the errors only once — subsequent calls return an empty list. -======= /// Take any initialization errors, clearing them from the manager. /// Returns a list of `(plugin_directory, error_message)` pairs. ->>>>>>> main pub async fn take_init_errors(&self) -> Vec<(String, String)> { std::mem::take(&mut *self.init_errors.lock().await) } diff --git a/crates/yaak-sync/index.ts b/crates/yaak-sync/index.ts index 7cbf09ff..f89557e3 100644 --- a/crates/yaak-sync/index.ts +++ b/crates/yaak-sync/index.ts @@ -39,7 +39,7 @@ export function watchWorkspaceFiles( channel, }); - unlistenPromise.then(({ unlistenEvent }) => { + void unlistenPromise.then(({ unlistenEvent }) => { addWatchKey(unlistenEvent); }); @@ -53,7 +53,7 @@ export function watchWorkspaceFiles( } function unlistenToWatcher(unlistenEvent: string) { - emit(unlistenEvent).then(() => { + void emit(unlistenEvent).then(() => { removeWatchKey(unlistenEvent); }); } diff --git a/package-lock.json b/package-lock.json index 96542ad1..3efe4469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -132,6 +132,7 @@ "eventemitter3": "^5.0.1", "focus-trap-react": "^11.0.4", "fuzzbunny": "^1.0.1", + "graphql": "^16.13.1", "hexy": "^0.3.5", "history": "^5.3.0", "jotai": "^2.18.0", @@ -358,7 +359,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -368,7 +369,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", @@ -399,7 +400,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "devOptional": true, + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -409,7 +410,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.28.5", @@ -426,7 +427,7 @@ "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.27.2", @@ -443,7 +444,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "devOptional": true, + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -453,7 +454,7 @@ "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -463,7 +464,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.27.1", @@ -477,7 +478,7 @@ "version": "7.28.3", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", @@ -505,7 +506,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -524,7 +525,7 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -534,7 +535,7 @@ "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", @@ -548,7 +549,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.28.5" @@ -637,7 +638,7 @@ "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", @@ -652,7 +653,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", @@ -671,7 +672,7 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", @@ -1687,7 +1688,7 @@ "version": "2.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -4050,6 +4051,7 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", + "dev": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -4059,6 +4061,7 @@ "version": "19.2.3", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, "license": "MIT", "peerDependencies": { "@types/react": "^19.2.0" @@ -5038,7 +5041,7 @@ "version": "2.9.14", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz", "integrity": "sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -5118,7 +5121,7 @@ "version": "4.28.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", - "devOptional": true, + "dev": true, "funding": [ { "type": "opencollective", @@ -5320,7 +5323,7 @@ "version": "1.0.30001763", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001763.tgz", "integrity": "sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==", - "devOptional": true, + "dev": true, "funding": [ { "type": "opencollective", @@ -5725,7 +5728,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cookie": { @@ -6590,7 +6593,7 @@ "version": "1.5.267", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/emoji-regex": { @@ -6829,7 +6832,7 @@ "version": "0.27.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", - "devOptional": true, + "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -7540,7 +7543,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -7634,7 +7637,7 @@ "version": "4.13.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -7805,12 +7808,12 @@ } }, "node_modules/graphql": { - "version": "15.10.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.10.1.tgz", - "integrity": "sha512-BL/Xd/T9baO6NFzoMpiMD7YUZ62R6viR5tp/MULVEnbYJXZA//kRNW7J0j1w/wXArgL0sCxhDfK5dczSKn3+cg==", - "peer": true, + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz", + "integrity": "sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==", + "license": "MIT", "engines": { - "node": ">= 10.x" + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, "node_modules/graphql-language-service": { @@ -8057,16 +8060,6 @@ "node": ">=16.9.0" } }, - "node_modules/hono-rate-limiter": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/hono-rate-limiter/-/hono-rate-limiter-0.4.2.tgz", - "integrity": "sha512-AAtFqgADyrmbDijcRTT/HJfwqfvhalya2Zo+MgfdrMPas3zSMD8SU03cv+ZsYwRU1swv7zgVt0shwN059yzhjw==", - "license": "MIT", - "peer": true, - "peerDependencies": { - "hono": "^4.1.1" - } - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -9043,7 +9036,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -9405,7 +9398,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -10801,7 +10794,7 @@ "version": "2.0.27", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/nodejs-file-downloader": { @@ -12869,7 +12862,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "devOptional": true, + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" @@ -14642,7 +14635,7 @@ "version": "4.21.0", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "esbuild": "~0.27.0", @@ -14779,7 +14772,7 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -14982,7 +14975,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "devOptional": true, + "dev": true, "funding": [ { "type": "opencollective", @@ -15738,7 +15731,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/yaml": { diff --git a/packages/tailwind-config/index.cjs b/packages/tailwind-config/index.cjs index 0f091adb..3d8ddcae 100644 --- a/packages/tailwind-config/index.cjs +++ b/packages/tailwind-config/index.cjs @@ -125,6 +125,7 @@ module.exports = { }, plugins: [ require("@tailwindcss/container-queries"), + // oxlint-disable-next-line unbound-method -- destructured from plugin API plugin(({ addVariant }) => { addVariant("hocus", ["&:hover", "&:focus-visible", "&.focus:focus"]); addVariant("focus-visible-or-class", ["&:focus-visible", "&.focus:focus"]); diff --git a/packages/theme/src/appearance.ts b/packages/theme/src/appearance.ts index 9e5193af..1c1ff5fb 100644 --- a/packages/theme/src/appearance.ts +++ b/packages/theme/src/appearance.ts @@ -18,7 +18,7 @@ export function subscribeToWindowAppearanceChange( unsubscribe: () => {}, }; - getCurrentWebviewWindow() + void getCurrentWebviewWindow() .onThemeChanged((theme) => { cb(theme.payload); }) @@ -39,6 +39,6 @@ export function resolveAppearance( export function subscribeToPreferredAppearance(cb: (appearance: Appearance) => void) { cb(getCSSAppearance()); - getWindowAppearance().then(cb); + void getWindowAppearance().then(cb); subscribeToWindowAppearanceChange(cb); } diff --git a/scripts/run-workspaces-dev.mjs b/scripts/run-workspaces-dev.mjs index 9420f4d5..109b7830 100644 --- a/scripts/run-workspaces-dev.mjs +++ b/scripts/run-workspaces-dev.mjs @@ -56,7 +56,7 @@ for (const ws of workspacesWithDev) { // Cleanup function to kill all children function cleanup() { - for (const { ws, child } of children) { + for (const { ws: _ws, child } of children) { if (child.exitCode === null) { // Process still running if (process.platform === "win32") { diff --git a/scripts/vendor-node.cjs b/scripts/vendor-node.cjs index 07ef3b1d..8b11f055 100644 --- a/scripts/vendor-node.cjs +++ b/scripts/vendor-node.cjs @@ -107,7 +107,7 @@ rmSync(tmpDir, { recursive: true, force: true }); function tryExecSync(cmd) { try { return execSync(cmd, { stdio: "pipe" }).toString("utf-8"); - } catch (_) { + } catch { return ""; } } diff --git a/scripts/vendor-protoc.cjs b/scripts/vendor-protoc.cjs index 79e803cc..1b47ff19 100644 --- a/scripts/vendor-protoc.cjs +++ b/scripts/vendor-protoc.cjs @@ -108,7 +108,7 @@ mkdirSync(dstDir, { recursive: true }); function tryExecSync(cmd) { try { return execSync(cmd, { stdio: "pipe" }).toString("utf-8"); - } catch (_) { + } catch { return ""; } }