Skip to content

Commit 5807ba8

Browse files
li-jia-nanWait
authored andcommitted
* fix: revert alibaba#2233 * fix: fix
1 parent ea33dcd commit 5807ba8

File tree

9 files changed

+3306
-3533
lines changed

9 files changed

+3306
-3533
lines changed

jest.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@ module.exports = {
2828
'!**/dist/**',
2929
],
3030
transformIgnorePatterns: [`node_modules/(?!(?:.pnpm/)?(${esmModules.join('|')}))`],
31-
moduleNameMapper: {
32-
'lodash-es': 'lodash',
33-
},
3431
};

packages/hooks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"dayjs": "^1.9.1",
3838
"intersection-observer": "^0.12.0",
3939
"js-cookie": "^2.x.x",
40-
"lodash-es": "^4.17.21",
40+
"lodash": "^4.17.21",
4141
"resize-observer-polyfill": "^1.5.1",
4242
"screenfull": "^5.0.0",
4343
"tslib": "^2.4.1"
@@ -49,7 +49,7 @@
4949
"@alifd/next": "^1.20.6",
5050
"@ant-design/icons": "^5.0.1",
5151
"@types/js-cookie": "^2.x.x",
52-
"@types/lodash-es": "^4.17.7",
52+
"@types/lodash": "^4.14.202",
5353
"antd": "^5.2.1",
5454
"jest-websocket-mock": "^2.1.0",
5555
"mockjs": "^1.1.0",

packages/hooks/src/useReactive/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useRef } from 'react';
2-
import { isPlainObject } from 'lodash-es';
2+
import isPlainObject from 'lodash/isPlainObject';
33
import useCreation from '../useCreation';
44
import useUpdate from '../useUpdate';
55

packages/hooks/src/useRequest/src/plugins/useDebouncePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { DebouncedFunc, DebounceSettings } from 'lodash-es';
2-
import { debounce } from 'lodash-es';
1+
import type { DebouncedFunc, DebounceSettings } from 'lodash';
2+
import debounce from 'lodash/debounce';
33
import { useEffect, useMemo, useRef } from 'react';
44
import type { Plugin } from '../types';
55

packages/hooks/src/useRequest/src/plugins/useThrottlePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { DebouncedFunc, ThrottleSettings } from 'lodash-es';
2-
import { throttle } from 'lodash-es';
1+
import type { DebouncedFunc, ThrottleSettings } from 'lodash';
2+
import throttle from 'lodash/throttle';
33
import { useEffect, useRef } from 'react';
44
import type { Plugin } from '../types';
55

packages/hooks/src/useThrottleFn/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { throttle } from 'lodash-es';
1+
import throttle from 'lodash/throttle';
22
import { useMemo } from 'react';
33
import useLatest from '../useLatest';
44
import type { ThrottleOptions } from '../useThrottle/throttleOptions';

packages/hooks/src/utils/depsEqual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { DependencyList } from 'react';
2-
import { isEqual } from 'lodash-es';
2+
import isEqual from 'lodash/isEqual';
33

44
export const depsEqual = (aDeps: DependencyList = [], bDeps: DependencyList = []) =>
55
isEqual(aDeps, bDeps);

packages/hooks/src/utils/lodash-polyfill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { debounce } from 'lodash-es';
1+
import debounce from 'lodash/debounce';
22

33
function isNodeOrWeb() {
44
const freeGlobal =

0 commit comments

Comments
 (0)