Skip to content

Commit 1773236

Browse files
authored
feat(schema): allow aborting analysis while in progress COMPASS-9052 (#6771)
1 parent b4e727c commit 1773236

File tree

8 files changed

+1040
-196
lines changed

8 files changed

+1040
-196
lines changed

package-lock.json

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

packages/compass-aggregations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"mongodb-instance-model": "^12.26.5",
9292
"mongodb-ns": "^2.4.2",
9393
"mongodb-query-parser": "^4.3.0",
94-
"mongodb-schema": "^12.4.0",
94+
"mongodb-schema": "^12.5.0",
9595
"prop-types": "^15.7.2",
9696
"re-resizable": "^6.9.0",
9797
"react": "^17.0.2",

packages/compass-field-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@mongodb-js/compass-logging": "^1.6.5",
7474
"hadron-app-registry": "^9.4.5",
7575
"lodash": "^4.17.21",
76-
"mongodb-schema": "^12.4.0",
76+
"mongodb-schema": "^12.5.0",
7777
"react": "^17.0.2",
7878
"react-redux": "^8.1.3",
7979
"redux": "^4.2.1",

packages/compass-generative-ai/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
"@mongodb-js/compass-logging": "^1.6.5",
6060
"@mongodb-js/compass-utils": "^0.8.5",
6161
"bson": "^6.10.3",
62-
"mongodb": "^6.14.1",
6362
"compass-preferences-model": "^2.33.5",
6463
"hadron-app-registry": "^9.4.5",
65-
"mongodb-schema": "^12.4.0",
64+
"mongodb": "^6.14.1",
65+
"mongodb-schema": "^12.5.0",
6666
"react": "^17.0.2",
6767
"react-redux": "^8.1.3",
6868
"redux": "^4.2.1",

packages/compass-import-export/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"mongodb-data-service": "^22.25.5",
6969
"mongodb-ns": "^2.4.2",
7070
"mongodb-query-parser": "^4.3.0",
71-
"mongodb-schema": "^12.4.0",
71+
"mongodb-schema": "^12.5.0",
7272
"papaparse": "^5.3.2",
7373
"react": "^17.0.2",
7474
"react-redux": "^8.1.3",

packages/compass-import-export/src/export/gather-fields.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ async function _gatherFields({
8787
const analyzeStream = new Transform({
8888
objectMode: true,
8989
transform: (doc: Document, encoding, callback) => {
90-
schemaAnalyzer.analyzeDoc(doc);
91-
result.docsProcessed++;
92-
progressCallback?.(result.docsProcessed);
93-
callback();
90+
schemaAnalyzer
91+
.analyzeDoc(doc)
92+
.then(() => {
93+
result.docsProcessed++;
94+
progressCallback?.(result.docsProcessed);
95+
callback();
96+
})
97+
.catch(callback);
9498
},
9599
});
96100

packages/compass-query-bar/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"mongodb-ns": "^2.4.2",
8888
"mongodb-query-parser": "^4.3.0",
8989
"mongodb-query-util": "^2.4.5",
90-
"mongodb-schema": "^12.4.0",
90+
"mongodb-schema": "^12.5.0",
9191
"react": "^17.0.2",
9292
"react-redux": "^8.1.3",
9393
"redux": "^4.2.1",

packages/compass-schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"lodash": "^4.17.21",
9393
"mongodb": "^6.14.1",
9494
"mongodb-query-util": "^2.4.5",
95-
"mongodb-schema": "^12.4.0",
95+
"mongodb-schema": "^12.5.0",
9696
"numeral": "^1.5.6",
9797
"prop-types": "^15.7.2",
9898
"react": "^17.0.2",

0 commit comments

Comments
 (0)