+
+ Perform a
+ {/* @ts-expect-error leafygreen unresonably expects a labelledby here */}
+
+
+ with maxEdits
+
+ onChangeProperty('maxEdits', Number(e.target.value))
+ }
+ />
+
+
+
+ for all documents where
+ {/* @ts-expect-error leafygreen unresonably expects a labelledby here */}
+
+ {formData.path === 'fields' && (
+ onChangeProperty('fields', val)}
+ fields={fields}
+ multiselect={true}
+ />
+ )}
+ {formData.path === 'wildcard' && (
+ onChangeProperty('wildcard', e.target.value)}
+ />
+ )}
+
+
+ contains
+
onChangeProperty('text', e.target.value)}
+ />
+
+ using
+
+ onChangeProperty('indexName', value ?? '')
+ }
+ searchState={(() => {
+ if (indexesStatus === 'LOADING') {
+ return 'loading';
+ }
+ if (indexesStatus === 'ERROR') {
+ return 'error';
+ }
+ return 'unset';
+ })()}
+ searchLoadingMessage="Fetching search indexes ..."
+ searchErrorMessage={
+ 'Failed to fetch the search indexes. Type the index name manually.'
+ }
+ options={indexes.map((x) => ({ value: x.name }))}
+ renderOption={(option, index, isCustom) => {
+ return (
+
+ );
+ }}
+ />
+
+
+
+ );
+};
+
+export default connect(
+ (state: RootState) => ({
+ indexes: state.searchIndexes.indexes,
+ indexesStatus: state.searchIndexes.status,
+ }),
+ {
+ onFetchIndexes: fetchIndexes,
+ }
+)(TextSearch);
diff --git a/packages/compass-aggregations/src/components/stage-wizard/index.tsx b/packages/compass-aggregations/src/components/stage-wizard/index.tsx
index f5d0d273d03..d24e8feb382 100644
--- a/packages/compass-aggregations/src/components/stage-wizard/index.tsx
+++ b/packages/compass-aggregations/src/components/stage-wizard/index.tsx
@@ -6,6 +6,7 @@ import {
KeylineCard,
Link,
spacing,
+ Disclaimer,
WarningSummary,
} from '@mongodb-js/compass-components';
import type {
@@ -38,12 +39,17 @@ const containerStyles = css({
const headerStyles = css({
display: 'flex',
- alignItems: 'center',
+ justifyContent: 'space-between',
gap: spacing[2],
padding: spacing[3],
cursor: 'grab',
});
+const headingStyles = css({
+ display: 'flex',
+ gap: spacing[2],
+});
+
const wizardContentStyles = css({
padding: spacing[3],
display: 'flex',
@@ -124,13 +130,16 @@ export const StageWizard = ({
>
diff --git a/packages/compass-aggregations/src/modules/search-indexes.spec.ts b/packages/compass-aggregations/src/modules/search-indexes.spec.ts
new file mode 100644
index 00000000000..4961706b13d
--- /dev/null
+++ b/packages/compass-aggregations/src/modules/search-indexes.spec.ts
@@ -0,0 +1,192 @@
+import { expect } from 'chai';
+import reducer, { fetchIndexes, ActionTypes } from './search-indexes';
+import configureStore from '../../test/configure-store';
+import { DATA_SERVICE_CONNECTED } from './data-service';
+import sinon from 'sinon';
+
+describe('search-indexes module', function () {
+ describe('#reducer', function () {
+ it('returns default state', function () {
+ expect(
+ reducer(undefined, {
+ type: 'test',
+ })
+ ).to.deep.equal({
+ isSearchIndexesSupported: false,
+ indexes: [],
+ status: 'INITIAL',
+ });
+ });
+ it('returns state when fetching starts', function () {
+ expect(
+ reducer(undefined, {
+ type: ActionTypes.FetchIndexesStarted,
+ })
+ ).to.deep.equal({
+ isSearchIndexesSupported: false,
+ indexes: [],
+ status: 'LOADING',
+ });
+ });
+ it('returns state when fetching succeeds', function () {
+ expect(
+ reducer(undefined, {
+ type: ActionTypes.FetchIndexesFinished,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ })
+ ).to.deep.equal({
+ isSearchIndexesSupported: false,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ status: 'READY',
+ });
+ });
+ it('returns state when fetching fails', function () {
+ expect(
+ reducer(undefined, {
+ type: ActionTypes.FetchIndexesFailed,
+ })
+ ).to.deep.equal({
+ isSearchIndexesSupported: false,
+ indexes: [],
+ status: 'ERROR',
+ });
+ });
+ });
+ describe('#actions', function () {
+ let store: ReturnType
;
+ beforeEach(function () {
+ store = configureStore({
+ pipeline: [],
+ isSearchIndexesSupported: true,
+ namespace: 'test.listings',
+ });
+ });
+ context('fetchIndexes', function () {
+ it('fetches search indexes and sets status to READY', async function () {
+ const spy = sinon.spy((ns: string) => {
+ expect(ns).to.equal('test.listings');
+ return Promise.resolve([
+ { name: 'default' },
+ { name: 'vector_index' },
+ ]);
+ });
+
+ store.dispatch({
+ type: DATA_SERVICE_CONNECTED,
+ dataService: {
+ getSearchIndexes: spy,
+ },
+ });
+
+ await store.dispatch(fetchIndexes());
+
+ expect(store.getState().searchIndexes).to.deep.equal({
+ isSearchIndexesSupported: true,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ status: 'READY',
+ });
+ });
+
+ it('does not fetch indexes when status is LOADING', async function () {
+ // Set the status to LOADING
+ store.dispatch({
+ type: ActionTypes.FetchIndexesStarted,
+ });
+
+ const spy = sinon.spy();
+ store.dispatch({
+ type: DATA_SERVICE_CONNECTED,
+ dataService: {
+ getSearchIndexes: spy,
+ },
+ });
+
+ await store.dispatch(fetchIndexes());
+ await store.dispatch(fetchIndexes());
+ await store.dispatch(fetchIndexes());
+
+ expect(spy.callCount).to.equal(0);
+ });
+
+ it('does not fetch indexes when status is READY', async function () {
+ // Set the status to LOADING
+ store.dispatch({
+ type: ActionTypes.FetchIndexesFinished,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ });
+
+ const spy = sinon.spy();
+ store.dispatch({
+ type: DATA_SERVICE_CONNECTED,
+ dataService: {
+ getSearchIndexes: spy,
+ },
+ });
+
+ await store.dispatch(fetchIndexes());
+ await store.dispatch(fetchIndexes());
+ await store.dispatch(fetchIndexes());
+
+ expect(spy.callCount).to.equal(0);
+
+ expect(store.getState().searchIndexes).to.deep.equal({
+ isSearchIndexesSupported: true,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ status: 'READY',
+ });
+ });
+
+ it('sets ERROR status when fetching indexes fails', async function () {
+ const spy = sinon.spy((ns: string) => {
+ expect(ns).to.equal('test.listings');
+ return Promise.reject(new Error('Failed to fetch indexes'));
+ });
+
+ store.dispatch({
+ type: DATA_SERVICE_CONNECTED,
+ dataService: {
+ getSearchIndexes: spy,
+ },
+ });
+
+ await store.dispatch(fetchIndexes());
+
+ expect(store.getState().searchIndexes).to.deep.equal({
+ isSearchIndexesSupported: true,
+ indexes: [],
+ status: 'ERROR',
+ });
+ });
+
+ it('fetchs indexes in error state', async function () {
+ // Set the status to ERROR
+ store.dispatch({
+ type: ActionTypes.FetchIndexesFailed,
+ });
+
+ const spy = sinon.spy((ns: string) => {
+ expect(ns).to.equal('test.listings');
+ return Promise.resolve([
+ { name: 'default' },
+ { name: 'vector_index' },
+ ]);
+ });
+
+ store.dispatch({
+ type: DATA_SERVICE_CONNECTED,
+ dataService: {
+ getSearchIndexes: spy,
+ },
+ });
+
+ await store.dispatch(fetchIndexes());
+
+ expect(store.getState().searchIndexes).to.deep.equal({
+ isSearchIndexesSupported: true,
+ indexes: [{ name: 'default' }, { name: 'vector_index' }],
+ status: 'READY',
+ });
+ });
+ });
+ });
+});
diff --git a/packages/compass-aggregations/src/modules/search-indexes.ts b/packages/compass-aggregations/src/modules/search-indexes.ts
index 7e4d59f92fe..411e0a588f5 100644
--- a/packages/compass-aggregations/src/modules/search-indexes.ts
+++ b/packages/compass-aggregations/src/modules/search-indexes.ts
@@ -1,19 +1,115 @@
-import type { Reducer } from 'redux';
+import type { AnyAction, Reducer } from 'redux';
import type { PipelineBuilderThunkAction } from '.';
import { localAppRegistryEmit } from '@mongodb-js/mongodb-redux-common/app-registry';
+import type { SearchIndex } from 'mongodb-data-service';
+import { isAction } from '../utils/is-action';
+
+enum SearchIndexesStatuses {
+ INITIAL = 'INITIAL',
+ LOADING = 'LOADING',
+ READY = 'READY',
+ ERROR = 'ERROR',
+}
+
+export type SearchIndexesStatus = keyof typeof SearchIndexesStatuses;
+
+export enum ActionTypes {
+ FetchIndexesStarted = 'compass-aggregations/search-indexes/FetchIndexesStarted',
+ FetchIndexesFinished = 'compass-aggregations/search-indexes/FetchIndexesFinished',
+ FetchIndexesFailed = 'compass-aggregations/search-indexes/FetchIndexesFailed',
+}
+
+type FetchIndexesStartedAction = {
+ type: ActionTypes.FetchIndexesStarted;
+};
+
+type FetchIndexesFinishedAction = {
+ type: ActionTypes.FetchIndexesFinished;
+ indexes: SearchIndex[];
+};
+
+type FetchIndexesFailedAction = {
+ type: ActionTypes.FetchIndexesFailed;
+};
type State = {
isSearchIndexesSupported: boolean;
+ indexes: SearchIndex[];
+ status: SearchIndexesStatus;
};
export const INITIAL_STATE: State = {
isSearchIndexesSupported: false,
+ indexes: [],
+ status: SearchIndexesStatuses.INITIAL,
};
-const reducer: Reducer = (state = INITIAL_STATE) => {
+const reducer: Reducer = (state = INITIAL_STATE, action: AnyAction) => {
+ if (
+ isAction(action, ActionTypes.FetchIndexesStarted)
+ ) {
+ return {
+ ...state,
+ status: SearchIndexesStatuses.LOADING,
+ };
+ }
+ if (
+ isAction(
+ action,
+ ActionTypes.FetchIndexesFinished
+ )
+ ) {
+ return {
+ ...state,
+ indexes: action.indexes,
+ status: SearchIndexesStatuses.READY,
+ };
+ }
+ if (
+ isAction(action, ActionTypes.FetchIndexesFailed)
+ ) {
+ return {
+ ...state,
+ status: SearchIndexesStatuses.ERROR,
+ };
+ }
return state;
};
+export const fetchIndexes = (): PipelineBuilderThunkAction> => {
+ return async (dispatch, getState) => {
+ const {
+ namespace,
+ dataService: { dataService },
+ searchIndexes: { status },
+ } = getState();
+
+ if (
+ !dataService ||
+ status === SearchIndexesStatuses.LOADING ||
+ status === SearchIndexesStatuses.READY
+ ) {
+ return;
+ }
+
+ dispatch({
+ type: ActionTypes.FetchIndexesStarted,
+ });
+
+ try {
+ const indexes = await dataService.getSearchIndexes(namespace);
+ dispatch({
+ type: ActionTypes.FetchIndexesFinished,
+ indexes,
+ });
+ } catch (e) {
+ dispatch({
+ type: ActionTypes.FetchIndexesFailed,
+ });
+ }
+ };
+};
+
export const createSearchIndex = (): PipelineBuilderThunkAction => {
return (dispatch) => {
dispatch(localAppRegistryEmit('open-create-search-index-modal'));
diff --git a/packages/compass-aggregations/src/stores/store.ts b/packages/compass-aggregations/src/stores/store.ts
index 14dd961732e..cb59538b327 100644
--- a/packages/compass-aggregations/src/stores/store.ts
+++ b/packages/compass-aggregations/src/stores/store.ts
@@ -26,6 +26,7 @@ import {
} from '../modules/collections-fields';
import type { CollectionInfo } from '../modules/collections-fields';
import { disableAIFeature } from '../modules/pipeline-builder/pipeline-ai';
+import { INITIAL_STATE as SEARCH_INDEXES_INITIAL_STATE } from '../modules/search-indexes';
export type ConfigureStoreOptions = {
/**
@@ -233,6 +234,7 @@ const configureStore = (options: ConfigureStoreOptions) => {
sourceName: options.sourceName,
editViewName: options.editViewName,
searchIndexes: {
+ ...SEARCH_INDEXES_INITIAL_STATE,
isSearchIndexesSupported: Boolean(options.isSearchIndexesSupported),
},
},
diff --git a/packages/compass-aggregations/src/utils/pipeline-storage.ts b/packages/compass-aggregations/src/utils/pipeline-storage.ts
index 2bda3bce86c..98acb089285 100644
--- a/packages/compass-aggregations/src/utils/pipeline-storage.ts
+++ b/packages/compass-aggregations/src/utils/pipeline-storage.ts
@@ -1,5 +1,5 @@
+import type { Stats } from '@mongodb-js/compass-user-data';
import { UserData, z } from '@mongodb-js/compass-user-data';
-import type { Stats } from 'fs';
import { createLoggerAndTelemetry } from '@mongodb-js/compass-logging';
import { prettify } from '../modules/pipeline-builder/pipeline-parser/utils';
diff --git a/packages/compass-app-stores/package.json b/packages/compass-app-stores/package.json
index feebee5368e..d3caf8f17f7 100644
--- a/packages/compass-app-stores/package.json
+++ b/packages/compass-app-stores/package.json
@@ -11,7 +11,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "7.3.1",
+ "version": "7.3.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -54,11 +54,11 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/sinon-chai": "^3.2.5",
@@ -66,7 +66,7 @@
"debug": "^4.3.1",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
"mongodb-ns": "^2.4.0",
"nyc": "^15.1.0",
@@ -76,10 +76,10 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "mongodb-instance-model": "^12.12.1"
+ "mongodb-instance-model": "^12.12.2"
},
"peerDependencies": {
- "mongodb-instance-model": "^12.12.1"
+ "mongodb-instance-model": "^12.12.2"
},
"publishConfig": {
"access": "public"
diff --git a/packages/compass-collection/package.json b/packages/compass-collection/package.json
index 3a3bac7fc8a..3b1e2e6146a 100644
--- a/packages/compass-collection/package.json
+++ b/packages/compass-collection/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "4.15.1",
+ "version": "4.16.0",
"apiVersion": "3.0.0",
"repository": {
"type": "git",
@@ -56,28 +56,28 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-app-registry": "^9.0.11",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-app-registry": "^9.0.11",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -92,9 +92,9 @@
"eslint": "^7.25.0",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-collection-model": "^5.12.1",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-collection-model": "^5.12.2",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
"mongodb-ns": "^2.4.0",
"numeral": "^2.0.6",
"nyc": "^15.1.0",
diff --git a/packages/compass-components/package.json b/packages/compass-components/package.json
index 0379ab49673..7d826a006f5 100644
--- a/packages/compass-components/package.json
+++ b/packages/compass-components/package.json
@@ -1,6 +1,6 @@
{
"name": "@mongodb-js/compass-components",
- "version": "1.15.0",
+ "version": "1.16.0",
"description": "React Components used in Compass",
"license": "SSPL",
"main": "lib/index.js",
@@ -79,7 +79,7 @@
"@react-stately/tooltip": "^3.0.5",
"bson": "^6.0.0",
"focus-trap-react": "^8.4.2",
- "hadron-document": "^8.4.1",
+ "hadron-document": "^8.4.2",
"hadron-type-checker": "^7.1.0",
"is-electron-renderer": "^2.0.1",
"lodash": "^4.17.21",
@@ -93,7 +93,7 @@
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-components/src/components/guide-cue/guide-cue-service.ts b/packages/compass-components/src/components/guide-cue/guide-cue-service.ts
index 45eb959722e..a710c36cadc 100644
--- a/packages/compass-components/src/components/guide-cue/guide-cue-service.ts
+++ b/packages/compass-components/src/components/guide-cue/guide-cue-service.ts
@@ -88,14 +88,19 @@ export class GuideCueService extends EventTarget {
if (!this._activeCue) {
return;
}
- return this.dispatchEvent(
- new CustomEvent('show-cue', {
- detail: {
- cueId: this._activeCue.cueId,
- groupId: this._activeCue.groupId,
- },
- })
- );
+ try {
+ return this.dispatchEvent(
+ new CustomEvent('show-cue', {
+ detail: {
+ cueId: this._activeCue.cueId,
+ groupId: this._activeCue.groupId,
+ },
+ })
+ );
+ } catch (ex) {
+ // TODO(COMPASS-7357): this seems to be a temporary error happening sometimes during test.
+ // In that case, assume the event is not dispatched
+ }
}
private validateCueData(groupId: GroupName, step: number) {
diff --git a/packages/compass-connection-import-export/package.json b/packages/compass-connection-import-export/package.json
index 6198e585ceb..01cf19e7887 100644
--- a/packages/compass-connection-import-export/package.json
+++ b/packages/compass-connection-import-export/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.13.1",
+ "version": "0.14.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -51,20 +51,20 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"hadron-ipc": "^3.2.2",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"react": "^17.0.2"
},
"dependencies": {
"@electron/remote": "^2.0.11",
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"hadron-ipc": "^3.2.2",
- "mongodb-data-service": "^22.12.1"
+ "mongodb-data-service": "^22.12.2"
},
"devDependencies": {
- "@mongodb-js/connection-storage": "^0.6.1",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -77,7 +77,7 @@
"@types/react-dom": "^17.0.10",
"@types/sinon-chai": "^3.2.5",
"chai": "^4.3.6",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"gen-esm-wrapper": "^1.1.0",
diff --git a/packages/compass-connections/package.json b/packages/compass-connections/package.json
index 98b23832e43..de0445cd615 100644
--- a/packages/compass-connections/package.json
+++ b/packages/compass-connections/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.16.1",
+ "version": "1.17.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -48,28 +48,28 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "compass-preferences-model": "^2.15.2",
"hadron-ipc": "^3.2.2",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-connection-import-export": "^0.13.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
- "@mongodb-js/connection-form": "^1.15.1",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-connection-import-export": "^0.14.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
+ "@mongodb-js/connection-form": "^1.16.0",
+ "compass-preferences-model": "^2.15.2",
"hadron-ipc": "^3.2.2",
"lodash": "^4.17.21",
"mongodb": "^6.0.0",
"uuid": "^8.2.0"
},
"devDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.2",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -84,13 +84,13 @@
"chai": "^4.3.4",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb-build-info": "^1.7.0",
"mongodb-cloud-info": "^2.0.1",
"mongodb-connection-string-url": "^2.6.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"react": "^17.0.2",
diff --git a/packages/compass-crud/package.json b/packages/compass-crud/package.json
index 72ae37de8bb..800b89b92c1 100644
--- a/packages/compass-crud/package.json
+++ b/packages/compass-crud/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-crud",
"productName": "Compass CRUD plugin",
- "version": "13.15.1",
+ "version": "13.16.0",
"description": "Compass Plugin for CRUD Operations",
"author": {
"name": "MongoDB Inc",
@@ -56,23 +56,23 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/explain-plan-helper": "^1.1.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/explain-plan-helper": "^1.1.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2",
"hadron-type-checker": "^7.1.0",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/compass-test-server": "^0.1.3",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-test-server": "^0.1.4",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/reflux": "^6.4.3",
@@ -85,12 +85,13 @@
"electron": "^25.8.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
+ "mongodb-query-parser": "^3.1.3",
"mongodb-ns": "^2.4.0",
"nyc": "^15.1.0",
"prop-types": "^15.7.2",
@@ -102,13 +103,13 @@
"sinon": "^8.1.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/explain-plan-helper": "^1.1.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/explain-plan-helper": "^1.1.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2",
"hadron-type-checker": "^7.1.0"
}
}
diff --git a/packages/compass-crud/src/components/bulk-delete-modal.spec.tsx b/packages/compass-crud/src/components/bulk-delete-modal.spec.tsx
new file mode 100644
index 00000000000..350d77794e6
--- /dev/null
+++ b/packages/compass-crud/src/components/bulk-delete-modal.spec.tsx
@@ -0,0 +1,75 @@
+import React from 'react';
+import { expect } from 'chai';
+import sinon from 'sinon';
+import { render, screen, cleanup } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import BulkDeleteModal from './bulk-delete-modal';
+
+function renderBulkDeleteModal(
+ props?: Partial>
+) {
+ return render(
+ {}}
+ onConfirmDeletion={() => {}}
+ {...props}
+ />
+ );
+}
+
+describe('BulkDeleteModal Component', function () {
+ afterEach(function () {
+ cleanup();
+ });
+
+ it('does not render if closed', function () {
+ renderBulkDeleteModal({ open: false });
+ expect(screen.queryByText(/Delete/)).to.not.exist;
+ });
+
+ it('does render if open', function () {
+ renderBulkDeleteModal();
+ expect(screen.queryAllByText(/Delete/)).to.not.be.empty;
+ });
+
+ it('shows the number of documents that will be deleted', function () {
+ renderBulkDeleteModal({ documentCount: 42 });
+ expect(screen.queryAllByText('Delete 42 documents')[0]).to.be.visible;
+ });
+
+ it('shows the affected collection', function () {
+ renderBulkDeleteModal({ namespace: 'mydb.mycoll' });
+ expect(screen.queryByText('mydb.mycoll')).to.be.visible;
+ });
+
+ it('shows the provided query', function () {
+ renderBulkDeleteModal({ filterQuery: '{ a: 1 }' });
+ expect(screen.queryByDisplayValue('{ a: 1 }')).to.be.visible;
+ });
+
+ it('closes the modal when cancelled', function () {
+ const onCloseSpy = sinon.spy();
+ renderBulkDeleteModal({ onCancel: onCloseSpy });
+
+ userEvent.click(screen.getByText('Close').closest('button')!);
+ expect(onCloseSpy).to.have.been.calledOnce;
+ });
+
+ it('confirms deletion when clicked on the Delete documents button', function () {
+ const onConfirmDeletionSpy = sinon.spy();
+ renderBulkDeleteModal({
+ documentCount: 10,
+ onConfirmDeletion: onConfirmDeletionSpy,
+ });
+
+ userEvent.click(
+ screen.getAllByText('Delete 10 documents')[1].closest('button')!
+ );
+ expect(onConfirmDeletionSpy).to.have.been.calledOnce;
+ });
+});
diff --git a/packages/compass-crud/src/components/bulk-delete-modal.tsx b/packages/compass-crud/src/components/bulk-delete-modal.tsx
new file mode 100644
index 00000000000..649345773dc
--- /dev/null
+++ b/packages/compass-crud/src/components/bulk-delete-modal.tsx
@@ -0,0 +1,159 @@
+import React from 'react';
+import {
+ Modal,
+ ModalHeader,
+ ModalBody,
+ ModalFooter,
+ Button,
+ TextInput,
+ KeylineCard,
+ css,
+ cx,
+ spacing,
+ InfoSprinkle,
+ Label,
+} from '@mongodb-js/compass-components';
+import ReadonlyDocument from './readonly-document';
+
+const modalFooterSpacingStyles = css({
+ gap: spacing[2],
+});
+
+const documentHorizontalWrapper = css({
+ display: 'flex',
+ flexDirection: 'row',
+ flex: 'none',
+ flexShrink: 0,
+ overflow: 'auto',
+ marginBottom: spacing[2],
+ gap: spacing[2],
+ maxWidth: '100%',
+});
+
+const documentContainerStyles = css({
+ display: 'flex',
+ flexDirection: 'column',
+ flex: 'none',
+ flexShrink: 0,
+ marginBottom: spacing[2],
+ width: '100%',
+});
+
+const documentStyles = css({
+ flexBasis: '164px',
+ flexGrow: 1,
+ flexShrink: 0,
+ overflow: 'auto',
+ padding: 0,
+ width: '100%',
+});
+
+const modalBodySpacingStyles = css({
+ marginTop: spacing[3],
+ paddingLeft: spacing[5],
+ display: 'flex',
+ flexDirection: 'column',
+ gap: spacing[3],
+});
+
+const previewStyles = css({
+ minHeight: '200px',
+});
+
+type QueryLabelProps = {
+ tooltip: string;
+ label: string;
+};
+
+const queryLabelStyles = css({
+ display: 'flex',
+ gap: spacing[2],
+ alignItems: 'center',
+});
+
+const QueryLabel: React.FunctionComponent = ({
+ tooltip,
+ label,
+}) => {
+ return (
+
+
+ {tooltip}
+
+ );
+};
+
+type BulkDeleteModalProps = {
+ open: boolean;
+ documentCount: number;
+ filterQuery: string;
+ namespace: string;
+ sampleDocuments: Document[];
+ onCancel: () => void;
+ onConfirmDeletion: () => void;
+};
+
+const BulkDeleteModal: React.FunctionComponent = ({
+ open,
+ documentCount,
+ filterQuery,
+ namespace,
+ sampleDocuments,
+ onCancel,
+ onConfirmDeletion,
+}) => {
+ const preview = (
+
+ {sampleDocuments.map((doc, i) => {
+ return (
+
+
+
+
+
+ );
+ })}
+
+ );
+
+ return (
+
+
+
+
+ }
+ disabled={true}
+ value={filterQuery}
+ />
+
+ Preview (sample of {sampleDocuments.length} documents)
+ {preview}
+
+
+
+
+
+
+
+ );
+};
+
+export default BulkDeleteModal;
diff --git a/packages/compass-crud/src/components/crud-toolbar.spec.tsx b/packages/compass-crud/src/components/crud-toolbar.spec.tsx
index 162569a2f5f..6d46e89785d 100644
--- a/packages/compass-crud/src/components/crud-toolbar.spec.tsx
+++ b/packages/compass-crud/src/components/crud-toolbar.spec.tsx
@@ -10,7 +10,7 @@ import {
within,
} from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-
+import preferencesAccess from 'compass-preferences-model';
import { CrudToolbar } from './crud-toolbar';
const noop = () => {
@@ -63,6 +63,7 @@ function renderCrudToolbar(
instanceDescription=""
onApplyClicked={noop}
onResetClicked={noop}
+ onDeleteButtonClicked={noop}
openExportFileDialog={noop}
outdated={false}
page={0}
@@ -71,16 +72,29 @@ function renderCrudToolbar(
resultId="123"
start={0}
viewSwitchHandler={noop}
+ queryLimit={0}
+ querySkip={0}
{...props}
/>
);
}
const addDataText = 'Add Data';
+const deleteDataText = 'Delete';
describe('CrudToolbar Component', function () {
+ let sandbox: sinon.SinonSandbox;
+
afterEach(function () {
cleanup();
+ return sandbox.restore();
+ });
+
+ beforeEach(function () {
+ sandbox = sinon.createSandbox();
+ sandbox.stub(preferencesAccess, 'getPreferences').returns({
+ enableBulkDeleteOperations: true,
+ } as any);
});
it('renders the query bar role', function () {
@@ -247,12 +261,13 @@ describe('CrudToolbar Component', function () {
);
});
- it('should not render the add data button when it is readonly', function () {
+ it('should not render both the add data button and the delete button when it is readonly', function () {
renderCrudToolbar({
readonly: true,
});
expect(screen.queryByText(addDataText)).to.not.exist;
+ expect(screen.queryByText(deleteDataText)).to.not.exist;
});
it('should call to open the export dialog when export is clicked', function () {
@@ -269,6 +284,46 @@ describe('CrudToolbar Component', function () {
expect(exportSpy.firstCall.args[0]).to.be.true;
});
+ describe('delete button', function () {
+ it('should not be visible when the enableBulkDeleteOperations toggle is off', function () {
+ sandbox.restore();
+ sandbox.stub(preferencesAccess, 'getPreferences').returns({
+ enableBulkDeleteOperations: false,
+ } as any);
+
+ expect(screen.queryByText(deleteDataText)).to.not.exist;
+ });
+
+ it('should render disabled when the query has a skip', function () {
+ renderCrudToolbar({
+ querySkip: 10,
+ });
+
+ expect(screen.getByText(deleteDataText).closest('button')).to.have.attr(
+ 'disabled'
+ );
+ });
+
+ it('should render disabled when the query has a limit', function () {
+ renderCrudToolbar({
+ queryLimit: 10,
+ });
+
+ expect(screen.getByText(deleteDataText).closest('button')).to.have.attr(
+ 'disabled'
+ );
+ });
+
+ it('should propagate click events', function () {
+ const onDeleteButtonClickedSpy = sinon.spy();
+
+ renderCrudToolbar({ onDeleteButtonClicked: onDeleteButtonClickedSpy });
+
+ userEvent.click(screen.getByText(deleteDataText).closest('button')!);
+ expect(onDeleteButtonClickedSpy).to.have.been.called;
+ });
+ });
+
it('should not render the outdated message', function () {
renderCrudToolbar();
diff --git a/packages/compass-crud/src/components/crud-toolbar.tsx b/packages/compass-crud/src/components/crud-toolbar.tsx
index 30cfc4314c3..f8bd3f80c20 100644
--- a/packages/compass-crud/src/components/crud-toolbar.tsx
+++ b/packages/compass-crud/src/components/crud-toolbar.tsx
@@ -17,6 +17,7 @@ import { ViewSwitcher } from './view-switcher';
import type { DocumentView } from '../stores/crud-store';
import { AddDataMenu } from './add-data-menu';
import { usePreference } from 'compass-preferences-model';
+import DeleteMenu from './delete-data-menu';
const { track } = createLoggerAndTelemetry('COMPASS-CRUD-UI');
@@ -99,6 +100,7 @@ export type CrudToolbarProps = {
localAppRegistry: AppRegistry;
onApplyClicked: () => void;
onResetClicked: () => void;
+ onDeleteButtonClicked: () => void;
openExportFileDialog: (exportFullCollection?: boolean) => void;
outdated: boolean;
page: number;
@@ -108,6 +110,8 @@ export type CrudToolbarProps = {
start: number;
viewSwitchHandler: (view: DocumentView) => void;
insights?: Signal;
+ queryLimit?: number;
+ querySkip?: number;
};
const CrudToolbar: React.FunctionComponent = ({
@@ -124,6 +128,7 @@ const CrudToolbar: React.FunctionComponent = ({
localAppRegistry,
onApplyClicked,
onResetClicked,
+ onDeleteButtonClicked,
openExportFileDialog,
outdated,
page,
@@ -133,6 +138,8 @@ const CrudToolbar: React.FunctionComponent = ({
start,
viewSwitchHandler,
insights,
+ queryLimit,
+ querySkip,
}) => {
const queryBarRole = localAppRegistry.getRole('Query.QueryBar')![0];
@@ -168,6 +175,10 @@ const CrudToolbar: React.FunctionComponent = ({
);
const enableExplainPlan = usePreference('enableExplainPlan', React);
+ const shouldDisableBulkOp = useMemo(
+ () => querySkip || queryLimit,
+ [querySkip, queryLimit]
+ );
return (
@@ -207,6 +218,13 @@ const CrudToolbar: React.FunctionComponent = ({
leftGlyph: ,
}}
/>
+ {!readonly && (
+
+ )}
diff --git a/packages/compass-crud/src/components/delete-data-menu.tsx b/packages/compass-crud/src/components/delete-data-menu.tsx
new file mode 100644
index 00000000000..99d56ac9ca1
--- /dev/null
+++ b/packages/compass-crud/src/components/delete-data-menu.tsx
@@ -0,0 +1,69 @@
+import React from 'react';
+import { Icon, Button, Tooltip } from '@mongodb-js/compass-components';
+import { usePreference } from 'compass-preferences-model';
+
+type DeleteMenuButtonProps = {
+ isWritable: boolean;
+ onClick: () => void;
+};
+
+const DeleteMenuButton: React.FunctionComponent
= ({
+ isWritable,
+ onClick,
+}) => {
+ const isVisible = usePreference('enableBulkDeleteOperations', React);
+
+ if (!isVisible) {
+ return null;
+ }
+
+ return (
+
+ );
+};
+
+type DeleteMenuProps = DeleteMenuButtonProps & {
+ disabledTooltip: string;
+};
+
+const DeleteMenu: React.FunctionComponent = ({
+ isWritable,
+ onClick,
+ disabledTooltip,
+}) => {
+ if (isWritable) {
+ return (
+
+ );
+ }
+
+ return (
+ ) => (
+
+
+ {tooltipChildren}
+
+ )}
+ // Disable the tooltip when the instance is in a writable state.
+ isDisabled={isWritable}
+ justify="middle"
+ delay={500}
+ >
+ {disabledTooltip}
+
+ );
+};
+
+export default DeleteMenu;
diff --git a/packages/compass-crud/src/components/document-list.tsx b/packages/compass-crud/src/components/document-list.tsx
index 554ab554897..bea484ba65f 100644
--- a/packages/compass-crud/src/components/document-list.tsx
+++ b/packages/compass-crud/src/components/document-list.tsx
@@ -21,6 +21,7 @@ import type { DocumentTableViewProps } from './table-view/document-table-view';
import DocumentTableView from './table-view/document-table-view';
import type { CrudToolbarProps } from './crud-toolbar';
import { CrudToolbar } from './crud-toolbar';
+import { toJSString } from 'mongodb-query-parser';
import type { DOCUMENTS_STATUSES } from '../constants/documents-statuses';
import {
@@ -37,8 +38,8 @@ import type {
DocumentView,
QueryState,
} from '../stores/crud-store';
-import type Document from 'hadron-document';
import { getToolbarSignal } from '../utils/toolbar-signal';
+import BulkDeleteModal from './bulk-delete-modal';
const listAndJsonStyles = css({
padding: spacing[3],
@@ -235,6 +236,36 @@ class DocumentList extends React.Component {
}
}
+ onOpenBulkDeleteDialog() {
+ this.props.store.openBulkDeleteDialog();
+ }
+
+ onCancelBulkDeleteDialog() {
+ this.props.store.closeBulkDeleteDialog();
+ }
+
+ onConfirmBulkDeleteDialog() {
+ void this.props.store.runBulkDelete();
+ }
+
+ /**
+ * Render the bulk deletion modal
+ */
+ renderDeletionModal() {
+ return (
+
+ );
+ }
/**
* Render EmptyContent view when no documents are present.
*
@@ -315,6 +346,7 @@ class DocumentList extends React.Component {
isExportable={this.props.isExportable}
onApplyClicked={this.onApplyClicked.bind(this)}
onResetClicked={this.onResetClicked.bind(this)}
+ onDeleteButtonClicked={this.onOpenBulkDeleteDialog.bind(this)}
openExportFileDialog={this.props.openExportFileDialog}
outdated={this.props.outdated}
readonly={!this.props.isEditable}
@@ -323,6 +355,8 @@ class DocumentList extends React.Component {
instanceDescription={this.props.instanceDescription}
refreshDocuments={this.props.refreshDocuments}
resultId={this.props.resultId}
+ querySkip={this.props.store.state.query.skip}
+ queryLimit={this.props.store.state.query.limit}
insights={getToolbarSignal(
JSON.stringify(this.props.query.filter),
Boolean(this.props.isCollectionScan),
@@ -338,6 +372,7 @@ class DocumentList extends React.Component {
{this.renderZeroState()}
{this.renderContent()}
{this.renderInsertModal()}
+ {this.renderDeletionModal()}
);
diff --git a/packages/compass-crud/src/stores/crud-store.spec.ts b/packages/compass-crud/src/stores/crud-store.spec.ts
index e9f75d56d7f..087277875cb 100644
--- a/packages/compass-crud/src/stores/crud-store.spec.ts
+++ b/packages/compass-crud/src/stores/crud-store.spec.ts
@@ -185,6 +185,11 @@ describe('store', function () {
expect(store.state).to.deep.equal({
abortController: null,
+ bulkDelete: {
+ affected: 0,
+ previews: [],
+ status: 'closed',
+ },
debouncingLoad: false,
loadingCount: false,
collection: '',
@@ -823,6 +828,54 @@ describe('store', function () {
);
});
+ describe('#bulkDeleteDialog', function () {
+ let store;
+ let actions;
+
+ beforeEach(function () {
+ actions = configureActions();
+ store = configureStore({
+ localAppRegistry: localAppRegistry,
+ globalAppRegistry: globalAppRegistry,
+ dataProvider: {
+ error: null,
+ dataProvider: dataService,
+ },
+ actions: actions,
+ namespace: 'compass-crud.test',
+ });
+ });
+
+ it('opens the bulk dialog with a proper initialised state', function () {
+ const hadronDoc = new HadronDocument({ a: 1 });
+ store.state.docs = [hadronDoc];
+ store.state.count = 1;
+
+ store.openBulkDeleteDialog();
+
+ expect(store.state.bulkDelete).to.deep.equal({
+ previews: [hadronDoc],
+ status: 'open',
+ affected: 1,
+ });
+ });
+
+ it('closes the bulk dialog keeping previous state', function () {
+ const hadronDoc = new HadronDocument({ a: 1 });
+ store.state.docs = [hadronDoc];
+ store.state.count = 1;
+
+ store.openBulkDeleteDialog();
+ store.closeBulkDeleteDialog();
+
+ expect(store.state.bulkDelete).to.deep.equal({
+ previews: [hadronDoc],
+ status: 'closed',
+ affected: 1,
+ });
+ });
+ });
+
describe('#replaceDocument', function () {
let store;
let actions;
diff --git a/packages/compass-crud/src/stores/crud-store.ts b/packages/compass-crud/src/stores/crud-store.ts
index a953ff55caf..5d6f9f2ea24 100644
--- a/packages/compass-crud/src/stores/crud-store.ts
+++ b/packages/compass-crud/src/stores/crud-store.ts
@@ -39,6 +39,7 @@ import configureGridStore from './grid-store';
import type { TypeCastMap } from 'hadron-type-checker';
import type AppRegistry from 'hadron-app-registry';
import { BaseRefluxStore } from './base-reflux-store';
+import { openToast, showConfirmation } from '@mongodb-js/compass-components';
export type BSONObject = TypeCastMap['Object'];
export type BSONArray = TypeCastMap['Array'];
type Mutable = { -readonly [P in keyof T]: T[P] };
@@ -57,6 +58,9 @@ export type CrudActions = {
replaceDocument(doc: Document): void;
openInsertDocumentDialog(doc: BSONObject, cloned: boolean): void;
copyToClipboard(doc: Document): void; //XXX
+ openBulkDeleteDialog(): void;
+ closeBulkDeleteDialog(): void;
+ runBulkDelete(): void;
};
export type DocumentView = 'List' | 'JSON' | 'Table';
@@ -366,6 +370,12 @@ export type QueryState = {
collation: null | BSONObject;
};
+export type BulkDeleteState = {
+ previews: Document[];
+ status: 'open' | 'closed' | 'in-progress';
+ affected?: number;
+};
+
type CrudState = {
ns: string;
collection: string;
@@ -396,6 +406,7 @@ type CrudState = {
fields: string[];
isCollectionScan?: boolean;
isSearchIndexesSupported: boolean;
+ bulkDelete: BulkDeleteState;
};
class CrudStoreImpl
@@ -455,6 +466,11 @@ class CrudStoreImpl
fields: [],
isCollectionScan: false,
isSearchIndexesSupported: false,
+ bulkDelete: {
+ previews: [],
+ status: 'closed',
+ affected: 0,
+ },
};
}
@@ -1584,6 +1600,106 @@ class CrudStoreImpl
openCreateSearchIndexModal() {
this.localAppRegistry.emit('open-create-search-index-modal');
}
+
+ openBulkDeleteDialog() {
+ const PREVIEW_DOCS = 5;
+
+ this.setState({
+ bulkDelete: {
+ previews: this.state.docs?.slice(0, PREVIEW_DOCS) || [],
+ status: 'open',
+ affected: this.state.count || 0,
+ },
+ });
+ }
+
+ bulkDeleteInProgress() {
+ this.setState({
+ bulkDelete: {
+ ...this.state.bulkDelete,
+ status: 'in-progress',
+ },
+ });
+
+ openToast('bulk-delete-toast', {
+ title: '',
+ variant: 'progress',
+ dismissible: true,
+ timeout: null,
+ description: `${
+ this.state.bulkDelete.affected || 0
+ } documents are being deleted.`,
+ });
+ }
+
+ bulkDeleteFailed(ex: Error) {
+ openToast('bulk-delete-toast', {
+ title: '',
+ variant: 'warning',
+ dismissible: true,
+ timeout: 6_000,
+ description: `${
+ this.state.bulkDelete.affected || 0
+ } documents could not be deleted.`,
+ });
+
+ log.error(
+ mongoLogId(1_001_000_268),
+ 'Bulk Delete Documents',
+ `Delete opeartion failed: ${ex.message}`,
+ {
+ stack: ex.stack,
+ }
+ );
+ }
+
+ bulkDeleteSuccess() {
+ openToast('bulk-delete-toast', {
+ title: '',
+ variant: 'success',
+ dismissible: true,
+ timeout: 6_000,
+ description: `${
+ this.state.bulkDelete.affected || 0
+ } documents have been deleted.`,
+ });
+ }
+
+ closeBulkDeleteDialog() {
+ this.setState({
+ bulkDelete: {
+ ...this.state.bulkDelete,
+ status: 'closed',
+ },
+ });
+ }
+
+ async runBulkDelete() {
+ const { affected } = this.state.bulkDelete;
+ this.closeBulkDeleteDialog();
+
+ const confirmation = await showConfirmation({
+ title: 'Are you absolutely sure?',
+ buttonText: 'Delete',
+ description: `This action can not be undone. This will permanently delete ${
+ affected || 0
+ } documents.`,
+ variant: 'danger',
+ });
+
+ if (confirmation) {
+ this.bulkDeleteInProgress();
+ try {
+ await this.dataService.deleteMany(
+ this.state.ns,
+ this.state.query.filter
+ );
+ this.bulkDeleteSuccess();
+ } catch (ex) {
+ this.bulkDeleteFailed(ex as Error);
+ }
+ }
+ }
}
export type CrudStore = Store & CrudStoreImpl & { gridStore: GridStore };
diff --git a/packages/compass-database/package.json b/packages/compass-database/package.json
index 227af09035a..bdb5ba7087a 100644
--- a/packages/compass-database/package.json
+++ b/packages/compass-database/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-database",
"productName": "Database plugin",
- "version": "3.15.1",
+ "version": "3.16.0",
"description": "Compass Database Plugin",
"author": {
"name": "MongoDB Inc",
@@ -56,16 +56,16 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
@@ -74,14 +74,14 @@
"chai": "^4.1.2",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3"
}
}
diff --git a/packages/compass-databases-navigation/package.json b/packages/compass-databases-navigation/package.json
index b6ca2326197..8112438ef52 100644
--- a/packages/compass-databases-navigation/package.json
+++ b/packages/compass-databases-navigation/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.15.0",
+ "version": "1.16.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -50,12 +50,12 @@
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.6"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-e2e-tests/package.json b/packages/compass-e2e-tests/package.json
index 432964c3e1c..a8d75f5d2f9 100644
--- a/packages/compass-e2e-tests/package.json
+++ b/packages/compass-e2e-tests/package.json
@@ -1,6 +1,6 @@
{
"name": "compass-e2e-tests",
- "version": "1.15.1",
+ "version": "1.15.2",
"private": true,
"description": "E2E test suite for Compass app that follows smoke tests / feature testing matrix",
"scripts": {
@@ -28,8 +28,8 @@
},
"devDependencies": {
"@electron/rebuild": "^3.3.0",
- "@mongodb-js/compass-test-server": "^0.1.3",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-test-server": "^0.1.4",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/oidc-mock-provider": "^0.4.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -42,7 +42,7 @@
"chai-as-promised": "^7.1.1",
"chalk": "^4.1.2",
"clipboardy": "^2.3.0",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"cross-spawn": "^7.0.3",
"debug": "^4.2.0",
"depcheck": "^1.4.1",
diff --git a/packages/compass-editor/package.json b/packages/compass-editor/package.json
index 11f18426bbc..d0fc0a0d02b 100644
--- a/packages/compass-editor/package.json
+++ b/packages/compass-editor/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.14.1",
+ "version": "0.15.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -49,7 +49,7 @@
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -75,7 +75,7 @@
"@codemirror/state": "^6.1.4",
"@codemirror/view": "^6.7.1",
"@lezer/highlight": "^1.1.3",
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"@mongodb-js/mongodb-constants": "^0.8.6",
"polished": "^4.2.2",
"prettier": "^2.7.1"
diff --git a/packages/compass-explain-plan/package.json b/packages/compass-explain-plan/package.json
index c6b29b6066c..dce62fd7984 100644
--- a/packages/compass-explain-plan/package.json
+++ b/packages/compass-explain-plan/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-explain-plan",
"productName": "Explain Plan plugin",
"description": "Evaluate the performance of your query",
- "version": "6.15.1",
+ "version": "6.16.0",
"author": {
"name": "MongoDB Inc",
"email": "compass@mongodb.com"
@@ -56,22 +56,22 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-crud": "^13.15.1",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/explain-plan-helper": "^1.1.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-crud": "^13.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/explain-plan-helper": "^1.1.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/compass-field-store": "^9.0.4",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-field-store": "^9.0.5",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/d3": "^3.5.x",
@@ -85,11 +85,11 @@
"electron": "^25.8.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"nyc": "^15.1.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
@@ -101,12 +101,12 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-crud": "^13.15.1",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/explain-plan-helper": "^1.1.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "compass-preferences-model": "^2.15.1"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-crud": "^13.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/explain-plan-helper": "^1.1.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "compass-preferences-model": "^2.15.2"
}
}
diff --git a/packages/compass-export-to-language/package.json b/packages/compass-export-to-language/package.json
index d4d700c146d..71baa22e951 100644
--- a/packages/compass-export-to-language/package.json
+++ b/packages/compass-export-to-language/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "8.16.0",
+ "version": "8.17.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -56,34 +56,34 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"@mongodb-js/compass-logging": "*",
- "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.1",
+ "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.2",
"@mongodb-js/mongodb-redux-common": "*",
"bson-transpilers": "*",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.1",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.2",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"bson-transpilers": "^2.1.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@types/js-beautify": "^1.13.3",
"chai": "^4.3.6",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"depcheck": "^1.4.1",
"ejson-shell-parser": "^1.2.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"js-beautify": "^1.14.7",
"mocha": "^10.2.0",
"mongodb-ns": "^2.4.0",
diff --git a/packages/compass-field-store/package.json b/packages/compass-field-store/package.json
index d7f5ec38443..95e3b17e274 100644
--- a/packages/compass-field-store/package.json
+++ b/packages/compass-field-store/package.json
@@ -11,7 +11,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "9.0.4",
+ "version": "9.0.5",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -54,18 +54,18 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/sinon-chai": "^3.2.5",
"chai": "^4.3.6",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb-schema": "^11.2.1",
diff --git a/packages/compass-find-in-page/package.json b/packages/compass-find-in-page/package.json
index dc256360e25..653f6b72c09 100644
--- a/packages/compass-find-in-page/package.json
+++ b/packages/compass-find-in-page/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-find-in-page",
"productName": "Compass Find In Page plugin",
"description": "cmd-f UI for Compass",
- "version": "4.15.1",
+ "version": "4.16.0",
"author": {
"name": "MongoDB Inc",
"email": "compass@mongodb.com"
@@ -56,16 +56,16 @@
},
"license": "SSPL",
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"hadron-ipc": "^3.2.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -78,7 +78,7 @@
"depcheck": "^1.4.1",
"electron": "^25.8.4",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
@@ -91,7 +91,7 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"hadron-ipc": "^3.2.2"
}
}
diff --git a/packages/compass-generative-ai/package.json b/packages/compass-generative-ai/package.json
index 22b15af3c85..3c2d0a5c5c2 100644
--- a/packages/compass-generative-ai/package.json
+++ b/packages/compass-generative-ai/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.1.0",
+ "version": "0.2.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -48,7 +48,7 @@
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
- "ai-accuracy-tests": "node scripts/ai-accuracy-tests/index.js",
+ "ai-accuracy-tests": "node ./scripts/ai-accuracy-tests.js",
"test": "mocha",
"test-electron": "xvfb-maybe electron-mocha --no-sandbox",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
@@ -58,18 +58,18 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
+ "@mongodb-js/compass-components": "^1.16.0",
"react": "*"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0"
+ "@mongodb-js/compass-components": "^1.16.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.1",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -91,6 +91,7 @@
"mongodb-schema": "^11.2.2",
"node-fetch": "^2.7.0",
"nyc": "^15.1.0",
+ "p-queue": "^7.4.1",
"prettier": "^2.7.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/index.js b/packages/compass-generative-ai/scripts/ai-accuracy-tests.js
similarity index 88%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/index.js
rename to packages/compass-generative-ai/scripts/ai-accuracy-tests.js
index db6126db786..08c059749c9 100644
--- a/packages/compass-generative-ai/scripts/ai-accuracy-tests/index.js
+++ b/packages/compass-generative-ai/scripts/ai-accuracy-tests.js
@@ -36,6 +36,18 @@ const DEFAULT_MIN_ACCURACY = 0.8;
const MAX_TIMEOUTS_PER_TEST = 10;
+// There are a limited amount of resources available both on the Atlas
+// and on the ai service side of things, so we want to limit how many
+// requests can be happening at a time.
+const TESTS_TO_RUN_CONCURRENTLY = 3;
+
+// To avoid rate limit we also reduce the time between tests running
+// when the test returns a result quickly.
+const ADD_TIMEOUT_BETWEEN_TESTS_THRESHOLD_MS = 5000;
+const TIMEOUT_BETWEEN_TESTS_MS = 2000;
+
+let PQueue;
+
const ATTEMPTS_PER_TEST = process.env.AI_TESTS_ATTEMPTS_PER_TEST
? +process.env.AI_TESTS_ATTEMPTS_PER_TEST
: DEFAULT_ATTEMPTS_PER_TEST;
@@ -254,11 +266,22 @@ const runTest = async (testOptions) => {
const attempts = ATTEMPTS_PER_TEST;
let fails = 0;
let timeouts = 0;
+ let lastTestTimeMS = 0;
for (let i = 0; i < attempts; i++) {
if (timeouts >= MAX_TIMEOUTS_PER_TEST) {
throw new Error('Too many timeouts');
}
+ let startTime = Date.now();
+
+ if (
+ attempts > 0 &&
+ lastTestTimeMS < ADD_TIMEOUT_BETWEEN_TESTS_THRESHOLD_MS
+ ) {
+ await new Promise((resolve) =>
+ setTimeout(resolve, TIMEOUT_BETWEEN_TESTS_MS)
+ );
+ }
try {
console.info('---------------------------------------------------');
@@ -279,6 +302,7 @@ const runTest = async (testOptions) => {
fails++;
}
}
+ lastTestTimeMS = Date.now() - startTime;
}
const accuracy = (attempts - fails) / attempts;
@@ -289,6 +313,9 @@ const runTest = async (testOptions) => {
const fixtures = {};
async function setup() {
+ // p-queue is ESM package only.
+ PQueue = (await import('p-queue')).default;
+
cluster = await MongoCluster.start({
tmpDir: os.tmpdir(),
topology: 'standalone',
@@ -490,7 +517,6 @@ const tests = [
]),
},
];
-
async function main() {
try {
await setup();
@@ -498,26 +524,34 @@ async function main() {
let anyFailed = false;
- for (const test of tests) {
- const {
- accuracy,
- // usageStats
- } = await runTest(test);
- const minAccuracy = test.minAccuracy ?? DEFAULT_MIN_ACCURACY;
- const failed = accuracy < minAccuracy;
-
- table.push({
- Type: test.type.slice(0, 1).toUpperCase(),
- 'User Input': test.userInput.slice(0, 50),
- Namespace: `${test.databaseName}.${test.collectionName}`,
- Accuracy: accuracy,
- // 'Prompt Tokens': usageStats[0]?.promptTokens,
- // 'Completion Tokens': usageStats[0]?.completionTokens,
- Pass: failed ? '✗' : '✓',
- });
-
- anyFailed = anyFailed || failed;
- }
+ const testPromiseQueue = new PQueue({
+ concurrency: TESTS_TO_RUN_CONCURRENTLY,
+ });
+
+ tests.map((test) =>
+ testPromiseQueue.add(async () => {
+ const {
+ accuracy,
+ // usageStats
+ } = await runTest(test);
+ const minAccuracy = test.minAccuracy ?? DEFAULT_MIN_ACCURACY;
+ const failed = accuracy < minAccuracy;
+
+ table.push({
+ Type: test.type.slice(0, 1).toUpperCase(),
+ 'User Input': test.userInput.slice(0, 50),
+ Namespace: `${test.databaseName}.${test.collectionName}`,
+ Accuracy: accuracy,
+ // 'Prompt Tokens': usageStats[0]?.promptTokens,
+ // 'Completion Tokens': usageStats[0]?.completionTokens,
+ Pass: failed ? '✗' : '✓',
+ });
+
+ anyFailed = anyFailed || failed;
+ })
+ );
+
+ await testPromiseQueue.onIdle();
console.table(table, [
'Type',
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/NYC.parking_2015.json b/packages/compass-generative-ai/scripts/fixtures/NYC.parking_2015.json
similarity index 100%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/NYC.parking_2015.json
rename to packages/compass-generative-ai/scripts/fixtures/NYC.parking_2015.json
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/berlin.cocktailbars.json b/packages/compass-generative-ai/scripts/fixtures/berlin.cocktailbars.json
similarity index 100%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/berlin.cocktailbars.json
rename to packages/compass-generative-ai/scripts/fixtures/berlin.cocktailbars.json
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/delimiters.filter.json b/packages/compass-generative-ai/scripts/fixtures/delimiters.filter.json
similarity index 100%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/delimiters.filter.json
rename to packages/compass-generative-ai/scripts/fixtures/delimiters.filter.json
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/netflix.movies.json b/packages/compass-generative-ai/scripts/fixtures/netflix.movies.json
similarity index 100%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/netflix.movies.json
rename to packages/compass-generative-ai/scripts/fixtures/netflix.movies.json
diff --git a/packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/sample_airbnb.listingsAndReviews.json b/packages/compass-generative-ai/scripts/fixtures/sample_airbnb.listingsAndReviews.json
similarity index 100%
rename from packages/compass-generative-ai/scripts/ai-accuracy-tests/fixtures/sample_airbnb.listingsAndReviews.json
rename to packages/compass-generative-ai/scripts/fixtures/sample_airbnb.listingsAndReviews.json
diff --git a/packages/compass-generative-ai/src/components/ai-experience-entry.tsx b/packages/compass-generative-ai/src/components/ai-experience-entry.tsx
index d3e5a938ee7..defa5ddb616 100644
--- a/packages/compass-generative-ai/src/components/ai-experience-entry.tsx
+++ b/packages/compass-generative-ai/src/components/ai-experience-entry.tsx
@@ -96,6 +96,7 @@ function AIExperienceEntry({
)}
onClick={onClick}
data-testid={dataTestId}
+ type="button"
>
Generate {type}
@@ -121,6 +122,7 @@ function createAIPlaceholderHTMLPlaceholder({
const aiButtonEl = document.createElement('button');
aiButtonEl.setAttribute('data-testid', 'open-ai-query-entry-button');
+ aiButtonEl.setAttribute('type', 'button');
// By default placeholder container will have pointer events disabled
aiButtonEl.style.pointerEvents = 'auto';
// We stop mousedown from propagating and preventing default behavior to avoid
diff --git a/packages/compass-home/package.json b/packages/compass-home/package.json
index 6d7980563cf..ff97da6cfeb 100644
--- a/packages/compass-home/package.json
+++ b/packages/compass-home/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-home",
"productName": "Home plugin",
- "version": "6.16.1",
+ "version": "6.17.0",
"apiVersion": "3.0.0",
"description": "Home",
"main": "dist/index.js",
@@ -34,35 +34,35 @@
},
"license": "SSPL",
"dependencies": {
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-connections": "^1.16.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-welcome": "^0.14.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "compass-preferences-model": "^2.15.1",
- "hadron-app-registry": "^9.0.11",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-connections": "^1.17.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-welcome": "^0.15.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2"
},
"peerDependencies": {
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-connections": "^1.16.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-welcome": "^0.14.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "compass-preferences-model": "^2.15.1",
- "hadron-app-registry": "^9.0.11",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-connections": "^1.17.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-welcome": "^0.15.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"react": "^17.0.2"
},
"devDependencies": {
"@electron/remote": "^2.0.11",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@types/chai": "^4.2.21",
"chai": "^4.1.2",
@@ -71,8 +71,8 @@
"eslint": "^7.25.0",
"eventemitter3": "^4.0.0",
"mocha": "^10.2.0",
- "mongodb-collection-model": "^5.12.1",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-collection-model": "^5.12.2",
+ "mongodb-data-service": "^22.12.2",
"mongodb-ns": "^2.4.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
diff --git a/packages/compass-import-export/package.json b/packages/compass-import-export/package.json
index 7dbf2fb202a..ebe44871421 100644
--- a/packages/compass-import-export/package.json
+++ b/packages/compass-import-export/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "7.15.1",
+ "version": "7.16.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -55,32 +55,32 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1"
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2"
},
"devDependencies": {
"@electron/remote": "^2.0.11",
- "@mongodb-js/compass-test-server": "^0.1.3",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-test-server": "^0.1.4",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -99,11 +99,11 @@
"depcheck": "^1.4.1",
"electron": "^25.8.4",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"mongodb-ns": "^2.4.0",
"mongodb-query-parser": "^3.1.3",
"mongodb-schema": "^11.2.1",
diff --git a/packages/compass-indexes/package.json b/packages/compass-indexes/package.json
index 6f8d2f18aa0..0ef8a095e71 100644
--- a/packages/compass-indexes/package.json
+++ b/packages/compass-indexes/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-indexes",
"productName": "Compass Indexes plugin",
"description": "Collection index management for Compass",
- "version": "5.15.1",
+ "version": "5.16.0",
"author": {
"name": "MongoDB Inc",
"email": "compass@mongodb.com"
@@ -56,21 +56,21 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"@mongodb-js/mongodb-constants": "^0.8.6",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"chai": "^4.2.0",
@@ -79,11 +79,11 @@
"electron": "^25.8.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"mongodb-query-parser": "^3.1.3",
"numeral": "^2.0.6",
"nyc": "^15.1.0",
@@ -98,12 +98,12 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"@mongodb-js/mongodb-constants": "^0.8.6",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1"
+ "compass-preferences-model": "^2.15.2"
}
}
diff --git a/packages/compass-instance/package.json b/packages/compass-instance/package.json
index 807f1f93f1e..8687ba49708 100644
--- a/packages/compass-instance/package.json
+++ b/packages/compass-instance/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-instance",
"productName": "Instance plugin",
"description": "Compass instance plugin",
- "version": "4.15.1",
+ "version": "4.16.0",
"author": {
"name": "MongoDB Inc",
"email": "compass@mongodb.com"
@@ -56,17 +56,17 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
@@ -75,7 +75,7 @@
"chai": "^4.3.4",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"react": "^17.0.2",
@@ -85,8 +85,8 @@
"redux-thunk": "^2.4.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13"
}
}
diff --git a/packages/compass-logging/package.json b/packages/compass-logging/package.json
index 199fc007ced..1118b056057 100644
--- a/packages/compass-logging/package.json
+++ b/packages/compass-logging/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.2.2",
+ "version": "1.2.3",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -53,7 +53,7 @@
"mongodb-log-writer": "^1.3.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-maybe-protect-connection-string/package.json b/packages/compass-maybe-protect-connection-string/package.json
index 6bd42335282..58c659435b3 100644
--- a/packages/compass-maybe-protect-connection-string/package.json
+++ b/packages/compass-maybe-protect-connection-string/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.13.1",
+ "version": "0.13.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -51,11 +51,11 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"dependencies": {
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"mongodb-connection-string-url": "^2.6.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-preferences-model/package.json b/packages/compass-preferences-model/package.json
index 917b3e31d1a..0605c71cbe1 100644
--- a/packages/compass-preferences-model/package.json
+++ b/packages/compass-preferences-model/package.json
@@ -2,7 +2,7 @@
"name": "compass-preferences-model",
"description": "Compass preferences model",
"author": "Lucas Hrabovsky ",
- "version": "2.15.1",
+ "version": "2.15.2",
"bugs": {
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
"email": "compass@mongodb.com"
@@ -44,8 +44,8 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"dependencies": {
- "@mongodb-js/compass-user-data": "^0.1.4",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-user-data": "^0.1.5",
+ "@mongodb-js/compass-logging": "^1.2.3",
"ampersand-collection-filterable": "^0.3.0",
"ampersand-rest-collection": "^6.0.0",
"ampersand-state": "5.0.3",
@@ -55,8 +55,8 @@
"yargs-parser": "^21.1.1"
},
"devDependencies": {
- "@mongodb-js/compass-user-data": "^0.1.4",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-user-data": "^0.1.5",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@testing-library/react": "^12.1.4",
"@types/js-yaml": "^4.0.5",
diff --git a/packages/compass-preferences-model/src/feature-flags.ts b/packages/compass-preferences-model/src/feature-flags.ts
index 0ceb5352315..55bfb5aa895 100644
--- a/packages/compass-preferences-model/src/feature-flags.ts
+++ b/packages/compass-preferences-model/src/feature-flags.ts
@@ -22,6 +22,8 @@ export type FeatureFlags = {
newExplainPlan: boolean;
showInsights: boolean;
enableAtlasSearchIndexManagement: boolean;
+ enableBulkUpdateOperations: boolean;
+ enableBulkDeleteOperations: boolean;
};
export const featureFlags: Required<{
@@ -114,4 +116,26 @@ export const featureFlags: Required<{
long: 'Allows listing, creating, updating and deleting Atlas Search indexes.',
},
},
+ /**
+ * Feature flag bulk updates
+ * Epic: COMPASS-6671
+ */
+ enableBulkUpdateOperations: {
+ stage: 'development',
+ description: {
+ short: 'Enable bulk update operations.',
+ long: 'Allows editing all documents given a query.',
+ },
+ },
+ /**
+ * Feature flag for bulk deletes.
+ * Epic: COMPASS-6671
+ */
+ enableBulkDeleteOperations: {
+ stage: 'development',
+ description: {
+ short: 'Enable bulk delete operations.',
+ long: 'Allows deleting all documents given a query.',
+ },
+ },
};
diff --git a/packages/compass-query-bar/package.json b/packages/compass-query-bar/package.json
index e1e78a978ea..2281ebad9ea 100644
--- a/packages/compass-query-bar/package.json
+++ b/packages/compass-query-bar/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-query-bar",
"productName": "Query Bar plugin",
- "version": "8.15.1",
+ "version": "8.16.0",
"description": "Renders a component for executing MongoDB queries through a GUI",
"homepage": "https://github.com/mongodb-js/compass",
"license": "SSPL",
@@ -56,35 +56,35 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-generative-ai": "^0.1.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-user-data": "^0.1.4",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-generative-ai": "^0.2.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-user-data": "^0.1.5",
"@mongodb-js/mongodb-constants": "^0.8.6",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "mongodb-query-util": "^2.1.0",
+ "compass-preferences-model": "^2.15.2",
+ "mongodb-query-util": "^2.1.1",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"chai": "^4.2.0",
"depcheck": "^1.4.1",
"electron": "^25.8.4",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"mongodb-ns": "^2.4.0",
"mongodb-query-parser": "^3.1.3",
"mongodb-schema": "^11.2.1",
@@ -98,15 +98,15 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-generative-ai": "^0.1.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-user-data": "^0.1.4",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-generative-ai": "^0.2.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-user-data": "^0.1.5",
"@mongodb-js/mongodb-constants": "^0.8.6",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "mongodb-query-util": "^2.1.0"
+ "compass-preferences-model": "^2.15.2",
+ "mongodb-query-util": "^2.1.1"
}
}
diff --git a/packages/compass-saved-aggregations-queries/package.json b/packages/compass-saved-aggregations-queries/package.json
index bdf358183e0..fdb65b822f3 100644
--- a/packages/compass-saved-aggregations-queries/package.json
+++ b/packages/compass-saved-aggregations-queries/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.16.1",
+ "version": "1.17.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -55,26 +55,26 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-aggregations": "^9.16.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-query-bar": "^8.15.1",
+ "@mongodb-js/compass-aggregations": "^9.17.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-query-bar": "^8.16.0",
"bson": "^6.0.0",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-aggregations": "^9.16.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-query-bar": "^8.15.1",
+ "@mongodb-js/compass-aggregations": "^9.17.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-query-bar": "^8.16.0",
"bson": "^6.0.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^13.5.0",
@@ -88,10 +88,10 @@
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"fuse.js": "^6.5.3",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
"mongodb-ns": "^2.4.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
diff --git a/packages/compass-schema-validation/package.json b/packages/compass-schema-validation/package.json
index 860fe568239..7e54fa56c39 100644
--- a/packages/compass-schema-validation/package.json
+++ b/packages/compass-schema-validation/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-schema-validation",
"productName": "Compass Json Schema Validation plugin",
- "version": "6.15.1",
+ "version": "6.16.0",
"description": "Compass plugin for document JSON schema validation",
"author": {
"name": "MongoDB Inc",
@@ -56,35 +56,35 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-crud": "^13.15.1",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-crud": "^13.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"chai": "^4.2.0",
"depcheck": "^1.4.1",
"electron": "^25.8.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"javascript-stringify": "^2.0.1",
"less": "^3.11.1",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
"mongodb-ns": "^2.4.0",
"mongodb-query-parser": "^3.1.3",
"nyc": "^15.1.0",
@@ -97,12 +97,12 @@
"sinon": "^8.1.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-crud": "^13.15.1",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-crud": "^13.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1"
+ "compass-preferences-model": "^2.15.2"
}
}
diff --git a/packages/compass-schema/package.json b/packages/compass-schema/package.json
index 62a37548d15..c7e92eca524 100644
--- a/packages/compass-schema/package.json
+++ b/packages/compass-schema/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-schema",
"productName": "Compass Schema plugin",
"description": "Compass Schema Tab Plugin",
- "version": "6.16.1",
+ "version": "6.17.0",
"author": {
"name": "MongoDB Inc",
"email": "compass@mongodb.com"
@@ -56,21 +56,21 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2",
"hadron-ipc": "^3.2.2",
- "mongodb-query-util": "^2.1.0",
+ "mongodb-query-util": "^2.1.1",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -81,7 +81,7 @@
"d3": "^3.5.17",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"leaflet": "^1.5.1",
"leaflet-defaulticon-compatibility": "^0.1.1",
"leaflet-draw": "^1.0.4",
@@ -89,7 +89,7 @@
"mocha": "^10.2.0",
"moment": "^2.29.4",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"mongodb-ns": "^2.4.0",
"mongodb-schema": "^11.2.1",
"numeral": "^1.5.6",
@@ -105,12 +105,12 @@
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"bson": "^6.0.0",
- "compass-preferences-model": "^2.15.1",
- "hadron-document": "^8.4.1",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-document": "^8.4.2",
"hadron-ipc": "^3.2.2",
- "mongodb-query-util": "^2.1.0"
+ "mongodb-query-util": "^2.1.1"
}
}
diff --git a/packages/compass-serverstats/package.json b/packages/compass-serverstats/package.json
index 5767ecb52df..cdbcc23bb93 100644
--- a/packages/compass-serverstats/package.json
+++ b/packages/compass-serverstats/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-serverstats",
"productName": "Compass Server Stats plugin",
- "version": "16.15.1",
+ "version": "16.16.0",
"apiVersion": "3.0.0",
"description": "Compass Real Time",
"main": "dist/index.js",
@@ -33,20 +33,20 @@
},
"license": "SSPL",
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@types/d3": "^3.5.x",
"@types/enzyme": "^3.10.14",
"chai": "^4.1.2",
@@ -57,11 +57,11 @@
"electron-mocha": "^10.1.0",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"mongodb-js-errors": "^0.3.2",
"mongodb-ns": "^2.4.0",
"prop-types": "^15.7.2",
diff --git a/packages/compass-settings/package.json b/packages/compass-settings/package.json
index 72191a0700d..ae649c6ae81 100644
--- a/packages/compass-settings/package.json
+++ b/packages/compass-settings/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.17.1",
+ "version": "0.18.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -59,11 +59,11 @@
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "compass-preferences-model": "^2.15.1",
- "hadron-app-registry": "^9.0.11",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "compass-preferences-model": "^2.15.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"react-dom": "^17.0.2",
"react-redux": "^8.0.5",
@@ -71,11 +71,11 @@
"redux-thunk": "^2.4.1"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
diff --git a/packages/compass-shell/package.json b/packages/compass-shell/package.json
index 413605d3e09..25ed9c44872 100644
--- a/packages/compass-shell/package.json
+++ b/packages/compass-shell/package.json
@@ -1,7 +1,7 @@
{
"name": "@mongodb-js/compass-shell",
"productName": "Compass Shell plugin",
- "version": "3.15.1",
+ "version": "3.16.0",
"description": "Compass Shell Plugin",
"author": {
"name": "MongoDB Inc",
@@ -54,38 +54,38 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"dependencies": {
- "@mongodb-js/compass-user-data": "^0.1.4",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "@mongosh/node-runtime-worker-thread": "^2.0.0",
- "compass-preferences-model": "^2.15.1"
+ "@mongodb-js/compass-user-data": "^0.1.5",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "@mongosh/node-runtime-worker-thread": "^2.0.2",
+ "compass-preferences-model": "^2.15.2"
},
"peerDependencies": {
- "@mongodb-js/compass-user-data": "^0.1.4",
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "@mongosh/node-runtime-worker-thread": "^2.0.0",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-user-data": "^0.1.5",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "@mongosh/node-runtime-worker-thread": "^2.0.2",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
- "@mongosh/browser-repl": "^2.0.0",
- "@mongosh/logging": "^2.0.0",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
+ "@mongosh/browser-repl": "^2.0.2",
+ "@mongosh/logging": "^2.0.2",
"chai": "^4.2.0",
"depcheck": "^1.4.1",
"electron": "^25.8.4",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
diff --git a/packages/compass-sidebar/package.json b/packages/compass-sidebar/package.json
index 9a643cfbfb5..89fbecccd41 100644
--- a/packages/compass-sidebar/package.json
+++ b/packages/compass-sidebar/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "5.15.1",
+ "version": "5.16.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -57,34 +57,34 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-databases-navigation": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.1",
- "@mongodb-js/connection-form": "^1.15.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "compass-preferences-model": "^2.15.1",
- "mongodb-instance-model": "^12.12.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-databases-navigation": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.2",
+ "@mongodb-js/connection-form": "^1.16.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "compass-preferences-model": "^2.15.2",
+ "mongodb-instance-model": "^12.12.2",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-databases-navigation": "^1.15.0",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.1",
- "@mongodb-js/connection-form": "^1.15.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "@mongodb-js/mongodb-redux-common": "^2.0.12",
- "compass-preferences-model": "^2.15.1",
- "mongodb-instance-model": "^12.12.1"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-databases-navigation": "^1.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-maybe-protect-connection-string": "^0.13.2",
+ "@mongodb-js/connection-form": "^1.16.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "@mongodb-js/mongodb-redux-common": "^2.0.13",
+ "compass-preferences-model": "^2.15.2",
+ "mongodb-instance-model": "^12.12.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
@@ -97,8 +97,8 @@
"debug": "^4.2.0",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb-ns": "^2.4.0",
diff --git a/packages/compass-test-server/package.json b/packages/compass-test-server/package.json
index 9da5be08973..e5ca308db69 100644
--- a/packages/compass-test-server/package.json
+++ b/packages/compass-test-server/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.1.3",
+ "version": "0.1.4",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -53,7 +53,7 @@
"mongodb-runner": "^5.3.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-user-data/package.json b/packages/compass-user-data/package.json
index 0149ebfcbac..2e05f4d9006 100644
--- a/packages/compass-user-data/package.json
+++ b/packages/compass-user-data/package.json
@@ -12,7 +12,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.1.4",
+ "version": "0.1.5",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -49,9 +49,9 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-user-data/src/index.ts b/packages/compass-user-data/src/index.ts
index 1032f945068..66c9ed6b5a0 100644
--- a/packages/compass-user-data/src/index.ts
+++ b/packages/compass-user-data/src/index.ts
@@ -1,2 +1,7 @@
-export { UserData } from './user-data';
+export {
+ UserData,
+ Stats,
+ ReadAllResult,
+ ReadAllWithStatsResult,
+} from './user-data';
export { z } from 'zod';
diff --git a/packages/compass-user-data/src/user-data.spec.ts b/packages/compass-user-data/src/user-data.spec.ts
index bb1df29e434..e1f2ead78cb 100644
--- a/packages/compass-user-data/src/user-data.spec.ts
+++ b/packages/compass-user-data/src/user-data.spec.ts
@@ -207,6 +207,7 @@ describe('user-data', function () {
await storage.readOne('something.json', {
ignoreErrors: false,
});
+ expect.fail('missed exception');
} catch (e) {
expect((e as any).code).to.equal('ENOENT');
}
@@ -228,8 +229,11 @@ describe('user-data', function () {
await storage.readOne('data', {
ignoreErrors: false,
});
+ expect.fail('missed exception');
} catch (e) {
- expect((e as Error).message).to.contain('Unexpected token');
+ expect((e as Error).message).to.match(
+ /Unexpected token|Expected property name or/
+ ); // Node.js 18 vs 20
}
});
@@ -246,6 +250,7 @@ describe('user-data', function () {
await getUserData().readOne('data', {
ignoreErrors: false,
});
+ expect.fail('missed exception');
} catch (e) {
const errors = (e as ZodError).errors;
expect(errors[0].message).to.contain(
@@ -363,6 +368,7 @@ describe('user-data', function () {
try {
await fs.access(absolutePath);
+ expect.fail('missed exception');
} catch (error) {
expect((error as any).code).to.equal('ENOENT');
}
diff --git a/packages/compass-user-data/src/user-data.ts b/packages/compass-user-data/src/user-data.ts
index d2a18f218ff..e58359467b9 100644
--- a/packages/compass-user-data/src/user-data.ts
+++ b/packages/compass-user-data/src/user-data.ts
@@ -1,5 +1,4 @@
import { promises as fs } from 'fs';
-import type { Stats } from 'fs';
import path from 'path';
import { createLoggerAndTelemetry } from '@mongodb-js/compass-logging';
import { getStoragePath } from '@mongodb-js/compass-utils';
@@ -24,6 +23,45 @@ type ReadOptions = {
ignoreErrors: boolean;
};
+// Copied from the Node.js fs module.
+export interface Stats {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: number;
+ ino: number;
+ mode: number;
+ nlink: number;
+ uid: number;
+ gid: number;
+ rdev: number;
+ size: number;
+ blksize: number;
+ blocks: number;
+ atimeMs: number;
+ mtimeMs: number;
+ ctimeMs: number;
+ birthtimeMs: number;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+}
+
+export interface ReadAllResult {
+ data: z.output[];
+ errors: Error[];
+}
+
+export interface ReadAllWithStatsResult {
+ data: [z.output, Stats][];
+ errors: Error[];
+}
+
export class UserData {
private readonly subdir: string;
private readonly basePath?: string;
@@ -77,10 +115,19 @@ export class UserData {
return path.resolve(root, pathRelativeToRoot);
}
- private async readAndParseFile(absolutePath: string, options: ReadOptions) {
+ private async readAndParseFileWithStats(
+ absolutePath: string,
+ options: ReadOptions
+ ): Promise<[z.output, Stats] | undefined> {
let data: string;
+ let stats: Stats;
+ let handle: fs.FileHandle | undefined = undefined;
try {
- data = await fs.readFile(absolutePath, 'utf-8');
+ handle = await fs.open(absolutePath, 'r');
+ [stats, data] = await Promise.all([
+ handle.stat(),
+ handle.readFile('utf-8'),
+ ]);
} catch (error) {
log.error(mongoLogId(1_001_000_234), 'Filesystem', 'Error reading file', {
path: absolutePath,
@@ -90,11 +137,13 @@ export class UserData {
return undefined;
}
throw error;
+ } finally {
+ await handle?.close();
}
try {
const content = this.deserialize(data);
- return this.validator.parse(content);
+ return [this.validator.parse(content), stats];
} catch (error) {
log.error(mongoLogId(1_001_000_235), 'Filesystem', 'Error parsing data', {
path: absolutePath,
@@ -107,62 +156,6 @@ export class UserData {
}
}
- async readAll(
- options: ReadOptions = {
- ignoreErrors: true,
- }
- ) {
- const absolutePath = await this.getFileAbsolutePath();
- const filePathList = await fs.readdir(absolutePath);
- const data = await Promise.allSettled(
- filePathList.map((x) =>
- this.readAndParseFile(path.join(absolutePath, x), options)
- )
- );
-
- const result: {
- data: z.output[];
- errors: Error[];
- } = {
- data: [],
- errors: [],
- };
-
- for (const item of data) {
- if (item.status === 'fulfilled' && item.value) {
- result.data.push(item.value);
- }
- if (item.status === 'rejected') {
- result.errors.push(item.reason);
- }
- }
-
- return result;
- }
-
- async readOne(
- id: string,
- options?: { ignoreErrors: false }
- ): Promise>;
- async readOne(
- id: string,
- options?: { ignoreErrors: true }
- ): Promise | undefined>;
- async readOne(
- id: string,
- options?: ReadOptions
- ): Promise | undefined>;
- async readOne(
- id: string,
- options: ReadOptions = {
- ignoreErrors: true,
- }
- ) {
- const filepath = this.getFileName(id);
- const absolutePath = await this.getFileAbsolutePath(filepath);
- return await this.readAndParseFile(absolutePath, options);
- }
-
async write(id: string, content: z.input) {
// Validate the input. Here we are not saving the parsed content
// because after reading we validate the data again and it parses
@@ -206,41 +199,11 @@ export class UserData {
}
}
- private async readAndParseFileWithStats(
- filepath: string,
- options: ReadOptions
- ): Promise<[z.output, Stats] | undefined> {
- const data = await this.readAndParseFile(filepath, options);
-
- if (data === undefined) {
- return undefined;
- }
-
- try {
- const stats = await fs.stat(filepath);
- return [data, stats];
- } catch (error) {
- log.error(
- mongoLogId(1_001_000_243),
- 'Filesystem',
- 'Error reading stats',
- {
- path: filepath,
- error: (error as Error).message,
- }
- );
- if (options.ignoreErrors) {
- return undefined;
- }
- throw error;
- }
- }
-
async readAllWithStats(
options: ReadOptions = {
ignoreErrors: true,
}
- ) {
+ ): Promise> {
const absolutePath = await this.getFileAbsolutePath();
const filePathList = await fs.readdir(absolutePath);
@@ -250,10 +213,7 @@ export class UserData {
)
);
- const result: {
- data: [z.output, Stats][];
- errors: Error[];
- } = {
+ const result: ReadAllWithStatsResult = {
data: [],
errors: [],
};
@@ -292,4 +252,37 @@ export class UserData {
const absolutePath = await this.getFileAbsolutePath(filepath);
return await this.readAndParseFileWithStats(absolutePath, options);
}
+
+ async readAll(
+ options: ReadOptions = {
+ ignoreErrors: true,
+ }
+ ): Promise> {
+ const result = await this.readAllWithStats(options);
+ return {
+ data: result.data.map(([data]) => data),
+ errors: result.errors,
+ };
+ }
+
+ async readOne(
+ id: string,
+ options?: { ignoreErrors: false }
+ ): Promise>;
+ async readOne(
+ id: string,
+ options?: { ignoreErrors: true }
+ ): Promise | undefined>;
+ async readOne(
+ id: string,
+ options?: ReadOptions
+ ): Promise | undefined>;
+ async readOne(
+ id: string,
+ options: ReadOptions = {
+ ignoreErrors: true,
+ }
+ ) {
+ return (await this.readOneWithStats(id, options))?.[0];
+ }
}
diff --git a/packages/compass-utils/package.json b/packages/compass-utils/package.json
index 4a63de98008..0009c85e236 100644
--- a/packages/compass-utils/package.json
+++ b/packages/compass-utils/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.5.1",
+ "version": "0.5.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -55,7 +55,7 @@
"electron": "^25.8.4"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/compass-welcome/package.json b/packages/compass-welcome/package.json
index eedbc45f164..ae28bef5bc1 100644
--- a/packages/compass-welcome/package.json
+++ b/packages/compass-welcome/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.14.1",
+ "version": "0.15.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -57,20 +57,20 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "compass-preferences-model": "^2.15.2",
"react": "*"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "compass-preferences-model": "^2.15.1"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "compass-preferences-model": "^2.15.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/chai": "^4.2.21",
diff --git a/packages/compass/package.json b/packages/compass/package.json
index cdf6d62840c..c3eb304fd3a 100644
--- a/packages/compass/package.json
+++ b/packages/compass/package.json
@@ -167,7 +167,7 @@
"email": "compass@mongodb.com"
},
"dependencies": {
- "@mongosh/node-runtime-worker-thread": "^2.0.0",
+ "@mongosh/node-runtime-worker-thread": "^2.0.2",
"clipboard": "^2.0.6",
"kerberos": "^2.0.1",
"keytar": "^7.9.0",
@@ -178,40 +178,40 @@
"devDependencies": {
"@electron/rebuild": "^3.3.0",
"@electron/remote": "^2.0.11",
- "@mongodb-js/atlas-service": "^0.6.1",
- "@mongodb-js/compass-aggregations": "^9.16.1",
- "@mongodb-js/compass-app-stores": "^7.3.1",
- "@mongodb-js/compass-collection": "^4.15.1",
- "@mongodb-js/compass-crud": "^13.15.1",
- "@mongodb-js/compass-database": "^3.15.1",
- "@mongodb-js/compass-databases-collections": "^1.15.1",
- "@mongodb-js/compass-explain-plan": "^6.15.1",
- "@mongodb-js/compass-export-to-language": "^8.16.0",
- "@mongodb-js/compass-field-store": "^9.0.4",
- "@mongodb-js/compass-find-in-page": "^4.15.1",
- "@mongodb-js/compass-home": "^6.16.1",
- "@mongodb-js/compass-import-export": "^7.15.1",
- "@mongodb-js/compass-indexes": "^5.15.1",
- "@mongodb-js/compass-instance": "^4.15.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-query-bar": "^8.15.1",
- "@mongodb-js/compass-saved-aggregations-queries": "^1.16.1",
- "@mongodb-js/compass-schema": "^6.16.1",
- "@mongodb-js/compass-schema-validation": "^6.15.1",
- "@mongodb-js/compass-serverstats": "^16.15.1",
- "@mongodb-js/compass-settings": "^0.17.1",
- "@mongodb-js/compass-shell": "^3.15.1",
- "@mongodb-js/compass-sidebar": "^5.15.1",
- "@mongodb-js/connection-storage": "^0.6.1",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/atlas-service": "^0.7.0",
+ "@mongodb-js/compass-aggregations": "^9.17.0",
+ "@mongodb-js/compass-app-stores": "^7.3.2",
+ "@mongodb-js/compass-collection": "^4.16.0",
+ "@mongodb-js/compass-crud": "^13.16.0",
+ "@mongodb-js/compass-database": "^3.16.0",
+ "@mongodb-js/compass-databases-collections": "^1.16.0",
+ "@mongodb-js/compass-explain-plan": "^6.16.0",
+ "@mongodb-js/compass-export-to-language": "^8.17.0",
+ "@mongodb-js/compass-field-store": "^9.0.5",
+ "@mongodb-js/compass-find-in-page": "^4.16.0",
+ "@mongodb-js/compass-home": "^6.17.0",
+ "@mongodb-js/compass-import-export": "^7.16.0",
+ "@mongodb-js/compass-indexes": "^5.16.0",
+ "@mongodb-js/compass-instance": "^4.16.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-query-bar": "^8.16.0",
+ "@mongodb-js/compass-saved-aggregations-queries": "^1.17.0",
+ "@mongodb-js/compass-schema": "^6.17.0",
+ "@mongodb-js/compass-schema-validation": "^6.16.0",
+ "@mongodb-js/compass-serverstats": "^16.16.0",
+ "@mongodb-js/compass-settings": "^0.18.0",
+ "@mongodb-js/compass-shell": "^3.16.0",
+ "@mongodb-js/compass-sidebar": "^5.16.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/get-os-info": "^0.3.13",
- "@mongodb-js/hadron-plugin-manager": "^7.0.13",
+ "@mongodb-js/hadron-plugin-manager": "^7.0.14",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/mongodb-downloader": "^0.2.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/sbom-tools": "^0.5.3",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@types/analytics-node": "^3.1.11",
"ampersand-view": "^9.0.0",
"analytics-node": "^6.2.0",
@@ -220,7 +220,7 @@
"chai": "^4.3.4",
"chalk": "^4.1.2",
"clean-stack": "^2.0.0",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"darkreader": "^4.9.40",
"debug": "^4.2.0",
"depcheck": "^1.4.1",
@@ -231,8 +231,8 @@
"electron-squirrel-startup": "^1.0.0",
"ensure-error": "^3.0.1",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-build": "^25.4.2",
"hadron-ipc": "^3.2.2",
"local-links": "^1.4.0",
@@ -240,8 +240,8 @@
"make-fetch-happen": "^8.0.14",
"marky": "^1.2.1",
"mongodb-connection-string-url": "^2.6.0",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
"mongodb-log-writer": "^1.3.0",
"node-fetch": "^2.6.7",
"react": "^17.0.2",
diff --git a/packages/connection-form/package.json b/packages/connection-form/package.json
index 852ddc544d4..2bad4a32d41 100644
--- a/packages/connection-form/package.json
+++ b/packages/connection-form/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.15.1",
+ "version": "1.16.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -47,23 +47,23 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/connection-storage": "^0.6.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/connection-storage": "^0.6.2",
"@testing-library/react-hooks": "^7.0.2",
- "compass-preferences-model": "^2.15.1",
+ "compass-preferences-model": "^2.15.2",
"lodash": "^4.17.21",
"mongodb-build-info": "^1.7.0",
"mongodb-connection-string-url": "^2.6.0",
"mongodb-query-parser": "^3.1.3"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -81,7 +81,7 @@
"eslint": "^7.25.0",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"react": "^17.0.2",
diff --git a/packages/connection-storage/package.json b/packages/connection-storage/package.json
index f8b789c9765..88f6793dd2e 100644
--- a/packages/connection-storage/package.json
+++ b/packages/connection-storage/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.6.1",
+ "version": "0.6.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -52,16 +52,16 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"dependencies": {
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-user-data": "^0.1.4",
- "@mongodb-js/compass-utils": "^0.5.1",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-user-data": "^0.1.5",
+ "@mongodb-js/compass-utils": "^0.5.2",
"bson": "^6.0.0",
"keytar": "^7.9.0",
"lodash": "^4.17.21",
"mongodb-connection-string-url": "^2.6.0"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -74,7 +74,7 @@
"eslint": "^7.25.0",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"sinon": "^9.2.3",
diff --git a/packages/data-service/package.json b/packages/data-service/package.json
index f44a8018e91..d8244364c46 100644
--- a/packages/data-service/package.json
+++ b/packages/data-service/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "22.12.1",
+ "version": "22.12.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -51,11 +51,11 @@
"mongodb": "^6.0.0"
},
"dependencies": {
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/compass-utils": "^0.5.1",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/compass-utils": "^0.5.2",
"@mongodb-js/devtools-connect": "^2.4.2",
"@mongodb-js/oidc-plugin": "^0.3.0",
- "@mongodb-js/ssh-tunnel": "^2.1.0",
+ "@mongodb-js/ssh-tunnel": "^2.1.1",
"lodash": "^4.17.21",
"mongodb-build-info": "^1.7.0",
"mongodb-connection-string-url": "^2.6.0",
@@ -64,9 +64,9 @@
"uuid": "^8.3.2"
},
"devDependencies": {
- "@mongodb-js/compass-test-server": "^0.1.3",
+ "@mongodb-js/compass-test-server": "^0.1.4",
"@mongodb-js/devtools-docker-test-envs": "^1.2.5",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/data-service/src/data-service.spec.ts b/packages/data-service/src/data-service.spec.ts
index a2ebf40947f..11da7476e0b 100644
--- a/packages/data-service/src/data-service.spec.ts
+++ b/packages/data-service/src/data-service.spec.ts
@@ -21,6 +21,7 @@ import { createClonedClient } from './connect-mongo-client';
import { runCommand } from './run-command';
import { mochaTestServer } from '@mongodb-js/compass-test-server';
import type { SearchIndex } from './search-index-detail-helper';
+import { range } from 'lodash';
const { expect } = chai;
chai.use(chaiAsPromised);
@@ -1181,6 +1182,226 @@ describe('DataService', function () {
);
});
});
+
+ describe('#previewUpdate', function () {
+ const namespace = 'test.previewUpdate';
+ const sampleDocument = { _id: new ObjectId(), foo: 'bar' };
+ const replsetCluster = mochaTestServer({
+ topology: 'replset',
+ secondaries: 0,
+ });
+ let replDataService: DataService;
+
+ before(async function () {
+ const replSetOptions = {
+ connectionString: replsetCluster().connectionString,
+ };
+
+ replDataService = new DataServiceImpl(replSetOptions);
+ await replDataService.connect();
+ await replDataService.createIndex(
+ namespace,
+ { foo: 1 },
+ { unique: true }
+ );
+ await replDataService.insertOne(namespace, sampleDocument);
+
+ const dummyDocs = range(1, 100).map((idx) => ({
+ _id: { 'foo.bar': idx },
+ foo: `bar${idx}`,
+ }));
+ await replDataService.insertMany(namespace, dummyDocs);
+ });
+
+ after(async function () {
+ // eslint-disable-next-line no-console
+ await replDataService.disconnect().catch(console.log);
+ });
+
+ it('should return the preview of a changed document', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ const changeset = await replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'bar',
+ },
+ {
+ $set: {
+ foo: 'baz',
+ },
+ }
+ );
+
+ expect(changeset.changes).to.have.length(1);
+ expect(changeset.changes[0].before).to.deep.equal(sampleDocument);
+ expect(changeset.changes[0].after).to.deep.equal({
+ ...sampleDocument,
+ foo: 'baz',
+ });
+ });
+
+ it('supports expressive updates', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ const changeset = await replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'bar',
+ },
+ [
+ {
+ $set: {
+ counter: 1,
+ },
+ },
+ {
+ $unset: ['foo'],
+ },
+ ]
+ );
+
+ expect(changeset.changes).to.have.length(1);
+ expect(changeset.changes[0].before).to.deep.equal(sampleDocument);
+ expect(changeset.changes[0].after).to.deep.equal({
+ _id: sampleDocument._id,
+ counter: 1,
+ });
+ });
+
+ it('should not modify the underlying document', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ await replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'bar',
+ },
+ {
+ $set: {
+ foo: 'baz',
+ },
+ }
+ );
+
+ const [document] = await replDataService.find(namespace, {
+ _id: sampleDocument._id,
+ });
+ expect(document).to.deep.equal(sampleDocument);
+ });
+
+ it('should fail when aborted by the controller', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ const controller = new AbortController();
+ controller.abort();
+
+ await expect(
+ replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'bar',
+ },
+ {
+ $set: {
+ foo: 'baz',
+ },
+ },
+ {
+ abortSignal: controller.signal as unknown as AbortSignal,
+ sample: 10,
+ timeout: 1000,
+ }
+ )
+ ).to.eventually.be.rejectedWith(/This operation was aborted/);
+ });
+
+ it('should be limited to 10 documents even if more documents match', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ const changeset = await replDataService.previewUpdate(
+ namespace,
+ {}, // update all documents
+ {
+ $set: {
+ count: 1,
+ },
+ }
+ );
+
+ expect(changeset.changes.length).to.equal(10);
+ });
+
+ it('should fail when the update breaks a unique index constraint', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ await expect(
+ replDataService.previewUpdate(
+ namespace,
+ {}, // update all documents
+ {
+ $set: {
+ foo: 'baz', // to have the same value on a unique indexed field
+ },
+ }
+ )
+ ).to.be.eventually.rejectedWith(/E11000 duplicate key error/);
+ });
+
+ it('should not insert any new document', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ await replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'bar',
+ },
+ {
+ $set: {
+ foo: 'baz',
+ },
+ }
+ );
+
+ const count = await replDataService.count(namespace, {});
+ expect(count).to.equal(100); // 99 dummy documents + 1 testing doc
+ });
+
+ it('should not insert any new document if there is no match', async function () {
+ if (replDataService.getCurrentTopologyType() === 'Single') {
+ return this.skip(); // Transactions only work in replicasets or sharded clusters
+ }
+
+ await replDataService.previewUpdate(
+ namespace,
+ {
+ foo: 'whatever',
+ },
+ {
+ $set: {
+ foo: 'baz',
+ },
+ }
+ );
+
+ const count = await replDataService.count(namespace, {});
+ expect(count).to.equal(100);
+ });
+ });
});
context('with mocked client', function () {
diff --git a/packages/data-service/src/data-service.ts b/packages/data-service/src/data-service.ts
index 6722b3e8df5..41d25329265 100644
--- a/packages/data-service/src/data-service.ts
+++ b/packages/data-service/src/data-service.ts
@@ -137,6 +137,20 @@ export interface DataServiceEventMap {
connectionInfoSecretsChanged: () => void;
}
+export type UpdatePreviewChange = {
+ before: Document;
+ after: Document;
+};
+
+export type UpdatePreviewExecutionOptions = ExecutionOptions & {
+ sample?: number;
+ timeout?: number;
+};
+
+export type UpdatePreview = {
+ changes: UpdatePreviewChange[];
+};
+
export interface DataService {
// TypeScript uses something like this itself for its EventTarget definitions.
on(
@@ -727,6 +741,18 @@ export interface DataService {
* is being emitted when this value changes.
*/
getUpdatedSecrets(): Promise>;
+
+ /**
+ * Runs the update within a transactions, only
+ * modifying a subset of the documents matched by the filter.
+ * It returns a list of the changed documents, or a serverError.
+ */
+ previewUpdate(
+ ns: string,
+ filter: Document,
+ update: Document | Document[],
+ executionOptions?: UpdatePreviewExecutionOptions
+ ): Promise;
}
const maybePickNs = ([ns]: unknown[]) => {
@@ -2285,6 +2311,70 @@ class DataServiceImpl extends WithLogContext implements DataService {
return { name, ...normalized };
}
+ @op(mongoLogId(1_001_000_266))
+ async previewUpdate(
+ ns: string,
+ filter: Document,
+ update: Document | Document[],
+ executionOptions: UpdatePreviewExecutionOptions = {}
+ ): Promise {
+ const {
+ abortSignal = new AbortController().signal,
+ sample = 10,
+ timeout = 1000,
+ } = executionOptions;
+ const startTimeMS = Date.now();
+ const remainingTimeoutMS = () =>
+ Math.max(1, timeout - (Date.now() - startTimeMS));
+ return await this._cancellableOperation(
+ async (session) => {
+ if (!session) {
+ throw new Error('Could not open session.');
+ }
+
+ try {
+ const coll = this._collection(ns, 'CRUD');
+ session.startTransaction({
+ maxTimeMS: remainingTimeoutMS(),
+ });
+
+ const docsToPreview = await coll
+ .find(filter, { session, maxTimeMS: remainingTimeoutMS() })
+ .sort({ _id: 1 })
+ .limit(sample)
+ .toArray();
+
+ const idsToPreview = docsToPreview.map((doc) => doc._id);
+ await coll.updateMany({ _id: { $in: idsToPreview } }, update, {
+ session,
+ maxTimeMS: remainingTimeoutMS(),
+ });
+ const changedDocs = await coll
+ .find(
+ { _id: { $in: idsToPreview } },
+ { session, maxTimeMS: remainingTimeoutMS() }
+ )
+ .sort({ _id: 1 })
+ .toArray();
+
+ const changes = docsToPreview.map((before, idx) => ({
+ before,
+ after: changedDocs[idx],
+ }));
+ return { changes };
+ } finally {
+ await session.abortTransaction();
+ await session.endSession();
+ }
+ },
+ async (session) => {
+ await session.abortTransaction();
+ await session.endSession();
+ },
+ abortSignal
+ );
+ }
+
/**
* @param databaseName - The name of the database.
* @param collectionName - The name of the collection.
diff --git a/packages/database-model/package.json b/packages/database-model/package.json
index 581dfd48b05..691355cd473 100644
--- a/packages/database-model/package.json
+++ b/packages/database-model/package.json
@@ -2,7 +2,7 @@
"name": "mongodb-database-model",
"description": "MongoDB database model",
"author": "Lucas Hrabovsky ",
- "version": "2.12.1",
+ "version": "2.12.2",
"bugs": {
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
"email": "compass@mongodb.com"
@@ -30,14 +30,14 @@
"dependencies": {
"ampersand-collection": "^2.0.2",
"ampersand-model": "^8.0.1",
- "mongodb-collection-model": "^5.12.1"
+ "mongodb-collection-model": "^5.12.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1"
+ "mongodb-data-service": "^22.12.2"
}
}
diff --git a/packages/databases-collections-list/package.json b/packages/databases-collections-list/package.json
index 9007b5aff02..3a4acfc512f 100644
--- a/packages/databases-collections-list/package.json
+++ b/packages/databases-collections-list/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.15.1",
+ "version": "1.16.0",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -48,17 +48,17 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "compass-preferences-model": "^2.15.1"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "compass-preferences-model": "^2.15.2"
},
"devDependencies": {
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/databases-collections/package.json b/packages/databases-collections/package.json
index 3b8c7265bbd..e8420579a4b 100644
--- a/packages/databases-collections/package.json
+++ b/packages/databases-collections/package.json
@@ -2,7 +2,7 @@
"name": "@mongodb-js/compass-databases-collections",
"productName": "Compass Databases and Collections Plugin",
"description": "Plugin for viewing the list of, creating, and dropping databases and collections",
- "version": "1.15.1",
+ "version": "1.16.0",
"license": "SSPL",
"homepage": "https://github.com/mongodb-js/compass",
"bugs": {
@@ -47,19 +47,19 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"peerDependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/databases-collections-list": "^1.15.1",
- "compass-preferences-model": "^2.15.1",
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/databases-collections-list": "^1.16.0",
+ "compass-preferences-model": "^2.15.2",
"react": "^17.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"bson": "^6.0.0",
@@ -67,15 +67,15 @@
"depcheck": "^1.4.1",
"enzyme": "^3.11.0",
"eslint": "^7.25.0",
- "hadron-app": "^5.12.1",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app": "^5.12.2",
+ "hadron-app-registry": "^9.0.12",
"hadron-ipc": "^3.2.2",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mongodb": "^6.0.0",
- "mongodb-collection-model": "^5.12.1",
- "mongodb-data-service": "^22.12.1",
- "mongodb-instance-model": "^12.12.1",
+ "mongodb-collection-model": "^5.12.2",
+ "mongodb-data-service": "^22.12.2",
+ "mongodb-instance-model": "^12.12.2",
"mongodb-ns": "^2.4.0",
"mongodb-query-parser": "^3.1.3",
"nyc": "^15.1.0",
@@ -88,10 +88,10 @@
"sinon": "^9.2.3"
},
"dependencies": {
- "@mongodb-js/compass-components": "^1.15.0",
- "@mongodb-js/compass-editor": "^0.14.1",
- "@mongodb-js/compass-logging": "^1.2.2",
- "@mongodb-js/databases-collections-list": "^1.15.1",
- "compass-preferences-model": "^2.15.1"
+ "@mongodb-js/compass-components": "^1.16.0",
+ "@mongodb-js/compass-editor": "^0.15.0",
+ "@mongodb-js/compass-logging": "^1.2.3",
+ "@mongodb-js/databases-collections-list": "^1.16.0",
+ "compass-preferences-model": "^2.15.2"
}
}
diff --git a/packages/explain-plan-helper/package.json b/packages/explain-plan-helper/package.json
index def809a3187..7611f1de178 100644
--- a/packages/explain-plan-helper/package.json
+++ b/packages/explain-plan-helper/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "1.1.2",
+ "version": "1.1.3",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -52,7 +52,7 @@
"mongodb-explain-compat": "^3.0.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/hadron-app-registry/package.json b/packages/hadron-app-registry/package.json
index 0fe2724752a..aebb34778ed 100644
--- a/packages/hadron-app-registry/package.json
+++ b/packages/hadron-app-registry/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "9.0.11",
+ "version": "9.0.12",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -48,7 +48,7 @@
"reflux": "^0.4.1"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/hadron-app/package.json b/packages/hadron-app/package.json
index 1ebaf7d0e5c..d7e49cc2365 100644
--- a/packages/hadron-app/package.json
+++ b/packages/hadron-app/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "5.12.1",
+ "version": "5.12.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -32,19 +32,19 @@
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"eslint-config-mongodb-js": "^5.0.3",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"less": "^3.11.1",
"mocha": "^10.2.0",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"peerDependencies": {
"babel-register": "^6.26.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"less": "^3.11.1",
- "mongodb-data-service": "^22.12.1",
+ "mongodb-data-service": "^22.12.2",
"prop-types": "^15.7.2",
"react": "^17.0.2"
}
diff --git a/packages/hadron-document/package.json b/packages/hadron-document/package.json
index 1b396a918b4..cdc85cf9f9d 100644
--- a/packages/hadron-document/package.json
+++ b/packages/hadron-document/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "8.4.1",
+ "version": "8.4.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -53,7 +53,7 @@
"lodash": "^4.17.21"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/hadron-plugin-manager/package.json b/packages/hadron-plugin-manager/package.json
index 77c348f438c..46ca4810cca 100644
--- a/packages/hadron-plugin-manager/package.json
+++ b/packages/hadron-plugin-manager/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "7.0.13",
+ "version": "7.0.14",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -34,7 +34,7 @@
},
"devDependencies": {
"@external-plugins/example3": "file:./test/external-plugins/example3",
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-logging": "^1.2.3",
"chai": "^3.4.1",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
diff --git a/packages/instance-model/package.json b/packages/instance-model/package.json
index 46cfbe86245..34db11ac1d3 100644
--- a/packages/instance-model/package.json
+++ b/packages/instance-model/package.json
@@ -2,7 +2,7 @@
"name": "mongodb-instance-model",
"description": "MongoDB instance model",
"author": "Lucas Hrabovsky ",
- "version": "12.12.1",
+ "version": "12.12.2",
"bugs": {
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
"email": "compass@mongodb.com"
@@ -29,18 +29,18 @@
},
"dependencies": {
"ampersand-model": "^8.0.1",
- "mongodb-database-model": "^2.12.1"
+ "mongodb-database-model": "^2.12.2"
},
"peerDependencies": {
- "mongodb-data-service": "^22.12.1"
+ "mongodb-data-service": "^22.12.2"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"chai": "^4.3.4",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"mocha": "^10.2.0",
- "mongodb-collection-model": "^5.12.1"
+ "mongodb-collection-model": "^5.12.2"
}
}
diff --git a/packages/mongodb-query-util/package.json b/packages/mongodb-query-util/package.json
index 37daf02560a..ad60e2fec7b 100644
--- a/packages/mongodb-query-util/package.json
+++ b/packages/mongodb-query-util/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "2.1.0",
+ "version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -50,7 +50,7 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
diff --git a/packages/redux-common/package.json b/packages/redux-common/package.json
index de99c96f7c4..d2fd14c17c4 100644
--- a/packages/redux-common/package.json
+++ b/packages/redux-common/package.json
@@ -7,7 +7,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "2.0.12",
+ "version": "2.0.13",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -31,7 +31,7 @@
"eslint": "^7.25.0",
"eslint-config-mongodb-js": "^3.0.1",
"eslint-plugin-react": "^7.24.0",
- "hadron-app-registry": "^9.0.11",
+ "hadron-app-registry": "^9.0.12",
"mocha": "^10.2.0",
"sinon": "^7.2.7"
}
diff --git a/packages/ssh-tunnel/package.json b/packages/ssh-tunnel/package.json
index a7566a3cba4..5fd4a1214a2 100644
--- a/packages/ssh-tunnel/package.json
+++ b/packages/ssh-tunnel/package.json
@@ -13,7 +13,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "2.1.0",
+ "version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -49,7 +49,7 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/mocha-config-compass": "^1.3.1",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"@mongodb-js/tsconfig-compass": "^1.0.3",
@@ -73,7 +73,7 @@
"typescript": "^5.0.4"
},
"dependencies": {
- "@mongodb-js/compass-logging": "^1.2.2",
+ "@mongodb-js/compass-logging": "^1.2.3",
"socksv5": "0.0.6",
"ssh2": "^1.12.0"
}
diff --git a/scripts/package.json b/scripts/package.json
index 64dc8192b40..0dda22f2e7a 100644
--- a/scripts/package.json
+++ b/scripts/package.json
@@ -14,7 +14,7 @@
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/compass",
- "version": "0.14.1",
+ "version": "0.14.2",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/compass.git"
@@ -30,17 +30,17 @@
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
},
"devDependencies": {
- "@mongodb-js/eslint-config-compass": "^1.0.9",
+ "@mongodb-js/eslint-config-compass": "^1.0.10",
"@mongodb-js/prettier-config-compass": "^1.0.1",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"prettier": "^2.7.1"
},
"dependencies": {
- "@mongodb-js/connection-storage": "^0.6.1",
+ "@mongodb-js/connection-storage": "^0.6.2",
"@mongodb-js/devtools-docker-test-envs": "^1.2.5",
"@mongodb-js/monorepo-tools": "^1.1.1",
- "@mongodb-js/webpack-config-compass": "^1.2.2",
+ "@mongodb-js/webpack-config-compass": "^1.2.3",
"commander": "^11.0.0",
"electron": "^25.8.4",
"glob": "^10.2.5",