Skip to content

Commit

Permalink
fix: don't include all of lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinClowers committed Jun 6, 2024
1 parent 1aed091 commit 95ac4ff
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/visx-responsive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
},
"homepage": "https://github.com/airbnb/visx#readme",
"dependencies": {
"@types/lodash": "^4.14.172",
"@types/lodash.debounce": "^4.0.9",
"@types/react": "*",
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.6.1"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/visx-responsive/src/enhancers/withParentSize.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import React from 'react';
import {
DebounceSettings,
Expand Down
2 changes: 1 addition & 1 deletion packages/visx-responsive/src/enhancers/withScreenSize.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import React from 'react';
import { Simplify, DebounceSettings } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion packages/visx-responsive/src/hooks/useParentSize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import { RefObject, useEffect, useMemo, useRef, useState } from 'react';
import { DebounceSettings, PrivateWindow, ResizeObserverPolyfill } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion packages/visx-responsive/src/hooks/useScreenSize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import { useEffect, useMemo, useState } from 'react';
import { DebounceSettings } from '../types/index';

Expand Down
2 changes: 0 additions & 2 deletions packages/visx-shape/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@
"dependencies": {
"@types/d3-path": "^1.0.8",
"@types/d3-shape": "^1.3.1",
"@types/lodash": "^4.14.172",
"@types/react": "*",
"@visx/curve": "3.3.0",
"@visx/group": "3.3.0",
"@visx/scale": "3.5.0",
"classnames": "^2.3.1",
"d3-path": "^1.0.5",
"d3-shape": "^1.2.0",
"lodash": "^4.17.21",
"prop-types": "^15.5.10"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/visx-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
},
"homepage": "https://github.com/airbnb/visx#readme",
"dependencies": {
"@types/lodash": "^4.14.172",
"@types/lodash.memoize": "^4.1.9",
"@types/react": "*",
"classnames": "^2.3.1",
"lodash": "^4.17.21",
"lodash.memoize": "^4.1.2",
"prop-types": "^15.7.2",
"reduce-css-calc": "^1.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/visx-text/src/util/getStringWidth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import memoize from 'lodash/memoize';
import memoize from 'lodash.memoize';

const MEASUREMENT_ELEMENT_ID = '__react_svg_text_measurement_id';

Expand Down
4 changes: 2 additions & 2 deletions packages/visx-xychart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"dependencies": {
"@types/lodash": "^4.14.172",
"@types/lodash.debounce": "^4.0.9",
"@types/react": "*",
"@visx/annotation": "3.3.0",
"@visx/axis": "3.10.1",
Expand All @@ -58,7 +58,7 @@
"classnames": "^2.3.1",
"d3-interpolate-path": "2.2.1",
"d3-shape": "^2.0.0",
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"mitt": "^2.1.0",
"prop-types": "^15.6.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { memo, useCallback, useRef } from 'react';
import { animated, useSpring } from '@react-spring/web';
// @ts-expect-error no types
import { interpolatePath } from 'd3-interpolate-path';
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';

function AnimatedPath({
d,
Expand Down
2 changes: 1 addition & 1 deletion packages/visx-xychart/src/providers/TooltipProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import { useTooltip } from '@visx/tooltip';
import TooltipContext from '../context/TooltipContext';
import { EventHandlerParams, TooltipContextType, TooltipData } from '../types';
Expand Down

0 comments on commit 95ac4ff

Please sign in to comment.