Skip to content

Commit

Permalink
fix: performance by removing lodash by react-fast-compare (carbon-des…
Browse files Browse the repository at this point in the history
…ign-system#17062)

* fix: performance by removing lodash by react-fast-compare

* fix: cli
  • Loading branch information
riddhybansal committed Jul 30, 2024
1 parent 0c9bf27 commit d2651f2
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"invariant": "^2.2.3",
"lodash.debounce": "^4.0.8",
"lodash.findlast": "^4.5.0",
"lodash.isequal": "^4.5.0",
"lodash.omit": "^4.5.0",
"lodash.throttle": "^4.1.1",
"prop-types": "^15.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Downshift, {
UseComboboxStateChangeTypes,
UseMultipleSelectionInterface,
} from 'downshift';
import isEqual from 'lodash.isequal';
import isEqual from 'react-fast-compare';
import PropTypes from 'prop-types';
import React, {
useContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UseSelectProps,
UseSelectStateChangeTypes,
} from 'downshift';
import isEqual from 'lodash.isequal';
import isEqual from 'react-fast-compare';
import PropTypes from 'prop-types';
import React, {
ForwardedRef,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/internal/Selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React, { useCallback, useEffect, useState, useRef } from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash.isequal';
import isEqual from 'react-fast-compare';

function callOnChangeHandler({
isControlled,
Expand Down
1 change: 0 additions & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"browserslist-config-carbon": "^11.2.0",
"css": "^3.0.0",
"cssnano": "^7.0.0",
"lodash.isequal": "^4.5.0",
"postcss": "^8.4.14",
"postcss-flexbugs-fixes": "^5.0.2",
"rimraf": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/__tests__/zone-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

const { SassRenderer } = require('@carbon/test-utils/scss');
const css = require('css');
const isEqual = require('lodash.isequal');
const isEqual = require('react-fast-compare');

const { render } = SassRenderer.create(__dirname);

Expand Down
2 changes: 0 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@ __metadata:
invariant: "npm:^2.2.3"
lodash.debounce: "npm:^4.0.8"
lodash.findlast: "npm:^4.5.0"
lodash.isequal: "npm:^4.5.0"
lodash.omit: "npm:^4.5.0"
lodash.throttle: "npm:^4.1.1"
mini-css-extract-plugin: "npm:^2.4.5"
Expand Down Expand Up @@ -2131,7 +2130,6 @@ __metadata:
browserslist-config-carbon: "npm:^11.2.0"
css: "npm:^3.0.0"
cssnano: "npm:^7.0.0"
lodash.isequal: "npm:^4.5.0"
postcss: "npm:^8.4.14"
postcss-flexbugs-fixes: "npm:^5.0.2"
rimraf: "npm:^5.0.0"
Expand Down

0 comments on commit d2651f2

Please sign in to comment.