Commit 1f2d29f
authored
chore(import-export, schema, field-store): update mongodb-schema, use schema paths helper COMPASS-6720 (#4401)
This updates our mongodb-schema dependency in Compass.
Updating to the new version involves a few changes:
- Schema field paths now use string arrays instead of dot separated strings. This will make it easier for us to handle cases like dots in field names (previously we would join and split on dots).
- Better schema type definitions are now exported from mongodb-schema. This involved some changes in compass-schema and compass-import-export as we were supporting our own types.
- Removed the getSchemaPaths function from compass-import-export and updated to use the one from the mongodb-schema package,.
- Removed the unused dimensionality and nestedFields properties and calculations in compass-field-store. (could be separated to another pr if preferred).
- In compass-field-store renamed the aceFields flattened map used for editor field autocompletion to autocompleteFields to be more generic as we are using this in code-mirror and no longer have ace. (could be separated to another pr if preferred).
- Updated schema property variable names, has_duplicates, average_length, and total_count, are now camelCase.
When integrating changes in compass-schema there were updates needed in the telemetry methods, schemaContainsGeoData and calculateSchemaDepth. I ended up refactoring both and hopefully simplifying calculateSchemaDepth a bit, it looks like it might fix a recent error we had. Moved them off the store. Updated tests to be easier to maintain. We could consider moving the calculateSchemaDepth into mongodb-schema, but that's not included in these changes. I'm thinking this should fix COMPASS-68091 parent 55370d8 commit 1f2d29f
File tree
29 files changed
+837
-1140
lines changed- packages
- compass-aggregations/src/stores
- compass-crud/src/stores
- compass-field-store
- src
- modules
- stores
- test/fixtures
- compass-import-export
- src/export
- compass-indexes/src/stores
- compass-query-bar/src/stores
- compass-schema-validation/src/stores
- compass-schema
- src
- components
- minichart
- modules
- stores
- test/fixtures
29 files changed
+837
-1140
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
0 commit comments