From 06bd9d1852084e646794d060423c6b268aec8201 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 25 Dec 2022 18:37:57 +0800 Subject: [PATCH] perf: Remove IE11 from browserslist and babel targets (#38779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update package.json * chore: bump antd-tools * Update package.json * fix: browserslist in codesandbox * chore: upgrade antd tools * chore: upgrade antd tools * test: fix Cannot access mockCanUseDom before initialization * upgrade @ant-design/tools * upgrade @ant-design/tools * upgrade @ant-design/tools * upgrade @ant-design/tools * Update package.json Co-authored-by: 二货机器人 --- .dumi/theme/builtins/Previewer/index.tsx | 2 +- components/calendar/locale/eu_ES.tsx | 2 +- components/config-provider/__tests__/theme.test.tsx | 3 ++- components/mentions/index.tsx | 4 +--- package.json | 6 ++---- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/index.tsx b/.dumi/theme/builtins/Previewer/index.tsx index 72121e5ae2..5901bf25de 100644 --- a/.dumi/theme/builtins/Previewer/index.tsx +++ b/.dumi/theme/builtins/Previewer/index.tsx @@ -323,7 +323,7 @@ createRoot(document.getElementById('container')).render(); test: 'react-scripts test --env=jsdom', eject: 'react-scripts eject', }, - browserslist: ['>0.2%', 'not dead', 'not ie <= 11', 'not op_mini all'], + browserslist: ['>0.2%', 'not dead'], }; const codesanboxPrefillConfig = { files: { diff --git a/components/calendar/locale/eu_ES.tsx b/components/calendar/locale/eu_ES.tsx index 1512a9b62a..7ff3a6aeec 100644 --- a/components/calendar/locale/eu_ES.tsx +++ b/components/calendar/locale/eu_ES.tsx @@ -1,3 +1,3 @@ import euES from '../../date-picker/locale/eu_ES'; -export default euES; \ No newline at end of file +export default euES; diff --git a/components/config-provider/__tests__/theme.test.tsx b/components/config-provider/__tests__/theme.test.tsx index 4b873f9450..72b9219938 100644 --- a/components/config-provider/__tests__/theme.test.tsx +++ b/components/config-provider/__tests__/theme.test.tsx @@ -10,7 +10,8 @@ import { resetWarned } from '../../_util/warning'; const { defaultAlgorithm, darkAlgorithm, compactAlgorithm } = theme; -let mockCanUseDom = true; +// eslint-disable-next-line no-var +var mockCanUseDom = true; jest.mock('rc-util/lib/Dom/canUseDom', () => () => mockCanUseDom); diff --git a/components/mentions/index.tsx b/components/mentions/index.tsx index 9bd5109ea3..c5e9d2fa95 100644 --- a/components/mentions/index.tsx +++ b/components/mentions/index.tsx @@ -27,9 +27,7 @@ function loadingFilterOption() { export type MentionPlacement = 'top' | 'bottom'; -export type { - DataDrivenOptionProps as MentionsOptionProps, -} from 'rc-mentions/lib/Mentions'; +export type { DataDrivenOptionProps as MentionsOptionProps } from 'rc-mentions/lib/Mentions'; export interface OptionProps { value: string; diff --git a/package.json b/package.json index 1f44f43d91..08568f34f5 100644 --- a/package.json +++ b/package.json @@ -104,9 +104,7 @@ "> 0.5%", "last 2 versions", "Firefox ESR", - "not dead", - "IE 11", - "not IE 10" + "not dead" ], "dependencies": { "@ant-design/colors": "^6.0.0", @@ -158,7 +156,7 @@ "throttle-debounce": "^5.0.0" }, "devDependencies": { - "@ant-design/tools": "^16.1.0-alpha.2", + "@ant-design/tools": "^17.0.0-alpha.5", "@babel/eslint-plugin": "^7.19.1", "@emotion/babel-preset-css-prop": "^11.10.0", "@emotion/css": "^11.10.5",