Specifically import the single lodash function
This commit is contained in:
parent
fb075ca1d0
commit
de7fa347df
|
@ -1,6 +1,6 @@
|
|||
import { CancelToken, isCancel } from 'axios';
|
||||
import { OrderedSet as ImmutableOrderedSet } from 'immutable';
|
||||
import { throttle } from 'lodash';
|
||||
import throttle from 'lodash/throttle';
|
||||
import { defineMessages } from 'react-intl';
|
||||
|
||||
import snackbar from 'soapbox/actions/snackbar';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createAsyncThunk } from '@reduxjs/toolkit';
|
||||
import { get } from 'lodash';
|
||||
import get from 'lodash/get';
|
||||
|
||||
import KVStore from 'soapbox/storage/kv_store';
|
||||
import { RootState } from 'soapbox/store';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { mapValues } from 'lodash';
|
||||
import mapValues from 'lodash/mapValues';
|
||||
|
||||
import { verifyCredentials } from './auth';
|
||||
import { importFetchedAccounts } from './importer';
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
* @module soapbox/build_config
|
||||
*/
|
||||
|
||||
const { trim, trimEnd } = require('lodash');
|
||||
const trim = require('lodash/trim');
|
||||
const trimEnd = require('lodash/trimEnd');
|
||||
|
||||
const {
|
||||
NODE_ENV,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { OrderedSet as ImmutableOrderedSet } from 'immutable';
|
||||
import { throttle } from 'lodash';
|
||||
import throttle from 'lodash/throttle';
|
||||
import React, { useState, useRef, useCallback, useEffect } from 'react';
|
||||
|
||||
import { accountSearch } from 'soapbox/actions/accounts';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useRef } from 'react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { throttle } from 'lodash';
|
||||
import throttle from 'lodash/throttle';
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { useIntl, MessageDescriptor } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useEffect, useRef, useMemo, useCallback } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { Virtuoso, Components, VirtuosoProps, VirtuosoHandle, ListRange, IndexLocationWithAlign } from 'react-virtuoso';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useRef, useCallback } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { throttle } from 'lodash';
|
||||
import throttle from 'lodash/throttle';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Set as ImmutableSet, OrderedSet as ImmutableOrderedSet, is } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
@ -61,7 +61,7 @@ class UserIndex extends ImmutablePureComponent {
|
|||
nextLink: next,
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import classNames from 'classnames';
|
||||
import { debounce, throttle } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import throttle from 'lodash/throttle';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useState, useRef, useCallback } from 'react';
|
||||
import { useIntl, FormattedMessage, defineMessages } from 'react-intl';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import classNames from 'classnames';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
import { escape, throttle } from 'lodash';
|
||||
import escape from 'lodash/escape';
|
||||
import throttle from 'lodash/throttle';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { get } from 'lodash';
|
||||
import get from 'lodash/get';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useRef } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { emojiIndex } from 'emoji-mart';
|
||||
import { pick } from 'lodash';
|
||||
import pick from 'lodash/pick';
|
||||
|
||||
import { search } from '../emoji_mart_search_light';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { isEqual } from 'lodash';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React from 'react';
|
||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import classNames from 'classnames';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useEffect } from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { OrderedSet as ImmutableOrderedSet } from 'immutable';
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useCallback } from 'react';
|
||||
import { defineMessages } from 'react-intl';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import { debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||
import { HotKeys } from 'react-hotkeys';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import classNames from 'classnames';
|
||||
import { fromJS, is } from 'immutable';
|
||||
import { throttle, debounce } from 'lodash';
|
||||
import debounce from 'lodash/debounce';
|
||||
import throttle from 'lodash/throttle';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
Record as ImmutableRecord,
|
||||
fromJS,
|
||||
} from 'immutable';
|
||||
import { trimStart } from 'lodash';
|
||||
import trimStart from 'lodash/trimStart';
|
||||
|
||||
import { toTailwind } from 'soapbox/utils/tailwind';
|
||||
import { generateAccent } from 'soapbox/utils/theme';
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
OrderedMap as ImmutableOrderedMap,
|
||||
Record as ImmutableRecord,
|
||||
} from 'immutable';
|
||||
import { take } from 'lodash';
|
||||
import take from 'lodash/take';
|
||||
|
||||
import intlMessages from 'soapbox/__fixtures__/intlMessages.json';
|
||||
import notification from 'soapbox/__fixtures__/notification.json';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
||||
import { trim } from 'lodash';
|
||||
import trim from 'lodash/trim';
|
||||
|
||||
import { MASTODON_PRELOAD_IMPORT } from 'soapbox/actions/preload';
|
||||
import { FE_SUBDIRECTORY } from 'soapbox/build_config';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
|
||||
import { get } from 'lodash';
|
||||
import get from 'lodash/get';
|
||||
|
||||
import { STREAMING_FOLLOW_RELATIONSHIPS_UPDATE } from 'soapbox/actions/streaming';
|
||||
import { normalizeRelationship } from 'soapbox/normalizers/relationship';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import IntlMessageFormat from 'intl-messageformat';
|
||||
import 'intl-pluralrules';
|
||||
import { unescape } from 'lodash';
|
||||
import unescape from 'lodash/unescape';
|
||||
|
||||
import locales from './web_push_locales';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
Set as ImmutableSet,
|
||||
fromJS,
|
||||
} from 'immutable';
|
||||
import { trimStart } from 'lodash';
|
||||
import trimStart from 'lodash/trimStart';
|
||||
|
||||
export type Config = ImmutableMap<string, any>;
|
||||
export type Policy = ImmutableMap<string, any>;
|
||||
|
|
Loading…
Reference in New Issue