Skip to content

Commit fa541f5

Browse files
committed
cleanup
1 parent 27f28ee commit fa541f5

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

package-lock.json

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

packages/compass-collection/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,21 @@
4848
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
4949
},
5050
"dependencies": {
51+
"@mongodb-js/compass-app-registry": "^9.4.18",
5152
"@mongodb-js/compass-app-stores": "^7.55.0",
5253
"@mongodb-js/compass-components": "^1.47.0",
5354
"@mongodb-js/compass-connections": "^1.69.0",
5455
"@mongodb-js/compass-logging": "^1.7.10",
56+
"@mongodb-js/compass-schema": "^6.70.0",
5557
"@mongodb-js/compass-telemetry": "^1.12.0",
5658
"@mongodb-js/compass-workspaces": "^0.50.0",
5759
"@mongodb-js/connection-info": "^0.17.0",
5860
"@mongodb-js/mongodb-constants": "^0.12.2",
5961
"compass-preferences-model": "^2.49.0",
60-
"@mongodb-js/compass-app-registry": "^9.4.18",
62+
"hadron-document": "^8.9.4",
6163
"mongodb-collection-model": "^5.31.0",
6264
"mongodb-ns": "^2.4.2",
65+
"mongodb-schema": "^12.6.2",
6366
"react": "^17.0.2",
6467
"react-redux": "^8.1.3",
6568
"redux": "^4.2.1",

packages/compass-collection/src/modules/collection-tab.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Reducer, AnyAction, Action } from 'redux';
22
import {
33
analyzeDocuments,
4-
SchemaParseOptions,
4+
type SchemaParseOptions,
55
type Schema,
66
} from 'mongodb-schema';
77

@@ -13,10 +13,9 @@ import type { CollectionSubtab } from '@mongodb-js/compass-workspaces';
1313
import type { DataService } from '@mongodb-js/compass-connections/provider';
1414
import type { experimentationServiceLocator } from '@mongodb-js/compass-telemetry/provider';
1515
import { calculateSchemaMetadata } from '@mongodb-js/compass-schema';
16-
import type { Logger } from '@mongodb-js/compass-logging/provider';
16+
import { type Logger, mongoLogId } from '@mongodb-js/compass-logging/provider';
1717
import { type PreferencesAccess } from 'compass-preferences-model/provider';
1818
import { isInternalFieldPath } from 'hadron-document';
19-
import { mongoLogId } from '@mongodb-js/compass-logging';
2019
import toNS from 'mongodb-ns';
2120

2221
const DEFAULT_SAMPLE_SIZE = 100;
@@ -190,7 +189,9 @@ export const selectTab = (
190189
};
191190
};
192191

193-
export const analyzeCollectionSchema = (): CollectionThunkAction<void> => {
192+
export const analyzeCollectionSchema = (): CollectionThunkAction<
193+
Promise<void>
194+
> => {
194195
return async (
195196
dispatch,
196197
getState,

packages/compass-collection/src/stores/collection-tab.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { connectionInfoRefLocator } from '@mongodb-js/compass-connections/p
1212
import { createNoopLogger } from '@mongodb-js/compass-logging/provider';
1313
import { ReadOnlyPreferenceAccess } from 'compass-preferences-model/provider';
1414
import { ExperimentTestName } from '@mongodb-js/compass-telemetry/provider';
15-
import { CollectionMetadata } from 'mongodb-collection-model';
15+
import { type CollectionMetadata } from 'mongodb-collection-model';
1616

1717
const defaultMetadata = {
1818
namespace: 'test.foo',
@@ -61,7 +61,7 @@ describe('Collection Tab Content store', function () {
6161
const localAppRegistry = sandbox.spy(new AppRegistry());
6262
const analyzeCollectionSchemaStub = sandbox
6363
.stub(collectionTabModule, 'analyzeCollectionSchema')
64-
.returns(() => async () => {});
64+
.returns(async () => {});
6565
const dataService = {} as any;
6666
let store: ReturnType<typeof activatePlugin>['store'];
6767
let deactivate: ReturnType<typeof activatePlugin>['deactivate'];
@@ -81,8 +81,7 @@ describe('Collection Tab Content store', function () {
8181
enableGenAIFeaturesAtlasOrg: true,
8282
cloudFeatureRolloutAccess: { GEN_AI_COMPASS: true },
8383
}),
84-
collectionMetadata: Partial<CollectionMetadata> = defaultMetadata,
85-
analysisAbortControllerRef: { current?: AbortController } = {}
84+
collectionMetadata: Partial<CollectionMetadata> = defaultMetadata
8685
) => {
8786
const mockCollection = {
8887
_id: collectionMetadata.namespace,

packages/compass-collection/src/stores/collection-tab.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function activatePlugin(
143143

144144
if (!metadata.isReadonly && !metadata.isTimeSeries) {
145145
// TODO: Consider checking experiment variant
146-
store.dispatch(analyzeCollectionSchema());
146+
void store.dispatch(analyzeCollectionSchema());
147147
}
148148
});
149149

0 commit comments

Comments
 (0)