Skip to content

Commit fb476d7

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 20ab7ff + 88645f7 commit fb476d7

File tree

86 files changed

+1755
-428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1755
-428
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Sun Jul 02 2023.
2+
This document was automatically generated on Mon Jul 10 2023.
33

44
## List of dependencies
55

@@ -471,7 +471,7 @@ This document was automatically generated on Sun Jul 02 2023.
471471
| **[mongodb-query-util](#1cdb3b70a5e114dae29f1b35f9d6db51c92eb87f2577dc4054c75119970b2df1)** | 0.0.3 | Apache-2.0 |
472472
| **[mongodb-query-util](#cca38af88354cbe08b44f198be120ccf55e468b2aad0dc82a55f98aa972b9686)** | 0.2.1 | Apache-2.0 |
473473
| **[mongodb-redact](#00a2cfed57df1e8b912b751b08bee4de24ad0189840c99820ebc00c1b219a421)** | 0.2.2 | Apache-2.0 |
474-
| **[mongodb-schema](#ad3ae0c600e99ac87b6e35f97b1e179b6d50942eaa01b705e90a0deffb6c2aff)** | 11.1.0 | Apache-2.0 |
474+
| **[mongodb-schema](#51b48b1d63ceb84206cf38237d271f70e4afe080402284a50dfadb74460a96d2)** | 11.2.1 | Apache-2.0 |
475475
| **[mongodb-url](#400fa16b044759954266738cf4137a5e2f65f4e056588d7caee023180703347b)** | 3.0.3 | Apache-2.0 |
476476
| **[mongodb](#79df6e249dafb087f46c11ba03a5438d6884a12fd8b3ae5397e74d271f0a569f)** | 3.6.9 | Apache-2.0 |
477477
| **[mongodb](#9d661fd2aedc03947456d8e0bf3f828e213a3c828ff2f172c6edad79ff221785)** | 5.6.0 | Apache-2.0 |
@@ -558,7 +558,7 @@ This document was automatically generated on Sun Jul 02 2023.
558558
| **[semver](#e166af9700b507cf6e45c57af6bf29f9ba7059e4535e65fac0f3d5c37970544d)** | 5.7.1 | ISC |
559559
| **[semver](#24cd86d9f27cebacf43c9e9870102fe20fe9d787608ebd41dca9afe1d2e4790c)** | 6.3.0 | ISC |
560560
| **[semver](#37ac96eaf12c2e26f71e38ad2458ac1cc4c424d9b8c9da62a9737625817f2455)** | 7.5.1 | ISC |
561-
| **[semver](#dc15557e7a5e410129cada0ae41bbe5dca51b2cee667108e2846d4da1bc87950)** | 7.5.3 | ISC |
561+
| **[semver](#c2244b3979a8f8d37bf67622a3fcc46bf41a0bb61410aa8a0d38b2070d212612)** | 7.5.4 | ISC |
562562
| **[send](#a5aa96052b8bf57c58c38d6fae3a3b7d94ec212b6100f58a8260eb2f6a8cff6d)** | 0.18.0 | MIT |
563563
| **[serve-static](#03156d123ff3a9482fa09d97af4668d5e2ae058c4e3d2c67fe4a1c0c072403f0)** | 1.15.0 | MIT |
564564
| **[setprototypeof](#7787a1d3bc2f39b65d75407d5d8d02d8ddb70f1cdb74897f15115e995fb64a56)** | 1.2.0 | ISC |
@@ -32763,9 +32763,9 @@ License files:
3276332763
See the License for the specific language governing permissions and
3276432764
limitations under the License.
3276532765

32766-
<a id="ad3ae0c600e99ac87b6e35f97b1e179b6d50942eaa01b705e90a0deffb6c2aff"></a>
32766+
<a id="51b48b1d63ceb84206cf38237d271f70e4afe080402284a50dfadb74460a96d2"></a>
3276732767

32768-
### [mongodb-schema](https://www.npmjs.com/package/mongodb-schema) (version 11.1.0)
32768+
### [mongodb-schema](https://www.npmjs.com/package/mongodb-schema) (version 11.2.1)
3276932769

3277032770
License tags: Apache-2.0
3277132771

@@ -42459,9 +42459,9 @@ License files:
4245942459
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
4246042460
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4246142461

42462-
<a id="dc15557e7a5e410129cada0ae41bbe5dca51b2cee667108e2846d4da1bc87950"></a>
42462+
<a id="c2244b3979a8f8d37bf67622a3fcc46bf41a0bb61410aa8a0d38b2070d212612"></a>
4246342463

42464-
### [semver](https://www.npmjs.com/package/semver) (version 7.5.3)
42464+
### [semver](https://www.npmjs.com/package/semver) (version 7.5.4)
4246542465

4246642466
License tags: ISC
4246742467

configs/eslint-config-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@babel/core": "^7.21.4",
1717
"@babel/eslint-parser": "^7.14.3",
18-
"@mongodb-js/eslint-config-devtools": "^0.9.4",
18+
"@mongodb-js/eslint-config-devtools": "^0.9.7",
1919
"@mongodb-js/eslint-plugin-compass": "^1.0.6",
2020
"@typescript-eslint/eslint-plugin": "^5.59.0",
2121
"@typescript-eslint/parser": "^5.59.0",

package-lock.json

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

packages/compass-aggregations/src/components/focus-mode/focus-mode-modal-header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ const tooltipContentItemStyles = css({
8383
flexShrink: 0,
8484
});
8585

86-
const PREVIOUS_STAGE_HOTKEY = 'meta+shift+9';
87-
const NEXT_STAGE_HOTKEY = 'meta+shift+0';
88-
const ADD_STAGE_AFTER_HOTKEY = 'meta+shift+a';
89-
const ADD_STAGE_BEFORE_HOTKEY = 'meta+shift+b';
86+
const PREVIOUS_STAGE_HOTKEY = 'mod+shift+9';
87+
const NEXT_STAGE_HOTKEY = 'mod+shift+0';
88+
const ADD_STAGE_AFTER_HOTKEY = 'mod+shift+a';
89+
const ADD_STAGE_BEFORE_HOTKEY = 'mod+shift+b';
9090

9191
export const FocusModeModalHeader: React.FunctionComponent<
9292
FocusModeModalHeaderProps

packages/compass-aggregations/src/modules/pipeline-builder/pipeline-parser/stage-parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export function assertStageNode(
7676
} else if (
7777
node.properties.length !== 1 ||
7878
node.properties[0].type !== 'ObjectProperty' ||
79+
// eslint-disable-next-line eqeqeq
7980
node.properties[0].key == null
8081
) {
8182
error =
@@ -87,6 +88,7 @@ export function assertStageNode(
8788
error = `Unrecognized pipeline stage name${key ? `: '${key}'` : ''}`;
8889
errorCode = StageAssertionErrorCodes.UnrecognizedStageName;
8990
causedBy = node.properties[0].key;
91+
// eslint-disable-next-line eqeqeq
9092
} else if (!loose && node.properties[0].value == null) {
9193
error = 'Stage value can not be empty';
9294
errorCode = StageAssertionErrorCodes.NoStageValue;

packages/compass-aggregations/src/utils/get-directory.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ let electronApp;
44
try {
55
electronApp = require('@electron/remote').app;
66
} catch (e) {
7+
// eslint-disable-next-line no-console
78
console.log('Could not load @electron/remote', e.message);
89
}
910

packages/compass-aggregations/src/utils/insights.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,27 @@ const SIGNALS: Record<string, Signal> = {
2525
primaryActionButtonLink: ATLAS_SEARCH_LP_LINK,
2626
primaryActionButtonLabel: 'Try Atlas Search',
2727
},
28+
'lookup-in-stage': {
29+
id: 'lookup-in-stage',
30+
title: '$lookup usage',
31+
description:
32+
'$lookup operations can be resource-intensive because they perform operations on two collections instead of one. In certain situations, embedding documents or arrays can enhance read performance.',
33+
learnMoreLink:
34+
'https://www.mongodb.com/docs/atlas/schema-suggestions/reduce-lookup-operations/#std-label-anti-pattern-denormalization',
35+
},
2836
} as const;
2937

3038
export const getInsightForStage = (
3139
{ stageOperator, value }: StoreStage,
3240
env: string
3341
): Signal | undefined => {
3442
const isAtlas = [ATLAS, ADL].includes(env);
35-
if (
36-
stageOperator === '$match' &&
37-
(value?.includes('$regex') || value?.includes('$text'))
38-
) {
43+
if (stageOperator === '$match' && /\$(text|regex)\b/.test(value ?? '')) {
3944
return isAtlas
4045
? SIGNALS['atlas-text-regex-usage-in-stage']
4146
: SIGNALS['non-atlas-text-regex-usage-in-stage'];
4247
}
48+
if (stageOperator === '$lookup') {
49+
return SIGNALS['lookup-in-stage'];
50+
}
4351
};

0 commit comments

Comments
 (0)