Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't include all of lodash #1847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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