Skip to content

Commit 72979a2

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 5ce82ce + 460a436 commit 72979a2

File tree

92 files changed

+31707
-24729
lines changed

Some content is hidden

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

92 files changed

+31707
-24729
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 Tue Aug 15 2023.
2+
This document was automatically generated on Sun Aug 20 2023.
33

44
## List of dependencies
55

configs/mocha-config-compass/main-process.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@ app.on('web-contents-created', function (_, webContents) {
55
enable(webContents);
66
});
77
initialize();
8+
// Every compass plugin depends on compass-preferences-model, for a lot of them
9+
// running tests in electron environments are either spamming "no handler
10+
// registered" warnings or just not working when expected settings are missing
11+
// or can't be updated. To handle that we are setting up preferences for every
12+
// test environment, but making sure that it's in sandbox mode so that nothing
13+
// is actually written to the disk when preferences change
14+
process.env.COMPASS_TEST_USE_PREFERENCES_SANDBOX =
15+
process.env.COMPASS_TEST_USE_PREFERENCES_SANDBOX ?? 'true';
16+
// NB: Not adding this as a dep in package.json to avoid circular dependency
17+
require('compass-preferences-model').setupPreferences();

configs/mocha-config-compass/register/electron-renderer-register.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ if (isElectronRenderer) {
2727
'console-call',
2828
k,
2929
args.map((arg) => {
30+
if (
31+
['string', 'number', 'boolean', 'undefined'].includes(typeof arg)
32+
) {
33+
return arg;
34+
}
3035
return inspect(arg);
3136
})
3237
);

0 commit comments

Comments
 (0)