Skip to content

Commit

Permalink
fix: revert alibaba#2233 (alibaba#2453)
Browse files Browse the repository at this point in the history
* fix: revert alibaba#2233

* fix: fix
  • Loading branch information
li-jia-nan authored Jan 29, 2024
1 parent ba327a7 commit 5752f30
Show file tree
Hide file tree
Showing 9 changed files with 3,306 additions and 3,533 deletions.
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,4 @@ module.exports = {
'!**/dist/**',
],
transformIgnorePatterns: [`node_modules/(?!(?:.pnpm/)?(${esmModules.join('|')}))`],
moduleNameMapper: {
'lodash-es': 'lodash',
},
};
4 changes: 2 additions & 2 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dayjs": "^1.9.1",
"intersection-observer": "^0.12.0",
"js-cookie": "^2.x.x",
"lodash-es": "^4.17.21",
"lodash": "^4.17.21",
"resize-observer-polyfill": "^1.5.1",
"screenfull": "^5.0.0",
"tslib": "^2.4.1"
Expand All @@ -49,7 +49,7 @@
"@alifd/next": "^1.20.6",
"@ant-design/icons": "^5.0.1",
"@types/js-cookie": "^2.x.x",
"@types/lodash-es": "^4.17.7",
"@types/lodash": "^4.14.202",
"antd": "^5.2.1",
"jest-websocket-mock": "^2.1.0",
"mockjs": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useReactive/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef } from 'react';
import { isPlainObject } from 'lodash-es';
import isPlainObject from 'lodash/isPlainObject';
import useCreation from '../useCreation';
import useUpdate from '../useUpdate';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DebouncedFunc, DebounceSettings } from 'lodash-es';
import { debounce } from 'lodash-es';
import type { DebouncedFunc, DebounceSettings } from 'lodash';
import debounce from 'lodash/debounce';
import { useEffect, useMemo, useRef } from 'react';
import type { Plugin } from '../types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DebouncedFunc, ThrottleSettings } from 'lodash-es';
import { throttle } from 'lodash-es';
import type { DebouncedFunc, ThrottleSettings } from 'lodash';
import throttle from 'lodash/throttle';
import { useEffect, useRef } from 'react';
import type { Plugin } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useThrottleFn/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { throttle } from 'lodash-es';
import throttle from 'lodash/throttle';
import { useMemo } from 'react';
import useLatest from '../useLatest';
import type { ThrottleOptions } from '../useThrottle/throttleOptions';
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/utils/depsEqual.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DependencyList } from 'react';
import { isEqual } from 'lodash-es';
import isEqual from 'lodash/isEqual';

export const depsEqual = (aDeps: DependencyList = [], bDeps: DependencyList = []) =>
isEqual(aDeps, bDeps);
2 changes: 1 addition & 1 deletion packages/hooks/src/utils/lodash-polyfill.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { debounce } from 'lodash-es';
import debounce from 'lodash/debounce';

function isNodeOrWeb() {
const freeGlobal =
Expand Down
Loading

0 comments on commit 5752f30

Please sign in to comment.