Skip to content

Commit 472bc76

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents d687a2d + acb6815 commit 472bc76

File tree

104 files changed

+4361
-2205
lines changed

Some content is hidden

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

104 files changed

+4361
-2205
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mongodb-js/compass-developers

.github/workflows/update-eslint.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ jobs:
3838
3939
- name: Bump eslint
4040
run: |
41-
npm i --save eslint@8 -w @mongodb-js/eslint-config-compass
41+
npm i --save --workspace @mongodb-js/eslint-config-compass \
42+
eslint@8 \
43+
@typescript-eslint/eslint-plugin@latest \
44+
@typescript-eslint/parser@latest
4245
4346
- name: Create Pull Request
4447
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ Dylan Richardson <[email protected]>
104104
Ruby Dong <[email protected]>
105105
Neal Beeken <[email protected]>
106106
Walter Tan <[email protected]>
107+
Raymond Lo <[email protected]>

THIRD-PARTY-NOTICES.md

Lines changed: 288 additions & 7 deletions
Large diffs are not rendered by default.

configs/eslint-config-compass/index.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,28 @@ const extraTsRules = {
1515
'error',
1616
{ fixMixedExportsWithInlineTypeSpecifier: false },
1717
],
18+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
19+
'@typescript-eslint/only-throw-error': 'off',
20+
21+
// TODO: a lot new hits with latest typescript-eslint, we should gradually
22+
// clean those out and re-enable the rules
23+
'@typescript-eslint/no-explicit-any': 'warn',
24+
'@typescript-eslint/no-base-to-string': 'warn',
25+
'@typescript-eslint/no-require-imports': 'warn',
26+
'@typescript-eslint/no-unused-vars': [
27+
'error',
28+
{
29+
caughtErrors: 'none', // should be `'all'`
30+
},
31+
],
32+
'@typescript-eslint/no-unused-expressions': 'off', // replace with eslint-plugin-chai-friendly
33+
'@typescript-eslint/no-redundant-type-constituents': 'warn',
34+
'@typescript-eslint/unbound-method': 'warn',
35+
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
36+
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
37+
'@typescript-eslint/no-floating-promises': 'warn',
38+
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
39+
'@typescript-eslint/no-misused-promises': 'warn',
1840
};
1941

2042
const tsRules = {
@@ -50,7 +72,7 @@ const commonTestOverrides = {
5072
{
5173
patterns: [
5274
{
53-
group: '@testing-library/*',
75+
group: ['@testing-library/*'],
5476
message: 'Use @mongodb-js/testing-library-compass instead',
5577
allowTypeImports: false,
5678
},

configs/eslint-config-compass/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@babel/eslint-parser": "^7.14.3",
1919
"@mongodb-js/eslint-config-devtools": "^0.9.9",
2020
"@mongodb-js/eslint-plugin-compass": "^1.2.9",
21-
"@typescript-eslint/eslint-plugin": "^5.59.0",
22-
"@typescript-eslint/parser": "^5.59.0",
21+
"@typescript-eslint/eslint-plugin": "^8.34.0",
22+
"@typescript-eslint/parser": "^8.34.0",
2323
"eslint": "^8.57.1",
2424
"eslint-config-prettier": "^8.3.0",
2525
"eslint-plugin-filename-rules": "^1.2.0",

configs/eslint-config-compass/plugin.js

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,51 @@ function restrictedProviderImport(servicePkg) {
1010
};
1111
}
1212

13+
// node built-ins with meaningful polyfills in web environment
14+
const allowedNodeJSBuiltinModules = ['assert', 'stream', 'events'];
15+
1316
module.exports = {
1417
...baseConfig,
1518
rules: {
1619
...baseConfig.rules,
1720
'no-restricted-imports': 'off',
1821
'@typescript-eslint/no-restricted-imports': [
1922
'error',
20-
restrictedProviderImport('@mongodb-js/compass-logging'),
21-
restrictedProviderImport('@mongodb-js/compass-telemetry'),
22-
restrictedProviderImport('@mongodb-js/compass-app-stores'),
23-
restrictedProviderImport('@mongodb-js/my-queries-storage'),
24-
restrictedProviderImport('@mongodb-js/atlas-service'),
25-
restrictedProviderImport('compass-preferences-model'),
26-
{
27-
paths: require('module').builtinModules,
28-
message: 'Using Node.js built-in modules in plugins is not allowed.',
29-
allowTypeImports: false,
30-
},
3123
{
32-
paths: ['electron', '@electron/remote'],
33-
message: 'Using electron modules in plugins is not allowed.',
34-
allowTypeImports: false,
24+
paths: [
25+
restrictedProviderImport('@mongodb-js/compass-logging'),
26+
restrictedProviderImport('@mongodb-js/compass-telemetry'),
27+
restrictedProviderImport('@mongodb-js/compass-app-stores'),
28+
restrictedProviderImport('@mongodb-js/my-queries-storage'),
29+
restrictedProviderImport('@mongodb-js/atlas-service'),
30+
restrictedProviderImport('compass-preferences-model'),
31+
...require('module')
32+
.builtinModules.filter((module) => {
33+
return (
34+
!module.startsWith('_') &&
35+
!allowedNodeJSBuiltinModules.includes(module)
36+
);
37+
})
38+
.flatMap((name) => {
39+
const config = {
40+
message:
41+
'Using Node.js built-in modules in plugins is not allowed.',
42+
allowTypeImports: true,
43+
};
44+
45+
return [
46+
{ name, ...config },
47+
{ name: `node:${name}`, ...config },
48+
];
49+
}),
50+
...['electron', '@electron/remote'].map((name) => {
51+
return {
52+
name,
53+
message: 'Using electron modules in plugins is not allowed.',
54+
allowTypeImports: false,
55+
};
56+
}),
57+
],
3558
},
3659
],
3760
},

configs/webpack-config-compass/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"email": "[email protected]"
1414
},
1515
"homepage": "https://github.com/mongodb-js/compass",
16-
"version": "1.6.10",
16+
"version": "1.7.1",
1717
"repository": {
1818
"type": "git",
1919
"url": "https://github.com/mongodb-js/compass.git"
@@ -66,12 +66,12 @@
6666
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
6767
"babel-loader": "^8.2.5",
6868
"babel-plugin-istanbul": "^5.2.0",
69-
"browserslist": "^4.24.5",
69+
"browserslist": "^4.25.0",
7070
"chalk": "^4.1.2",
7171
"cli-progress": "^3.9.1",
7272
"core-js": "^3.17.3",
7373
"css-loader": "^4.3.0",
74-
"electron": "^36.3.1",
74+
"electron": "^36.4.0",
7575
"html-webpack-plugin": "^5.6.0",
7676
"less": "^3.13.1",
7777
"less-loader": "^10.0.1",

docs/tracking-plan.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> the tracking plan for the specific Compass version you can use the following
77
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
88
9-
Generated on Wed, Jun 4, 2025
9+
Generated on Sun, Jun 15, 2025
1010

1111
## Table of Contents
1212

@@ -164,6 +164,7 @@ Generated on Wed, Jun 4, 2025
164164
- [Code Equivalent Toggled](#event--CreateIndexCodeEquivalentToggled)
165165
- [Covered Queries Button Clicked](#event--CreateIndexCoveredQueriesButtonClicked)
166166
- [Covered Queries Learn More Clicked](#event--CreateIndexCoveredQueriesLearnMoreClicked)
167+
- [ESR Learn More Clicked](#event--CreateIndexESRLearnMoreClicked)
167168
- [Start with an Index Tab Clicked](#event--CreateIndexIndexTabClicked)
168169
- [Cancel Button Clicked](#event--CreateIndexModalCancelled)
169170
- [Create Index Modal Closed](#event--CreateIndexModalClosed)
@@ -172,6 +173,9 @@ Generated on Wed, Jun 4, 2025
172173
- [View Programming Language Syntax Clicked](#event--CreateIndexProgrammingLanguageLinkClicked)
173174
- [Start with a Query Tab Clicked](#event--CreateIndexQueryTabClicked)
174175
- [Suggested Index Button Clicked](#event--CreateIndexSuggestedIndexButtonClicked)
176+
- [Input Index Copied](#event--CreateIndexInputIndexCopied)
177+
- [Index Suggestions Copied](#event--CreateIndexIndexSuggestionsCopied)
178+
- [Index Strategies Documentation Clicked](#event--CreateIndexStrategiesDocumentationClicked)
175179
- [UUID Encountered](#event--UUIDEncounteredEvent)
176180

177181
### Performance Tab
@@ -1882,6 +1886,7 @@ a system that doesn't offer a suitable secret storage backend.
18821886
**Properties**:
18831887

18841888
- **context** (required): `"Create Index Modal"`
1889+
- **toggled** (required): `"On" | "Off"`
18851890
- **is_compass_web** (optional): `true | undefined`
18861891

18871892
<a name="event--CreateIndexCoveredQueriesButtonClicked"></a>
@@ -1902,6 +1907,15 @@ a system that doesn't offer a suitable secret storage backend.
19021907
- **context** (required): `"Create Index Modal"`
19031908
- **is_compass_web** (optional): `true | undefined`
19041909

1910+
<a name="event--CreateIndexESRLearnMoreClicked"></a>
1911+
1912+
### ESR Learn More Clicked
1913+
1914+
**Properties**:
1915+
1916+
- **context** (required): `"Create Index Modal"`
1917+
- **is_compass_web** (optional): `true | undefined`
1918+
19051919
<a name="event--CreateIndexIndexTabClicked"></a>
19061920

19071921
### Start with an Index Tab Clicked
@@ -1974,6 +1988,33 @@ a system that doesn't offer a suitable secret storage backend.
19741988
- **context** (required): `"Create Index Modal"`
19751989
- **is_compass_web** (optional): `true | undefined`
19761990

1991+
<a name="event--CreateIndexInputIndexCopied"></a>
1992+
1993+
### Input Index Copied
1994+
1995+
**Properties**:
1996+
1997+
- **context** (required): `"Create Index Modal"`
1998+
- **is_compass_web** (optional): `true | undefined`
1999+
2000+
<a name="event--CreateIndexIndexSuggestionsCopied"></a>
2001+
2002+
### Index Suggestions Copied
2003+
2004+
**Properties**:
2005+
2006+
- **context** (required): `"Create Index Modal"`
2007+
- **is_compass_web** (optional): `true | undefined`
2008+
2009+
<a name="event--CreateIndexStrategiesDocumentationClicked"></a>
2010+
2011+
### Index Strategies Documentation Clicked
2012+
2013+
**Properties**:
2014+
2015+
- **context** (required): `"Create Index Modal"`
2016+
- **is_compass_web** (optional): `true | undefined`
2017+
19772018
<a name="event--UUIDEncounteredEvent"></a>
19782019

19792020
### UUID Encountered

0 commit comments

Comments
 (0)