Skip to content

Commit 75dd7b4

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents ee934e5 + 350ed69 commit 75dd7b4

File tree

182 files changed

+2717
-2782
lines changed

Some content is hidden

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

182 files changed

+2717
-2782
lines changed

.evergreen/buildvariants.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ buildvariants:
8181
- name: test-packaged-app-60x-enterprise
8282
depends_on: package-compass
8383

84+
- name: test-packaged-app-70x-community
85+
depends_on: package-compass
86+
87+
- name: test-packaged-app-70x-enterprise
88+
depends_on: package-compass
89+
8490
- name: test-packaged-app-latest
8591
depends_on: package-compass
8692

@@ -130,6 +136,12 @@ buildvariants:
130136
- name: test-packaged-app-60x-enterprise
131137
depends_on: package-compass
132138

139+
- name: test-packaged-app-70x-community
140+
depends_on: package-compass
141+
142+
- name: test-packaged-app-70x-enterprise
143+
depends_on: package-compass
144+
133145
- name: test-packaged-app-latest
134146
depends_on: package-compass
135147

@@ -179,6 +191,12 @@ buildvariants:
179191
- name: test-packaged-app-60x-enterprise
180192
depends_on: package-compass
181193

194+
- name: test-packaged-app-70x-community
195+
depends_on: package-compass
196+
197+
- name: test-packaged-app-70x-enterprise
198+
depends_on: package-compass
199+
182200
- name: macos
183201
display_name: MacOS x64 11.00 (Test and Package)
184202
run_on: macos-1100
@@ -204,6 +222,14 @@ buildvariants:
204222
run_on: macos-1100-gui
205223
depends_on: package-compass
206224

225+
- name: test-packaged-app-70x-community
226+
run_on: macos-1100-gui
227+
depends_on: package-compass
228+
229+
- name: test-packaged-app-70x-enterprise
230+
run_on: macos-1100-gui
231+
depends_on: package-compass
232+
207233
- name: macos-arm
208234
display_name: MacOS arm64 11.00 (Test and Package)
209235
run_on: macos-1100-arm64
@@ -228,3 +254,11 @@ buildvariants:
228254
- name: test-packaged-app-60x-enterprise
229255
run_on: macos-1100-arm64-gui
230256
depends_on: package-compass
257+
258+
- name: test-packaged-app-70x-community
259+
run_on: macos-1100-arm64-gui
260+
depends_on: package-compass
261+
262+
- name: test-packaged-app-70x-enterprise
263+
run_on: macos-1100-arm64-gui
264+
depends_on: package-compass

.evergreen/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@
118118
"mongodb_version": "6.0.x-enterprise"
119119
}
120120
},
121+
{
122+
"name": "70x-community",
123+
"vars": {
124+
"mongodb_version": "7.0.x"
125+
}
126+
},
127+
{
128+
"name": "70x-enterprise",
129+
"vars": {
130+
"mongodb_version": "7.0.x-enterprise"
131+
}
132+
},
121133
{
122134
"name": "latest",
123135
"vars": {

.evergreen/tasks.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,46 @@ tasks:
351351
compass_distribution: compass
352352
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
353353

354+
- name: test-packaged-app-70x-community
355+
tags: ['required-for-publish', 'run-on-pr']
356+
commands:
357+
- func: prepare
358+
- func: install
359+
- func: bootstrap
360+
vars:
361+
scope: 'compass-e2e-tests'
362+
- func: apply-compass-target-expansion
363+
vars:
364+
compass_distribution: compass
365+
- func: get-packaged-app
366+
vars:
367+
compass_distribution: compass
368+
- func: test-packaged-app
369+
vars:
370+
mongodb_version: '7.0.x'
371+
compass_distribution: compass
372+
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
373+
374+
- name: test-packaged-app-70x-enterprise
375+
tags: ['required-for-publish', 'run-on-pr']
376+
commands:
377+
- func: prepare
378+
- func: install
379+
- func: bootstrap
380+
vars:
381+
scope: 'compass-e2e-tests'
382+
- func: apply-compass-target-expansion
383+
vars:
384+
compass_distribution: compass
385+
- func: get-packaged-app
386+
vars:
387+
compass_distribution: compass
388+
- func: test-packaged-app
389+
vars:
390+
mongodb_version: '7.0.x-enterprise'
391+
compass_distribution: compass
392+
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
393+
354394
- name: test-packaged-app-latest
355395
tags: ['required-for-publish', 'run-on-pr']
356396
commands:

THIRD-PARTY-NOTICES.md

Lines changed: 4 additions & 39 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 Nov 12 2023.
2+
This document was automatically generated on Sun Nov 19 2023.
33

44
## List of dependencies
55

@@ -234,7 +234,6 @@ This document was automatically generated on Sun Nov 12 2023.
234234
| **[d3-hierarchy](#e718643319205524a77c56ca75dcbf37e3975cc5e187760d1eef01cdd94a7d74)** | 1.1.9 | BSD-3-Clause |
235235
| **[d3-timer](#4c2f0f915f3c7032d873d19967d441bf062d008c51a0b3c4b39262707fed1411)** | 1.0.7 | BSD-3-Clause |
236236
| **[d3](#af9ae6fd28524ec267db82c3ebf75e02f2806418cda4ab310971631d632d3317)** | 3.5.17 | BSD-3-Clause |
237-
| **[darkreader](#009d507c500fca0823d99da7294679df74fe3cf57b482902b9b1d59cabd8bb80)** | 4.9.40 | MIT |
238237
| **[debug](#233219ced46fb5b84e28859835e97775eb9d0181f4cb85d6aa5cecb61e595947)** | 2.6.9 | MIT |
239238
| **[debug](#d17e389ce22af9246d1b07714885a99a0c7ffce55db7f2ecf52bfef063e8c8ac)** | 4.3.1 | MIT |
240239
| **[debug](#f9b654e80c05af90dc288869333e452db67fbba75969b385acd60df9895a7944)** | 4.3.4 | MIT |
@@ -257,7 +256,7 @@ This document was automatically generated on Sun Nov 12 2023.
257256
| **[ejson-shell-parser](#1631f0de6379453a982f36795884ff37a225e331bbd8a7d141fbce378c691810)** | 1.2.4 | MIT |
258257
| **[electron-dl](#e97e034c7b93c63e7a433d75f6f1de3e0668764225ebbd61dbde8d1b55d6f3b7)** | 3.5.0 | MIT |
259258
| **[electron-squirrel-startup](#dcda22e402581a033ec2a017d6d05c094bf3173c1b03ae0471b2ce9078d3f601)** | 1.0.0 | Apache-2.0 |
260-
| **[electron](#324b1a9d8354ed2a6c7bd85bf151f79d738c47935092b00ba45f7921c25131e8)** | 25.9.4 | MIT |
259+
| **[electron](#329bfe6411e9ee792e5ec8786002ecf86794c172c52a8b12cd65b182c9e25769)** | 25.9.5 | MIT |
261260
| **[encodeurl](#b89152db475e86531e570f87b45d8a51aa5e5d87d4cc3b960cee7b8febf1d26a)** | 1.0.2 | MIT |
262261
| **[end-of-stream](#fadc10994f5fa767d06fb25cfff35fb17a895daf3bc3477c782907668ed16563)** | 1.4.4 | MIT |
263262
| **[ensure-error](#3b1eba5276d89414cef21a1007e85c4f1d6749bf57b300e082ab23975a41dbc9)** | 3.0.1 | MIT |
@@ -20217,40 +20216,6 @@ License files:
2021720216
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2021820217
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2021920218

20220-
<a id="009d507c500fca0823d99da7294679df74fe3cf57b482902b9b1d59cabd8bb80"></a>
20221-
20222-
### [darkreader](https://www.npmjs.com/package/darkreader) (version 4.9.40)
20223-
20224-
License tags: MIT
20225-
20226-
License files:
20227-
20228-
- LICENSE:
20229-
20230-
MIT License
20231-
20232-
Copyright (c) 2021 Dark Reader Ltd.
20233-
20234-
All rights reserved.
20235-
20236-
Permission is hereby granted, free of charge, to any person obtaining a copy
20237-
of this software and associated documentation files (the "Software"), to deal
20238-
in the Software without restriction, including without limitation the rights
20239-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20240-
copies of the Software, and to permit persons to whom the Software is
20241-
furnished to do so, subject to the following conditions:
20242-
20243-
The above copyright notice and this permission notice shall be included in all
20244-
copies or substantial portions of the Software.
20245-
20246-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20247-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20248-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20249-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20250-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20251-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20252-
SOFTWARE.
20253-
2025420219
<a id="233219ced46fb5b84e28859835e97775eb9d0181f4cb85d6aa5cecb61e595947"></a>
2025520220

2025620221
### [debug](https://www.npmjs.com/package/debug) (version 2.6.9)
@@ -21147,9 +21112,9 @@ License files:
2114721112
See the License for the specific language governing permissions and
2114821113
limitations under the License.
2114921114

21150-
<a id="324b1a9d8354ed2a6c7bd85bf151f79d738c47935092b00ba45f7921c25131e8"></a>
21115+
<a id="329bfe6411e9ee792e5ec8786002ecf86794c172c52a8b12cd65b182c9e25769"></a>
2115121116

21152-
### [electron](https://www.npmjs.com/package/electron) (version 25.9.4)
21117+
### [electron](https://www.npmjs.com/package/electron) (version 25.9.5)
2115321118

2115421119
License tags: MIT
2115521120

configs/eslint-config-compass/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const extraTsRules = {
1111
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
1212
'@typescript-eslint/restrict-template-expressions': 'warn',
1313
'@typescript-eslint/restrict-plus-operands': 'warn',
14+
'@typescript-eslint/consistent-type-exports': [
15+
'error',
16+
{ fixMixedExportsWithInlineTypeSpecifier: false },
17+
],
1418
};
1519

1620
const tsRules = {

configs/eslint-plugin-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
3535
"test-watch": "npm run test -- --watch",
3636
"test-ci": "npm run test-cov",
37-
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
37+
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
3838
},
3939
"devDependencies": {
4040
"@mongodb-js/mocha-config-compass": "^1.3.2",

configs/webpack-config-compass/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"depcheck": "depcheck",
4343
"check": "npm run lint && npm run depcheck",
4444
"check-ci": "npm run check",
45-
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
45+
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
4646
},
4747
"devDependencies": {
4848
"@mongodb-js/eslint-config-compass": "^1.0.11",
@@ -74,7 +74,7 @@
7474
"cli-progress": "^3.9.1",
7575
"core-js": "^3.17.3",
7676
"css-loader": "^4.3.0",
77-
"electron": "^25.9.4",
77+
"electron": "^25.9.5",
7878
"html-webpack-plugin": "^5.3.2",
7979
"less-loader": "^10.0.1",
8080
"mini-css-extract-plugin": "^2.3.0",
@@ -83,6 +83,7 @@
8383
"postcss-loader": "^6.1.1",
8484
"postcss-preset-env": "^6.7.0",
8585
"react-refresh": "^0.10.0",
86+
"source-map-loader": "^4.0.1",
8687
"style-loader": "^3.2.1",
8788
"webpack": "^5.86.0",
8889
"webpack-bundle-analyzer": "^4.9.0",

configs/webpack-config-compass/src/args.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type CompassConfigArgs = {
3737
devServerPort: number;
3838
cwd: string;
3939
coverage?: string;
40+
library?: string;
4041
};
4142

4243
export type ConfigArgs = WebpackCLIArgs & CompassConfigArgs;

configs/webpack-config-compass/src/index.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import fs from 'fs';
2-
import type { ResolveOptions, WebpackPluginInstance } from 'webpack';
2+
import type {
3+
ResolveOptions,
4+
WebpackPluginInstance,
5+
Configuration,
6+
} from 'webpack';
37
import { merge } from 'webpack-merge';
48
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
59
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -12,6 +16,7 @@ import { WebpackPluginStartElectron } from './webpack-plugin-start-electron';
1216
import type { ConfigArgs, WebpackConfig, WebpackCLIArgs } from './args';
1317
import { isServe, webpackArgsWithDefaults } from './args';
1418
import {
19+
sourceMapLoader,
1520
javascriptLoader,
1621
nodeLoader,
1722
sourceLoader,
@@ -31,6 +36,17 @@ import { sharedExternals, pluginExternals } from './externals';
3136
import { WebpackPluginMulticompilerProgress } from './webpack-plugin-multicompiler-progress';
3237
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
3338

39+
const sharedIgnoreWarnings: NonNullable<Configuration['ignoreWarnings']> = [
40+
// Usually caused by published d.ts files pointing to non-existent ts files in
41+
// the ignored for publish source folder
42+
/Failed to parse source map.+?ENOENT/,
43+
// Expected in most cases for Compass
44+
/require function is used in a way in which dependencies cannot be statically extracted/,
45+
/the request of a dependency is an expression/,
46+
// Optional, platform-specific dependencies (mostly from driver)
47+
/Module not found.+?(mongo_crypt_v1.(dll|so|dylib)|@mongodb-js\/zstd|aws-crt|gcp-metadata)/,
48+
];
49+
3450
const sharedResolveOptions = (
3551
target: ConfigArgs['target']
3652
): Pick<
@@ -96,6 +112,7 @@ export function createElectronMainConfig(
96112
target: opts.target,
97113
module: {
98114
rules: [
115+
sourceMapLoader(opts),
99116
javascriptLoader(opts),
100117
nodeLoader(opts),
101118
resourceLoader(opts),
@@ -111,6 +128,7 @@ export function createElectronMainConfig(
111128
...sharedResolveOptions(opts.target),
112129
},
113130
plugins: [new WebpackPluginMulticompilerProgress()],
131+
ignoreWarnings: sharedIgnoreWarnings,
114132
};
115133

116134
return merge<WebpackConfig>(
@@ -153,15 +171,17 @@ export function createElectronRendererConfig(
153171
path: opts.outputPath,
154172
filename: opts.outputFilename ?? '[name].[contenthash].renderer.js',
155173
assetModuleFilename: 'assets/[name].[hash][ext]',
156-
library: getLibraryNameFromCwd(opts.cwd),
174+
library: opts.library ?? getLibraryNameFromCwd(opts.cwd),
157175
libraryTarget: 'umd',
158176
strictModuleErrorHandling: true,
159177
strictModuleExceptionHandling: true,
178+
globalObject: 'globalThis',
160179
},
161180
mode: opts.mode,
162181
target: opts.target,
163182
module: {
164183
rules: [
184+
sourceMapLoader(opts),
165185
javascriptLoader(opts),
166186
nodeLoader(opts),
167187
cssLoader(opts),
@@ -182,6 +202,7 @@ export function createElectronRendererConfig(
182202
aliasFields: [],
183203
...sharedResolveOptions(opts.target),
184204
},
205+
ignoreWarnings: sharedIgnoreWarnings,
185206
};
186207

187208
return merge<WebpackConfig>(
@@ -263,7 +284,7 @@ export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
263284
path: opts.outputPath,
264285
filename: opts.outputFilename ?? '[name].js',
265286
assetModuleFilename: 'assets/[name][ext]',
266-
library: getLibraryNameFromCwd(opts.cwd),
287+
library: opts.library ?? getLibraryNameFromCwd(opts.cwd),
267288
libraryTarget: 'umd',
268289
// These two options are subtly different, and while
269290
// `strictModuleExceptionHandling` is deprecated, it is the only
@@ -274,11 +295,13 @@ export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
274295
// typical development mode that we work in.
275296
strictModuleErrorHandling: true,
276297
strictModuleExceptionHandling: true,
298+
globalObject: 'globalThis',
277299
},
278300
mode: opts.mode,
279301
target: opts.target,
280302
module: {
281303
rules: [
304+
sourceMapLoader(opts),
282305
javascriptLoader(opts, true),
283306
nodeLoader(opts),
284307
cssLoader(opts, true),
@@ -297,6 +320,7 @@ export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
297320
resolve: {
298321
...sharedResolveOptions(opts.target),
299322
},
323+
ignoreWarnings: sharedIgnoreWarnings,
300324
};
301325
}
302326

configs/webpack-config-compass/src/loaders.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ export const javascriptLoader = (args: ConfigArgs, web = false) => ({
119119
},
120120
});
121121

122+
export const sourceMapLoader = (args: ConfigArgs) => ({
123+
test: /\.(mjs|c?jsx?|tsx?)$/,
124+
enforce: 'pre',
125+
use: [
126+
{
127+
loader: require.resolve('source-map-loader'),
128+
options: {
129+
filterSourceMappingUrl() {
130+
return args.env.WEBPACK_SERVE === true ? 'consume' : 'remove';
131+
},
132+
},
133+
},
134+
],
135+
});
136+
122137
// eslint-disable-next-line @typescript-eslint/no-unused-vars
123138
export const nodeLoader = (_args: ConfigArgs) => ({
124139
test: /\.node$/,

0 commit comments

Comments
 (0)