Skip to content

Commit 2a69fe3

Browse files
authored
chore: replace lodash with lodash-es (#529)
* chore: replace lodash with lodash-es * test: mapping lodash-es to lodash
1 parent 4a64231 commit 2a69fe3

File tree

9 files changed

+9706
-14686
lines changed

9 files changed

+9706
-14686
lines changed

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ module.exports = {
1111
'\\.(css|scss|less)$': '<rootDir>/tests/styleMock.js',
1212
// make tests access in handsontable@6.22.0
1313
'@babel/polyfill/lib/noConflict': '<rootDir>/tests/styleMock.js',
14+
'^lodash-es$': 'lodash',
1415
},
1516
};

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@testing-library/user-event": "^14.4.3",
8282
"@typed-mxgraph/typed-mxgraph": "^1.0.7",
8383
"@types/jest": "^29.2.3",
84-
"@types/lodash": "^4.14.191",
84+
"@types/lodash-es": "^4.17.12",
8585
"@types/react": "^18.0.0",
8686
"@types/shortid": "^0.0.31",
8787
"@types/showdown": "^1.9.0",
@@ -109,6 +109,7 @@
109109
"react": "^18.0.0",
110110
"react-dom": "^18.0.0",
111111
"react-test-renderer": "^18.2.0",
112+
"standard-version": "^9.5.0",
112113
"stylelint": "^14.9.1",
113114
"ts-jest": "^29.0.3",
114115
"typescript": "~4.5.2"
@@ -121,13 +122,12 @@
121122
"classnames": "^2.2.6",
122123
"handsontable": "6.2.2",
123124
"highlight.js": "^10.5.0",
124-
"lodash": "^4.17.21",
125+
"lodash-es": "^4.17.21",
125126
"mxgraph": "^4.2.2",
126127
"rc-drawer": "~5.1.0",
127128
"rc-virtual-list": "^3.4.13",
128129
"shortid": "^2.2.16",
129130
"showdown": "^1.9.0",
130-
"standard-version": "^9.5.0",
131131
"use-clippy": "^1.0.9"
132132
},
133133
"config": {

pnpm-lock.yaml

+9,695-14,676
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/drawer/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { CSSProperties, useEffect, useState } from 'react';
22
import { CloseOutlined } from '@ant-design/icons';
33
import { Alert, AlertProps, Spin, Tabs } from 'antd';
44
import classNames from 'classnames';
5-
import { omit } from 'lodash';
5+
import { omit } from 'lodash-es';
66
import RcDrawer, { DrawerProps as AntdDrawerProps } from 'rc-drawer';
77

88
import motionProps from './motion';

src/dropdown/select.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
CheckboxValueType,
88
} from 'antd/lib/checkbox/Group';
99
import classNames from 'classnames';
10-
import { isEqual } from 'lodash';
10+
import { isEqual } from 'lodash-es';
1111
import List from 'rc-virtual-list';
1212

1313
import './style.scss';

src/filterRules/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { message } from 'antd';
33
import { InternalNamePath } from 'antd/lib/form/interface';
4-
import { clone } from 'lodash';
4+
import { clone } from 'lodash-es';
55
import shortId from 'shortid';
66

77
import { RulesController } from './ruleController';

src/modal/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Alert, type AlertProps, Modal, type ModalProps } from 'antd';
33
import classNames from 'classnames';
4-
import { omit } from 'lodash';
4+
import { omit } from 'lodash-es';
55

66
import './index.scss';
77

src/useDebounce/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useCallback, useEffect, useRef } from 'react';
2-
import type { DebounceSettings } from 'lodash';
3-
import { debounce } from 'lodash';
2+
import type { DebounceSettings } from 'lodash-es';
3+
import { debounce } from 'lodash-es';
44

55
const useDebounce = <T extends (...args: any) => any>(
66
func: T,

src/useList/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useEffect, useMemo, useRef, useState } from 'react';
2-
import { merge } from 'lodash';
2+
import { merge } from 'lodash-es';
33

44
export type Fetcher<T, P> = (params: P) => Promise<{ data: T[]; total: number }>;
55

0 commit comments

Comments
 (0)