From 95bd5ceed91dbfabb96082fba7e830db12f1e572 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:21:06 +0800 Subject: [PATCH] fix: update js-yaml imports for ESM --- src/components/profile/groups-editor-viewer.tsx | 2 +- src/components/profile/proxies-editor-viewer.tsx | 2 +- src/components/profile/rules-editor-viewer.tsx | 2 +- src/components/proxy/proxy-chain.tsx | 2 +- src/components/setting/mods/dns-viewer.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/profile/groups-editor-viewer.tsx b/src/components/profile/groups-editor-viewer.tsx index 1b2e1adbb..4e820834a 100644 --- a/src/components/profile/groups-editor-viewer.tsx +++ b/src/components/profile/groups-editor-viewer.tsx @@ -36,7 +36,7 @@ import { cancelIdleCallback, requestIdleCallback, } from 'foxact/request-idle-callback' -import yaml from 'js-yaml' +import * as yaml from 'js-yaml' import { startTransition, useCallback, diff --git a/src/components/profile/proxies-editor-viewer.tsx b/src/components/profile/proxies-editor-viewer.tsx index 0c5d4b58c..3d06f064e 100644 --- a/src/components/profile/proxies-editor-viewer.tsx +++ b/src/components/profile/proxies-editor-viewer.tsx @@ -29,7 +29,7 @@ import { styled, } from '@mui/material' import { useLockFn } from 'ahooks' -import yaml from 'js-yaml' +import * as yaml from 'js-yaml' import { startTransition, useCallback, diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 1773db07f..91769c222 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -27,7 +27,7 @@ import { styled, } from '@mui/material' import { useLockFn } from 'ahooks' -import yaml from 'js-yaml' +import * as yaml from 'js-yaml' import { startTransition, useCallback, diff --git a/src/components/proxy/proxy-chain.tsx b/src/components/proxy/proxy-chain.tsx index 602d1529e..177148d37 100644 --- a/src/components/proxy/proxy-chain.tsx +++ b/src/components/proxy/proxy-chain.tsx @@ -33,7 +33,7 @@ import { Typography, useTheme, } from '@mui/material' -import yaml from 'js-yaml' +import * as yaml from 'js-yaml' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index b90d7b53f..66113f682 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -14,7 +14,7 @@ import { } from '@mui/material' import { invoke } from '@tauri-apps/api/core' import { useLockFn } from 'ahooks' -import yaml from 'js-yaml' +import * as yaml from 'js-yaml' import type { Ref } from 'react' import { useCallback,