Skip to content

Commit

Permalink
chore: upgrade typescript version and update sdk type path
Browse files Browse the repository at this point in the history
  • Loading branch information
wqcstrong committed Jan 8, 2024
1 parent 527b6e8 commit 2cf9452
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"less": "^4.1.2",
"lint-staged": "^12.3.3",
"prettier": "^2.5.1",
"typescript": "^4.7.4",
"typescript": "^5.3.3",
"vite": "^4.0.0",
"vite-plugin-svgr": "^2.4.0",
"yorkie": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/ConnectStatus/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpySocket } from '@huolala-tech/page-spy';
import { SpySocket } from '@huolala-tech/page-spy/web';
import { Row, Col, Space, Divider } from 'antd';
import { memo, useEffect, useState } from 'react';
import './index.less';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpyConsole } from '@huolala-tech/page-spy';
import { SpyConsole } from '@huolala-tech/page-spy/web';
import { ReactComponent as ErrorStackSvg } from '@/assets/image/error-stack.svg';
import './index.less';
import Icon from '@ant-design/icons';
Expand Down Expand Up @@ -60,7 +60,7 @@ export const ErrorTraceNode = ({
},
}),
);
}, [data.errorDetail]);
}, [data.errorDetail, t]);

return (
<div className="error-trace">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpyAtom, SpyConsole } from '@huolala-tech/page-spy';
import { SpyAtom, SpyConsole } from '@huolala-tech/page-spy/web';
import { isString, pullAt } from 'lodash-es';
import ConsoleNode from '../index';
import { getStyleObjectFromString } from './utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CaretRightOutlined } from '@ant-design/icons';
import './index.less';
import clsx from 'clsx';
import CopyContent from '../CopyContent';
import type { SpyAtom } from '@huolala-tech/page-spy';
import type { SpyAtom } from '@huolala-tech/page-spy/web';
import { LoadMore } from './LoadMore';
import { useSocketMessageStore } from '@/store/socket-message';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ClearOutlined } from '@ant-design/icons';
import { Row, Col, Tooltip, Button, Select, Space } from 'antd';
import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { ProxyType } from '@huolala-tech/page-spy/dist/types/lib/console';
import { SpyConsole } from '@huolala-tech/page-spy/web';
import { ReactComponent as ErrorSvg } from '@/assets/image/error.svg';
import { ReactComponent as InfoSvg } from '@/assets/image/info.svg';
import { ReactComponent as WarnSvg } from '@/assets/image/warn.svg';
Expand All @@ -19,7 +19,7 @@ export const HeaderActions = () => {

const logLevelList: Array<{
label: string | React.ReactNode;
value: ProxyType;
value: SpyConsole.ProxyType;
}> = [
{
label: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ReactComponent as DebugEvalSvg } from '@/assets/image/debug-eval.svg';
import { ReactComponent as UserSvg } from '@/assets/image/user.svg';
import { ReactComponent as DebugSvg } from '@/assets/image/debug.svg';
import './index.less';
import type { SpyConsole } from '@huolala-tech/page-spy';
import type { SpyConsole } from '@huolala-tech/page-spy/web';

interface ThemeItem {
color: string;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Devtools/NetworkPanel/comps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { InfoCircleFilled, DownloadOutlined } from '@ant-design/icons';
import ReactJsonView from '@huolala-tech/react-json-view';
import { useState, useMemo } from 'react';
import { usePopupRef, withPopup } from '@/utils/withPopup';
import type { SpyNetwork } from '@huolala-tech/page-spy';
import type { SpyNetwork } from '@huolala-tech/page-spy/web';
import clsx from 'clsx';
import { dataUrlToBlob, downloadFile, semanticSize } from './utils';
import { isString } from 'lodash-es';
Expand Down Expand Up @@ -90,7 +90,7 @@ export const QueryParamsBlock: React.FC<{ data: [string, string][] }> = ({
return (
<div className="detail-block">
<Space className="detail-block__label">
<span>Query String Parametes</span>
<span>Query String Parameters</span>
<span
onClick={() => setDecoded(!decoded)}
style={{ fontWeight: 'normal', cursor: 'pointer' }}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/NetworkPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ResponseBody,
StatusCode,
} from './comps';
import type { SpyNetwork } from '@huolala-tech/page-spy';
import type { SpyNetwork } from '@huolala-tech/page-spy/web';
import copy from 'copy-to-clipboard';
import { useTranslation } from 'react-i18next';
import { useSocketMessageStore } from '@/store/socket-message';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/NetworkPanel/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getObjectKeys } from '@/utils';
import { SpyNetwork } from '@huolala-tech/page-spy';
import { SpyNetwork } from '@huolala-tech/page-spy/web';

export function downloadFile(filename: string, url: string) {
const aTag = document.createElement('a');
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/StoragePanel/TableContent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useSocketMessageStore } from '@/store/socket-message';
import { SpyStorage } from '@huolala-tech/page-spy';
import { SpyStorage } from '@huolala-tech/page-spy/web';
import {
Button,
Col,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/StoragePanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SpyStorage } from '@huolala-tech/page-spy';
import type { SpyStorage } from '@huolala-tech/page-spy/web';
import { Button, Col, Layout, Menu, Row, Tooltip } from 'antd';
import { useEffect, useMemo, useState } from 'react';
import ReactJsonView from '@huolala-tech/react-json-view';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/SystemPanel/FeatureItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactComponent as UnsupportSvg } from '@/assets/image/unsupport.svg';
import Icon from '@ant-design/icons';
import './index.less';
import { Tooltip } from 'antd';
import type { SpySystem } from '@huolala-tech/page-spy';
import type { SpySystem } from '@huolala-tech/page-spy/web';
import CopyContent from '@/pages/Devtools/ConsolePanel/components/CopyContent';
import { useTranslation } from 'react-i18next';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Devtools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import '@huolala-tech/react-json-view/dist/style.css';
import { throttle } from 'lodash-es';
import { CUSTOM_EVENT } from '@/store/socket-message/socket';
import { useStorageTypes } from '@/store/platform-config';
import { SpyDevice } from '@huolala-tech/page-spy';
import { SpyDevice } from '@huolala-tech/page-spy/web';

const { Sider, Content } = Layout;
const { Title } = Typography;
Expand Down
2 changes: 1 addition & 1 deletion src/store/platform-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useClientInfo } from '@/utils/brand';
import { ReactComponent as StorageSvg } from '@/assets/image/storage.svg';
import { ReactComponent as CookieSvg } from '@/assets/image/cookie.svg';
import { ReactComponent as DatabaseSvg } from '@/assets/image/database.svg';
import { SpyDevice, SpyStorage } from '@huolala-tech/page-spy';
import { SpyDevice, SpyStorage } from '@huolala-tech/page-spy/web';
import { FunctionComponent } from 'react';

const STORAGE_TYPES: {
Expand Down
2 changes: 1 addition & 1 deletion src/store/socket-message/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SpyPage,
SpyStorage,
SpyDatabase,
} from '@huolala-tech/page-spy';
} from '@huolala-tech/page-spy/web';
import { API_BASE_URL } from '@/apis/request';
import { resolveProtocol } from '@/utils';
import { ElementContent } from 'hast';
Expand Down
2 changes: 1 addition & 1 deletion src/store/socket-message/socket.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SpyMessage, SpySocket } from '@huolala-tech/page-spy';
import type { SpyMessage, SpySocket } from '@huolala-tech/page-spy/web';
import { message, notification } from 'antd';
import * as SERVER_TYPE from './server-type';
import * as MESSAGE_TYPE from './message-type';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import firefoxSvg from '@/assets/image/firefox.svg';
import safariSvg from '@/assets/image/safari.svg';
import browserSvg from '@/assets/image/browser.svg';
import mpWechatSvg from '@/assets/image/miniprogram.svg';
import { SpyDevice } from '@huolala-tech/page-spy';
import { SpyDevice } from '@huolala-tech/page-spy/web';
import useSearch from './useSearch';

interface DeviceInfo {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "esnext",
"allowJs": true,
"isolatedModules": true,
"moduleResolution": "node",
"moduleResolution": "Bundler",
"importHelpers": true,
"jsx": "react-jsx",
"resolveJsonModule": true,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4905,10 +4905,10 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"

typescript@^4.7.4:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@^5.3.3:
version "5.3.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==

unbox-primitive@^1.0.2:
version "1.0.2"
Expand Down

0 comments on commit 2cf9452

Please sign in to comment.