mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
chore(deps): lock file maintenance npm dependencies (#6015)
* chore(deps): lock file maintenance npm dependencies * chore(deps): bump npm deps * chore: fix eslint ref-name --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Slinetrac <realakayuki@gmail.com>
This commit is contained in:
14
package.json
14
package.json
@@ -45,7 +45,7 @@
|
||||
"@mui/lab": "7.0.0-beta.17",
|
||||
"@mui/material": "^7.3.6",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@tanstack/react-virtual": "^3.13.13",
|
||||
"@tanstack/react-virtual": "^3.13.16",
|
||||
"@tauri-apps/api": "2.9.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
|
||||
"@tauri-apps/plugin-dialog": "^2.4.2",
|
||||
@@ -66,12 +66,12 @@
|
||||
"nanoid": "^5.1.6",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-error-boundary": "6.0.1",
|
||||
"react-hook-form": "^7.69.0",
|
||||
"react-error-boundary": "6.0.2",
|
||||
"react-hook-form": "^7.70.0",
|
||||
"react-i18next": "16.5.1",
|
||||
"react-markdown": "10.1.0",
|
||||
"react-router": "^7.11.0",
|
||||
"react-virtuoso": "^4.18.0",
|
||||
"react-virtuoso": "^4.18.1",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"swr": "^2.3.8",
|
||||
"tauri-plugin-mihomo-api": "github:clash-verge-rev/tauri-plugin-mihomo#main",
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/github": "^6.0.1",
|
||||
"@eslint-react/eslint-plugin": "^2.4.0",
|
||||
"@eslint-react/eslint-plugin": "^2.5.1",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@tauri-apps/cli": "2.9.6",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
@@ -114,7 +114,7 @@
|
||||
"tar": "^7.5.2",
|
||||
"terser": "^5.44.1",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.50.1",
|
||||
"typescript-eslint": "^8.51.0",
|
||||
"vite": "^7.3.0",
|
||||
"vite-plugin-svgr": "^4.5.0"
|
||||
},
|
||||
@@ -128,7 +128,7 @@
|
||||
]
|
||||
},
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@10.26.1",
|
||||
"packageManager": "pnpm@10.27.0",
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
|
||||
1714
pnpm-lock.yaml
generated
1714
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -82,8 +82,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
const resolvedTitle = title ?? t("profiles.components.menu.editFile");
|
||||
|
||||
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined);
|
||||
const prevData = useRef<string | undefined>("");
|
||||
const currData = useRef<string | undefined>("");
|
||||
const prevDataRef = useRef<string | undefined>("");
|
||||
const currDataRef = useRef<string | undefined>("");
|
||||
// Hold the latest loader without making effects depend on its identity
|
||||
const initialDataRef = useRef<Props<T>["initialData"]>(initialData);
|
||||
// Track mount/open state to prevent setState after unmount/close
|
||||
@@ -154,10 +154,10 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
return;
|
||||
}
|
||||
// Only update when untouched and value changed
|
||||
const userUntouched = currData.current === prevData.current;
|
||||
if (userUntouched && next !== prevData.current) {
|
||||
prevData.current = next;
|
||||
currData.current = next;
|
||||
const userUntouched = currDataRef.current === prevDataRef.current;
|
||||
if (userUntouched && next !== prevDataRef.current) {
|
||||
prevDataRef.current = next;
|
||||
currDataRef.current = next;
|
||||
editorRef.current?.setValue(next);
|
||||
}
|
||||
// Ensure any previous error state is cleared after a successful refresh
|
||||
@@ -219,8 +219,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
setHasLoadedOnce(false);
|
||||
// We will perform an explicit initial load below; skip the first background refresh.
|
||||
skipNextRefreshRef.current = true;
|
||||
prevData.current = undefined;
|
||||
currData.current = undefined;
|
||||
prevDataRef.current = undefined;
|
||||
currDataRef.current = undefined;
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
@@ -231,8 +231,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
: (dataSource ?? Promise.resolve(""));
|
||||
const data = await dataPromise;
|
||||
if (cancelled) return;
|
||||
prevData.current = data;
|
||||
currData.current = data;
|
||||
prevDataRef.current = data;
|
||||
currDataRef.current = data;
|
||||
|
||||
setInitialText(data);
|
||||
// Build a stable model path and avoid "undefined" in the name
|
||||
@@ -250,8 +250,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
showNotice.error(err);
|
||||
|
||||
// Align refs with fallback text after a load failure
|
||||
prevData.current = "";
|
||||
currData.current = "";
|
||||
prevDataRef.current = "";
|
||||
currDataRef.current = "";
|
||||
|
||||
setInitialText("");
|
||||
const pathParts = [String(dataKey ?? nanoid()), instanceIdRef.current];
|
||||
@@ -288,8 +288,8 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
|
||||
const handleChange = useLockFn(async (value?: string) => {
|
||||
try {
|
||||
currData.current = value ?? editorRef.current?.getValue();
|
||||
onChange?.(prevData.current, currData.current);
|
||||
currDataRef.current = value ?? editorRef.current?.getValue();
|
||||
onChange?.(prevDataRef.current, currDataRef.current);
|
||||
// If the initial load failed, allow saving after the user makes an edit.
|
||||
if (!hasLoadedOnce) {
|
||||
setHasLoadedOnce(true);
|
||||
@@ -307,11 +307,11 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
if (!editorRef.current) {
|
||||
return;
|
||||
}
|
||||
currData.current = editorRef.current.getValue();
|
||||
currDataRef.current = editorRef.current.getValue();
|
||||
if (onSave) {
|
||||
await onSave(prevData.current, currData.current);
|
||||
await onSave(prevDataRef.current, currDataRef.current);
|
||||
// If save succeeds, align prev with current
|
||||
prevData.current = currData.current;
|
||||
prevDataRef.current = currDataRef.current;
|
||||
}
|
||||
}
|
||||
onClose();
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function useFilterSort(
|
||||
const lastInputRef = useRef<{ text: string; sort: ProxySortType } | null>(
|
||||
null,
|
||||
);
|
||||
const debounceTimer = useRef<number | null>(null);
|
||||
const debounceTimerRef = useRef<number | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
let last = 0;
|
||||
@@ -68,9 +68,9 @@ export default function useFilterSort(
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (debounceTimer.current !== null) {
|
||||
window.clearTimeout(debounceTimer.current);
|
||||
debounceTimer.current = null;
|
||||
if (debounceTimerRef.current !== null) {
|
||||
window.clearTimeout(debounceTimerRef.current);
|
||||
debounceTimerRef.current = null;
|
||||
}
|
||||
|
||||
const prev = lastInputRef.current;
|
||||
@@ -80,15 +80,15 @@ export default function useFilterSort(
|
||||
lastInputRef.current = { text: filterText, sort: sortType };
|
||||
|
||||
const delay = stableInputs ? 0 : 150;
|
||||
debounceTimer.current = window.setTimeout(() => {
|
||||
debounceTimerRef.current = window.setTimeout(() => {
|
||||
setResult(compute);
|
||||
debounceTimer.current = null;
|
||||
debounceTimerRef.current = null;
|
||||
}, delay);
|
||||
|
||||
return () => {
|
||||
if (debounceTimer.current !== null) {
|
||||
window.clearTimeout(debounceTimer.current);
|
||||
debounceTimer.current = null;
|
||||
if (debounceTimerRef.current !== null) {
|
||||
window.clearTimeout(debounceTimerRef.current);
|
||||
debounceTimerRef.current = null;
|
||||
}
|
||||
};
|
||||
}, [compute, filterText, sortType]);
|
||||
|
||||
@@ -3,12 +3,12 @@ import { listen, UnlistenFn, EventCallback } from "@tauri-apps/api/event";
|
||||
import { useCallback, useRef } from "react";
|
||||
|
||||
export const useListen = () => {
|
||||
const unlistenFns = useRef<UnlistenFn[]>([]);
|
||||
const unlistenFnsRef = useRef<UnlistenFn[]>([]);
|
||||
|
||||
const addListener = useCallback(
|
||||
async <T>(eventName: string, handler: EventCallback<T>) => {
|
||||
const unlisten = await listen(eventName, handler);
|
||||
unlistenFns.current.push(unlisten);
|
||||
unlistenFnsRef.current.push(unlisten);
|
||||
return unlisten;
|
||||
},
|
||||
[],
|
||||
@@ -17,7 +17,7 @@ export const useListen = () => {
|
||||
const removeAllListeners = useCallback(() => {
|
||||
const errors: Error[] = [];
|
||||
|
||||
unlistenFns.current.forEach((unlisten) => {
|
||||
unlistenFnsRef.current.forEach((unlisten) => {
|
||||
try {
|
||||
unlisten();
|
||||
} catch (error) {
|
||||
@@ -32,7 +32,7 @@ export const useListen = () => {
|
||||
);
|
||||
}
|
||||
|
||||
unlistenFns.current.length = 0;
|
||||
unlistenFnsRef.current.length = 0;
|
||||
}, []);
|
||||
|
||||
const setupCloseListener = useCallback(async () => {
|
||||
|
||||
@@ -109,19 +109,19 @@ export const useLogData = () => {
|
||||
},
|
||||
});
|
||||
|
||||
const previousLogLevel = useRef<string | undefined>(undefined);
|
||||
const previousLogLevelRef = useRef<string | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
if (!logLevel) {
|
||||
previousLogLevel.current = logLevel ?? undefined;
|
||||
previousLogLevelRef.current = logLevel ?? undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
if (previousLogLevel.current === logLevel) {
|
||||
if (previousLogLevelRef.current === logLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
previousLogLevel.current = logLevel;
|
||||
previousLogLevelRef.current = logLevel;
|
||||
refresh();
|
||||
}, [logLevel, refresh]);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ export const useMihomoWsSubscription = <T>(
|
||||
const subscriptionCacheKey = subscriptKey ? `$sub$${subscriptKey}` : null;
|
||||
|
||||
const wsRef = useRef<MihomoWebSocket | null>(null);
|
||||
const wsFirstConnection = useRef<boolean>(true);
|
||||
const wsFirstConnectionRef = useRef<boolean>(true);
|
||||
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
const response = useSWRSubscription<T, any, string | null>(
|
||||
@@ -124,15 +124,15 @@ export const useMihomoWsSubscription = <T>(
|
||||
}
|
||||
}
|
||||
|
||||
if (wsFirstConnection.current || !wsRef.current) {
|
||||
wsFirstConnection.current = false;
|
||||
if (wsFirstConnectionRef.current || !wsRef.current) {
|
||||
wsFirstConnectionRef.current = false;
|
||||
cleanupAll();
|
||||
void connectWs();
|
||||
}
|
||||
|
||||
return () => {
|
||||
isMounted = false;
|
||||
wsFirstConnection.current = true;
|
||||
wsFirstConnectionRef.current = true;
|
||||
cleanupAll();
|
||||
};
|
||||
},
|
||||
|
||||
@@ -126,7 +126,7 @@ const Layout = () => {
|
||||
const [menuContextPosition, setMenuContextPosition] =
|
||||
useState<MenuContextPosition | null>(null);
|
||||
|
||||
const windowControls = useRef<any>(null);
|
||||
const windowControlsRef = useRef<any>(null);
|
||||
const { decorated } = useWindowDecorations();
|
||||
|
||||
const sensors = useSensors(
|
||||
@@ -206,7 +206,7 @@ const Layout = () => {
|
||||
() =>
|
||||
!decorated ? (
|
||||
<div className="the_titlebar" data-tauri-drag-region="true">
|
||||
<WindowControls ref={windowControls} />
|
||||
<WindowControls ref={windowControlsRef} />
|
||||
</div>
|
||||
) : null,
|
||||
[decorated],
|
||||
|
||||
Reference in New Issue
Block a user