Skip to content

Commit 0f5f953

Browse files
mcasimiraddaleax
andauthored
chore: remove per-method packages and use the latest lodash everywhere (#4502)
Co-authored-by: Anna Henningsen <[email protected]>
1 parent ba82ba9 commit 0f5f953

File tree

31 files changed

+52
-725
lines changed

31 files changed

+52
-725
lines changed

package-lock.json

Lines changed: 16 additions & 601 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-indexes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"enzyme": "^3.11.0",
8080
"eslint": "^7.25.0",
8181
"hadron-app-registry": "^9.0.7",
82-
"lodash.clonedeep": "^4.5.0",
82+
"lodash": "^4.17.21",
8383
"mocha": "^10.2.0",
8484
"mongodb": "^5.5.0",
8585
"mongodb-data-service": "^22.8.0",

packages/compass-indexes/src/modules/indexes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { localAppRegistryEmit } from '@mongodb-js/mongodb-redux-common/app-regis
22
import type { IndexDefinition as _IndexDefinition } from 'mongodb-data-service';
33
import type { ThunkAction, ThunkDispatch } from 'redux-thunk';
44
import _debug from 'debug';
5-
import cloneDeep from 'lodash.clonedeep';
5+
import { cloneDeep } from 'lodash';
66
import type { AnyAction } from 'redux';
77

88
import type { RootState } from './index';

packages/compass-indexes/src/typings.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ declare module 'mongodb-query-parser' {
77
}
88

99
declare module '@mongodb-js/mongodb-redux-common/app-registry';
10-
declare module 'lodash.contains';
11-
declare module 'lodash.clonedeep';

packages/compass-schema/package.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
"@testing-library/react": "^12.1.4",
7474
"@testing-library/user-event": "^13.5.0",
7575
"@types/chai": "^4.2.21",
76-
"@types/lodash.find": "^4.6.7",
7776
"@types/mocha": "^9.0.0",
7877
"@types/react": "^17.0.5",
7978
"@types/react-dom": "^17.0.10",
@@ -86,21 +85,6 @@
8685
"leaflet-defaulticon-compatibility": "^0.1.1",
8786
"leaflet-draw": "^1.0.4",
8887
"lodash": "^4.17.21",
89-
"lodash.debounce": "^4.0.8",
90-
"lodash.find": "^4.6.0",
91-
"lodash.groupby": "^4.6.0",
92-
"lodash.isequal": "^4.5.0",
93-
"lodash.isstring": "^4.0.1",
94-
"lodash.map": "^4.6.0",
95-
"lodash.maxby": "^4.0.1",
96-
"lodash.minby": "^4.0.1",
97-
"lodash.pluck": "^3.1.2",
98-
"lodash.range": "^3.2.0",
99-
"lodash.samplesize": "^4.2.0",
100-
"lodash.slice": "^4.2.0",
101-
"lodash.sortby": "^4.7.0",
102-
"lodash.sortbyorder": "^3.4.4",
103-
"lodash.sum": "^4.0.2",
10488
"mocha": "^10.2.0",
10589
"moment": "^2.29.4",
10690
"mongodb": "^5.5.0",

packages/compass-schema/src/components/coordinates-minichart/coordinates-minichart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import GeoscatterMapItem from './marker';
1616

1717
import { LIGHTMODE_TILE_URL, DARKMODE_TILE_URL } from './constants';
1818
import { getHereAttributionMessage } from './utils';
19-
import debounce from 'lodash.debounce';
19+
import { debounce } from 'lodash';
2020
import { withDarkMode } from '@mongodb-js/compass-components';
2121

2222
// TODO: Disable boxZoom handler for circle lasso.

packages/compass-schema/src/components/field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
spacing,
99
KeylineCard,
1010
} from '@mongodb-js/compass-components';
11-
import find from 'lodash.find';
11+
import { find } from 'lodash';
1212
import { withPreferences } from 'compass-preferences-model';
1313
import type AppRegistry from 'hadron-app-registry';
1414
import type {

packages/compass-schema/src/components/unique-minichart/unique-minichart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import { ValueBubble } from '../value-bubble';
4-
import sampleSize from 'lodash.samplesize';
4+
import { sampleSize } from 'lodash';
55
import { Icon, IconButton } from '@mongodb-js/compass-components';
66

77
class UniqueMiniChart extends Component {

packages/compass-schema/src/components/value-bubble.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useCallback, useMemo } from 'react';
2-
import isString from 'lodash.isstring';
2+
import { isString } from 'lodash';
33
import { hasDistinctValue } from 'mongodb-query-util';
44
import {
55
Body,

packages/compass-schema/src/modules/boolean.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint camelcase: 0 */
22
import d3 from 'd3';
3-
import groupBy from 'lodash.groupby';
4-
import map from 'lodash.map';
5-
import sortByOrder from 'lodash.sortbyorder';
3+
import { groupBy } from 'lodash';
4+
import { map } from 'lodash';
5+
import { orderBy } from 'lodash';
66
import few from './few';
77
import shared from './shared';
88

@@ -35,7 +35,8 @@ const minicharts_d3fns_boolean = (localAppRegistry) => {
3535
count: v.length,
3636
};
3737
});
38-
const grouped = sortByOrder(grdm, 'label', [false]); // order: false, true
38+
39+
const grouped = orderBy(grdm, ['label'], ['desc']);
3940

4041
fewChart.width(innerWidth).height(innerHeight).options(options);
4142

0 commit comments

Comments
 (0)