Skip to content

Commit

Permalink
fix: rework global lodash paths (#5194)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainseb authored Feb 19, 2024
1 parent 5cd9cde commit c0c434c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .changeset/red-moles-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@talend/react-faceted-search': patch
'@talend/react-components': patch
'@talend/react-forms': patch
'@talend/utils': patch
---

fix: loadash imports
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from 'react-i18next';

import classNames from 'classnames';
import { escapeRegExp } from 'lodash';
import escapeRegExp from 'lodash/escapeRegExp';
import PropTypes from 'prop-types';

import I18N_DOMAIN_COMPONENTS from '../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';

import classNames from 'classnames';
import { isEqual } from 'lodash';
import isEqual from 'lodash/isEqual';
import PropTypes from 'prop-types';

import Badge from '@talend/react-components/lib/Badge';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useState } from 'react';

import { get, isEqual } from 'lodash';
import get from 'lodash/get';
import isEqual from 'lodash/isEqual';
import PropTypes from 'prop-types';

import { ButtonIcon, ButtonSecondary, Popover } from '@talend/design-system';
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/__mocks__/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cloneDeep } from 'lodash';
import cloneDeep from 'lodash/cloneDeep';

export const data = {
jsonSchema: {
Expand Down
3 changes: 2 additions & 1 deletion packages/forms/src/UIForm/fieldsets/Array/Array.component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component } from 'react';

import { get, head } from 'lodash';
import get from 'lodash/get';
import head from 'lodash/head';
import PropTypes from 'prop-types';

import { getArrayElementSchema } from '../../utils/array';
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/getDataAttrFromProps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pick } from 'lodash';
import pick from 'lodash/pick';

/**
* get data attributes from props
Expand Down

0 comments on commit c0c434c

Please sign in to comment.