Skip to content

Commit 77dc547

Browse files
committed
Merge branch 'main' into autoupdate-from2
2 parents 0f06e74 + 2c33cd7 commit 77dc547

File tree

5 files changed

+51
-13
lines changed

5 files changed

+51
-13
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
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 Mon Jan 13 2025.
2+
This document was automatically generated on Tue Jan 14 2025.
33

44
## List of dependencies
55

docs/tracking-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Compass Tracking Plan
33

4-
Generated on Mon, Jan 13, 2025 at 02:06 PM
4+
Generated on Tue, Jan 14, 2025 at 02:06 PM
55

66
## Table of Contents
77

packages/compass-e2e-tests/smoke-test.ts

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,47 @@ import {
1919
} from './helpers/buildinfo';
2020
import { testAutoUpdateFrom } from './smoketests/auto-update-from';
2121

22+
const SUPPORTED_PLATFORMS = ['win32', 'darwin', 'linux'] as const;
23+
const SUPPORTED_ARCHS = ['x64', 'arm64'] as const;
24+
25+
function isSupportedPlatform(
26+
value: unknown
27+
): value is typeof SUPPORTED_PLATFORMS[number] {
28+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
29+
return SUPPORTED_PLATFORMS.includes(value as any);
30+
}
31+
32+
function isSupportedArch(
33+
value: unknown
34+
): value is typeof SUPPORTED_ARCHS[number] {
35+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
36+
return SUPPORTED_ARCHS.includes(value as any);
37+
}
38+
39+
function getDefaultPlatform() {
40+
const {
41+
platform,
42+
env: { PLATFORM },
43+
} = process;
44+
if (isSupportedPlatform(PLATFORM)) {
45+
return PLATFORM;
46+
} else if (isSupportedPlatform(platform)) {
47+
return platform;
48+
}
49+
}
50+
51+
function getDefaultArch() {
52+
const {
53+
arch,
54+
env: { ARCH },
55+
} = process;
56+
if (isSupportedArch(ARCH)) {
57+
return ARCH;
58+
} else if (isSupportedArch(arch)) {
59+
return arch;
60+
}
61+
}
62+
2263
const argv = yargs(hideBin(process.argv))
2364
.scriptName('smoke-tests')
2465
.detectLocale(false)
@@ -42,16 +83,14 @@ const argv = yargs(hideBin(process.argv))
4283
'Will be read from packages/compass/package.json if not specified',
4384
})
4485
.option('platform', {
45-
type: 'string',
46-
choices: ['win32', 'darwin', 'linux'],
86+
choices: SUPPORTED_PLATFORMS,
4787
demandOption: true,
48-
default: process.env.PLATFORM ?? process.platform,
88+
default: getDefaultPlatform(),
4989
})
5090
.option('arch', {
51-
type: 'string',
52-
choices: ['x64', 'arm64'],
91+
choices: SUPPORTED_ARCHS,
5392
demandOption: true,
54-
default: process.env.ARCH ?? process.arch,
93+
default: getDefaultArch(),
5594
})
5695
.option('package', {
5796
type: 'string',
@@ -65,7 +104,7 @@ const argv = yargs(hideBin(process.argv))
65104
'linux_tar',
66105
'linux_rpm',
67106
'rhel_tar',
68-
],
107+
] as const,
69108
demandOption: true,
70109
description: 'Which package to test',
71110
})
@@ -122,9 +161,7 @@ async function readPackageVersion(packagePath: string) {
122161
}
123162

124163
async function run() {
125-
const parsedArgs = argv.parseSync();
126-
127-
const context = parsedArgs as SmokeTestsContext;
164+
const context: SmokeTestsContext = argv.parseSync();
128165

129166
console.log(
130167
'context',

packages/compass-web/src/preferences.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export function useCompassWebPreferences(
4141
enableExplainPlan: true,
4242
enableAggregationBuilderRunPipeline: true,
4343
enableAggregationBuilderExtraOptions: true,
44+
enableAtlasSearchIndexes: false,
4445
enableImportExport: false,
4546
enableGenAIFeatures: true,
4647
enableGenAIFeaturesAtlasProject: false,

packages/compass/src/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const app = {
381381

382382
log.info(mongoLogId(1_001_000_338), 'Main Window', 'Recent version info', {
383383
previousVersion: state.previousVersion,
384-
DEFAULT_APP_VERSION,
384+
highestInstalledVersion: state.highestInstalledVersion,
385385
APP_VERSION,
386386
});
387387

0 commit comments

Comments
 (0)