Skip to content

Commit e36d2cb

Browse files
committed
alphabetize dependencies and use parseShellBSON
1 parent 062b930 commit e36d2cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/compass-indexes/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@
8484
"mongodb": "^6.14.1",
8585
"mongodb-collection-model": "^5.25.8",
8686
"mongodb-data-service": "^22.25.8",
87+
"mongodb-mql-engines": "^0.0.4",
8788
"mongodb-query-parser": "^4.3.0",
8889
"mongodb-ns": "^2.4.2",
8990
"numeral": "^2.0.6",
9091
"react": "^17.0.2",
9192
"react-redux": "^8.1.3",
9293
"redux": "^4.2.1",
9394
"redux-thunk": "^2.4.2",
94-
"semver": "^7.6.2",
95-
"mongodb-mql-engines": "^0.0.4"
95+
"semver": "^7.6.2"
9696
},
9797
"is_compass_plugin": true
9898
}

packages/compass-indexes/src/modules/create-index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { IndexesThunkAction } from '.';
1010
import type { RootState } from '.';
1111
import { createRegularIndex } from './regular-indexes';
1212
import * as mql from 'mongodb-mql-engines';
13+
import _parseShellBSON, { ParseMode } from '@mongodb-js/shell-bson-parser';
1314

1415
export enum ActionTypes {
1516
FieldAdded = 'compass-indexes/create-index/fields/field-added',
@@ -417,7 +418,7 @@ export const fetchIndexSuggestions = ({
417418
);
418419

419420
const query = mql.parseQuery(
420-
EJSON.parse(inputQuery, { relaxed: false }),
421+
_parseShellBSON(inputQuery, { mode: ParseMode.Loose }),
421422
analyzedNamespace
422423
);
423424
const results = await mql.suggestIndex([query]);

0 commit comments

Comments
 (0)