mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-56985 Remove babel-plugin-lodash (#26295)
This commit is contained in:
parent
48117fb21f
commit
0d2053aa5c
@ -128,6 +128,10 @@
|
||||
"name": "redux",
|
||||
"importNames": ["DeepPartial"],
|
||||
"message": "Use DeepPartial from '@mattermost/types/utilities instead."
|
||||
},
|
||||
{
|
||||
"name": "lodash",
|
||||
"message": "Import individual functions from lodash/<function> instead."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ const config = {
|
||||
}],
|
||||
],
|
||||
plugins: [
|
||||
'lodash',
|
||||
'react-hot-loader/babel',
|
||||
'babel-plugin-typescript-to-proptypes',
|
||||
[
|
||||
|
@ -141,7 +141,6 @@
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.57.1",
|
||||
"@typescript-eslint/parser": "5.57.1",
|
||||
"babel-plugin-lodash": "3.3.4",
|
||||
"copy-webpack-plugin": "11.0.0",
|
||||
"emoji-datasource": "6.1.1",
|
||||
"emoji-datasource-apple": "6.1.1",
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
|
||||
import type {UserProfile} from '@mattermost/types/users';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep, set} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import set from 'lodash/set';
|
||||
import type {Dispatch} from 'redux';
|
||||
import {batchActions} from 'redux-batched-actions';
|
||||
import type {MockStoreEnhanced} from 'redux-mock-store';
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce, isEqual} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import classNames from 'classnames';
|
||||
import {isNil} from 'lodash';
|
||||
import isNil from 'lodash/isNil';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {shallow} from 'enzyme';
|
||||
import {range} from 'lodash';
|
||||
import range from 'lodash/range';
|
||||
import React from 'react';
|
||||
|
||||
import type {UserProfile} from '@mattermost/types/users';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {shallow} from 'enzyme';
|
||||
import {range} from 'lodash';
|
||||
import range from 'lodash/range';
|
||||
import React from 'react';
|
||||
|
||||
import {TestHelper} from 'utils/test_helper';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import {FormattedMessage, defineMessages} from 'react-intl';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {uniq, difference} from 'lodash';
|
||||
import difference from 'lodash/difference';
|
||||
import uniq from 'lodash/uniq';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import classNames from 'classnames';
|
||||
import {isNil} from 'lodash';
|
||||
import isNil from 'lodash/isNil';
|
||||
import React from 'react';
|
||||
import {FormattedMessage, defineMessages} from 'react-intl';
|
||||
import type {MessageDescriptor} from 'react-intl';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import classNames from 'classnames';
|
||||
import {noop} from 'lodash';
|
||||
import noop from 'lodash/noop';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {FormattedMessage, defineMessage, useIntl} from 'react-intl';
|
||||
import {useDispatch, useSelector} from 'react-redux';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import type {Instance} from '@popperjs/core';
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import type React from 'react';
|
||||
import {useCallback, useEffect, useLayoutEffect, useState} from 'react';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {partition} from 'lodash';
|
||||
import partition from 'lodash/partition';
|
||||
import React from 'react';
|
||||
import type {ReactNode} from 'react';
|
||||
import {useSelector} from 'react-redux';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEqual} from 'lodash';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import React from 'react';
|
||||
import {Modal} from 'react-bootstrap';
|
||||
import type {IntlShape} from 'react-intl';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, {useCallback, useEffect, useState} from 'react';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import {useHistory} from 'react-router-dom';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, {useCallback, useEffect, useState} from 'react';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import {useDispatch} from 'react-redux';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React from 'react';
|
||||
import type {ComponentType} from 'react';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {uniqWith} from 'lodash';
|
||||
import uniqWith from 'lodash/uniqWith';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {useDispatch, useSelector} from 'react-redux';
|
||||
|
@ -4,7 +4,7 @@
|
||||
import MuiMenuItem from '@mui/material/MenuItem';
|
||||
import type {MenuItemProps as MuiMenuItemProps} from '@mui/material/MenuItem';
|
||||
import {styled} from '@mui/material/styles';
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import React, {
|
||||
Children,
|
||||
useContext,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import {Modal} from 'react-bootstrap';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
@ -2,7 +2,8 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {mount} from 'enzyme';
|
||||
import {cloneDeep, set} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import set from 'lodash/set';
|
||||
import React from 'react';
|
||||
import {Provider} from 'react-redux';
|
||||
|
||||
|
@ -7,7 +7,7 @@ import {Elements} from '@stripe/react-stripe-js';
|
||||
import type {Stripe, StripeCardElementChangeEvent} from '@stripe/stripe-js';
|
||||
import {loadStripe} from '@stripe/stripe-js/pure'; // https://github.com/stripe/stripe-js#importing-loadstripe-without-side-effects
|
||||
import classnames from 'classnames';
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React from 'react';
|
||||
import type {ReactNode} from 'react';
|
||||
import {FormattedMessage, injectIntl} from 'react-intl';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import classNames from 'classnames';
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React, {memo, useCallback, useEffect, useState} from 'react';
|
||||
import type {ReactNode} from 'react';
|
||||
import {useIntl} from 'react-intl';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEmpty} from 'lodash';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React, {memo, useCallback, useEffect} from 'react';
|
||||
import type {PropsWithChildren} from 'react';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {shallow} from 'enzyme';
|
||||
import {set} from 'lodash';
|
||||
import set from 'lodash/set';
|
||||
import React from 'react';
|
||||
import type {ComponentProps} from 'react';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {capitalize as caps, isArray} from 'lodash';
|
||||
import caps from 'lodash/capitalize';
|
||||
import isArray from 'lodash/isArray';
|
||||
import type {Moment} from 'moment-timezone';
|
||||
import moment from 'moment-timezone';
|
||||
import React, {PureComponent} from 'react';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {debounce} from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, {useEffect, useCallback, useState, useRef} from 'react';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import styled from 'styled-components';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {uniq} from 'lodash';
|
||||
import uniq from 'lodash/uniq';
|
||||
import {batchActions} from 'redux-batched-actions';
|
||||
|
||||
import type {Post} from '@mattermost/types/posts';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isEqual} from 'lodash';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import type {AnyAction} from 'redux';
|
||||
import {combineReducers} from 'redux';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {max} from 'lodash';
|
||||
import max from 'lodash/max';
|
||||
|
||||
import type {
|
||||
Channel,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {findKey} from 'lodash';
|
||||
import findKey from 'lodash/findKey';
|
||||
import type {AnyAction} from 'redux';
|
||||
import {combineReducers} from 'redux';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {cloneDeep} from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
|
||||
import {ResourceToSysConsolePermissionsTable, RESOURCE_KEYS} from 'mattermost-redux/constants/permissions_sysconsole';
|
||||
import {createSelector} from 'mattermost-redux/selectors/create_selector';
|
||||
|
@ -1,7 +1,9 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {intersection, isPlainObject, zipObject} from 'lodash';
|
||||
import intersection from 'lodash/intersection';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import zipObject from 'lodash/zipObject';
|
||||
|
||||
/**
|
||||
* Transform a function with multiple args into one that receives a normalized args object.
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isNil} from 'lodash';
|
||||
import isNil from 'lodash/isNil';
|
||||
|
||||
import type {TextboxElement} from 'components/textbox';
|
||||
|
||||
|
@ -5,7 +5,7 @@ import {getName} from 'country-list';
|
||||
import crypto from 'crypto';
|
||||
import cssVars from 'css-vars-ponyfill';
|
||||
import type {Locale} from 'date-fns';
|
||||
import {isNil} from 'lodash';
|
||||
import isNil from 'lodash/isNil';
|
||||
import moment from 'moment';
|
||||
import React from 'react';
|
||||
import type {LinkHTMLAttributes} from 'react';
|
||||
|
18
webapp/package-lock.json
generated
18
webapp/package-lock.json
generated
@ -187,7 +187,6 @@
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.57.1",
|
||||
"@typescript-eslint/parser": "5.57.1",
|
||||
"babel-plugin-lodash": "3.3.4",
|
||||
"copy-webpack-plugin": "11.0.0",
|
||||
"emoji-datasource": "6.1.1",
|
||||
"emoji-datasource-apple": "6.1.1",
|
||||
@ -6644,18 +6643,6 @@
|
||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-lodash": {
|
||||
"version": "3.3.4",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.0.0-beta.49",
|
||||
"@babel/types": "^7.0.0-beta.49",
|
||||
"glob": "^7.1.1",
|
||||
"lodash": "^4.17.10",
|
||||
"require-package-name": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-macros": {
|
||||
"version": "2.8.0",
|
||||
"license": "MIT",
|
||||
@ -20182,11 +20169,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-package-name": {
|
||||
"version": "2.0.1",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"dev": true,
|
||||
|
Loading…
Reference in New Issue
Block a user