Skip to content

Commit c644468

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents e00900c + 8671616 commit c644468

File tree

82 files changed

+770
-221
lines changed

Some content is hidden

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

82 files changed

+770
-221
lines changed

.evergreen/functions.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ functions:
228228
--stream \
229229
--scope "${scope}" \
230230
--include-dependencies
231-
231+
# If scope is not provided, we're bootstrapping the whole monorepo and
232+
# should follow the logic in bootstrap npm scripts
233+
if [ -z "${scope}" ]; then
234+
npm run compile --workspace=@mongodb-js/testing-library-compass
235+
fi
232236
check:
233237
command: shell.exec
234238
params:

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 Wed Sep 04 2024.
2+
This document was automatically generated on Thu Sep 05 2024.
33

44
## List of dependencies
55

configs/mocha-config-compass/register/resolve-from-source-register.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@ const path = require('path');
44
const Module = require('module');
55

66
const workspacesDirPath = path.resolve(__dirname, '..', '..', '..', 'packages');
7-
if (!fs.existsSync(workspacesDirPath)) {
7+
const configsDirPath = path.resolve(__dirname, '..', '..', '..', 'configs');
8+
9+
if (!fs.existsSync(workspacesDirPath) || !fs.existsSync(configsDirPath)) {
810
// Not running inside the Compass monorepo
911
return;
1012
}
1113

12-
const workspaces = fs
13-
.readdirSync(workspacesDirPath)
14-
.filter((workspacesDir) => {
15-
// Unexpected but seems to be a thing that happens? Ignore hidden files
16-
return !workspacesDir.startsWith('.');
17-
})
18-
.map((workspaceName) => path.join(workspacesDirPath, workspaceName));
14+
const getPackagePathsFromDir = (dirPath) => {
15+
return fs
16+
.readdirSync(dirPath)
17+
.filter((dir) => {
18+
// Unexpected but seems to be a thing that happens? Ignore hidden files
19+
return !dir.startsWith('.');
20+
})
21+
.map((name) => path.join(dirPath, name));
22+
};
23+
24+
const workspaces = [
25+
...getPackagePathsFromDir(workspacesDirPath),
26+
...getPackagePathsFromDir(configsDirPath),
27+
];
1928

2029
const sourcePaths = Object.fromEntries(
2130
workspaces
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ignores:
2+
- '@mongodb-js/prettier-config-compass'
3+
- '@mongodb-js/tsconfig-compass'
4+
- '@types/chai'
5+
- '@types/sinon-chai'
6+
- 'sinon'
7+
# This package relies on some other compass packages to function, but adding a
8+
# dependency will introduce a circular one in our dependency tree, as it's only
9+
# used for testing and doesn't require compilation, we're escaping the
10+
# recursiveness issue by just not including those in the package.json
11+
- '@mongodb-js/compass-logging'
12+
- '@mongodb-js/compass-telemetry'
13+
- '@mongodb-js/connection-info'
14+
- '@mongodb-js/compass-connections'
15+
- '@mongodb-js/compass-components'
16+
- '@mongodb-js/connection-storage'
17+
- 'compass-preferences-model'
18+
- 'hadron-app-registry'
19+
- 'mongodb-data-service'
20+
ignore-patterns:
21+
- 'dist'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc-output
2+
dist
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@mongodb-js/eslint-config-compass'],
4+
parserOptions: {
5+
tsconfigRootDir: __dirname,
6+
project: ['./tsconfig-lint.json'],
7+
},
8+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@mongodb-js/mocha-config-compass');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.nyc_output
2+
dist
3+
coverage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@mongodb-js/prettier-config-compass"
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "@mongodb-js/testing-library-compass",
3+
"description": "Compass unit testing utils",
4+
"author": {
5+
"name": "MongoDB Inc",
6+
"email": "[email protected]"
7+
},
8+
"private": true,
9+
"bugs": {
10+
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
11+
"email": "[email protected]"
12+
},
13+
"homepage": "https://github.com/mongodb-js/compass",
14+
"version": "1.0.0",
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/mongodb-js/compass.git"
18+
},
19+
"files": [
20+
"dist"
21+
],
22+
"license": "SSPL",
23+
"main": "dist/index.js",
24+
"compass:main": "src/index.tsx",
25+
"exports": {
26+
".": "./dist/index.js"
27+
},
28+
"compass:exports": {
29+
".": "./src/index.tsx"
30+
},
31+
"types": "./dist/index.d.ts",
32+
"scripts": {
33+
"compile": "tsc -p tsconfig.json",
34+
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
35+
"eslint": "eslint",
36+
"prettier": "prettier",
37+
"lint": "npm run eslint . && npm run prettier -- --check .",
38+
"depcheck": "depcheck",
39+
"check": "npm run typecheck && npm run lint && npm run depcheck",
40+
"check-ci": "npm run check",
41+
"test": "mocha",
42+
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
43+
"test-watch": "npm run test -- --watch",
44+
"test-ci": "npm run test-cov",
45+
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
46+
},
47+
"devDependencies": {
48+
"@mongodb-js/eslint-config-compass": "^1.1.6",
49+
"@mongodb-js/mocha-config-compass": "^1.4.1",
50+
"@mongodb-js/prettier-config-compass": "^1.0.2",
51+
"@mongodb-js/tsconfig-compass": "^1.0.4",
52+
"@types/chai": "^4.2.21",
53+
"@types/mocha": "^9.0.0",
54+
"@types/sinon-chai": "^3.2.5",
55+
"chai": "^4.3.6",
56+
"depcheck": "^1.4.1",
57+
"eslint": "^7.25.0",
58+
"mocha": "^10.2.0",
59+
"nyc": "^15.1.0",
60+
"prettier": "^2.7.1",
61+
"typescript": "^5.0.4"
62+
},
63+
"dependencies": {
64+
"@testing-library/react": "^12.1.5",
65+
"@testing-library/user-event": "^13.5.0",
66+
"mongodb-connection-string-url": "^3.0.1",
67+
"react": "^17.0.2",
68+
"react-redux": "^8.1.3",
69+
"sinon": "^17.0.1"
70+
}
71+
}

0 commit comments

Comments
 (0)