Skip to content

Commit 5aa4ad7

Browse files
authored
Merge branch 'main' into refactor-renderer-init
2 parents f74fa08 + 5460f5b commit 5aa4ad7

File tree

12 files changed

+51
-100
lines changed

12 files changed

+51
-100
lines changed

.tool-versions

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file is for the version management tool "asdf".
2+
# mms uses it as well.
3+
4+
# This Node.js version matches the one required in
5+
# the "engines" in the package.json.
6+
nodejs 22.15.1

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 May 19 2025.
2+
This document was automatically generated on Tue May 20 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
@@ -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 Mon, May 19, 2025
9+
Generated on Tue, May 20, 2025
1010

1111
## Table of Contents
1212

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-schema/src/components/minichart/minichart.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class MiniChart extends PureComponent {
1414
static propTypes = {
1515
fieldName: PropTypes.string.isRequired,
1616
fieldValue: PropTypes.any,
17-
actions: PropTypes.object.isRequired,
1817
type: PropTypes.object.isRequired,
1918
nestedDocType: PropTypes.object,
2019
onQueryChanged: PropTypes.func.isRequired,
@@ -92,7 +91,6 @@ class MiniChart extends PureComponent {
9291
if (typeName === 'Coordinates') {
9392
return (
9493
<CoordinatesMinichart
95-
actions={this.props.actions}
9694
fieldName={fieldName}
9795
type={this.props.type}
9896
onQueryChanged={this.props.onQueryChanged}

packages/compass-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
"mongodb": "^6.16.0",
122122
"mongodb-connection-string-url": "^3.0.1",
123123
"mongodb-data-service": "^22.27.0",
124+
"mongodb-log-writer": "^2.3.4",
124125
"mongodb-ns": "^2.4.2",
125126
"nyc": "^15.1.0",
126127
"os-browserify": "^0.3.0",

packages/compass-web/polyfills/@mongodb-js/devtools-proxy-support/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ export function resetSystemCACache(): never {
2222

2323
// Explicitly web-compatible
2424
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
25-
// @ts-expect-error TS resolution doesn't match webpack resolution
2625
export * from '@mongodb-js/devtools-proxy-support/proxy-options';

packages/compass-web/polyfills/net/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-expect-error import vs require
12
import { ipVersion } from 'is-ip';
23
import type { ConnectionOptions } from 'mongodb-data-service';
34
import { Duplex } from 'stream';
@@ -150,6 +151,7 @@ class Socket extends Duplex {
150151
}
151152
}
152153

154+
// @ts-expect-error import vs require
153155
export { isIPv4, isIPv6 } from 'is-ip';
154156
export const isIP = (input: string) => ipVersion(input) ?? 0;
155157
export const createConnection = (options: { host: string; port: number }) => {

packages/compass-web/sandbox/sandbox-logger.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import createDebug from 'debug';
2+
import type { LogMessage } from '../src/logger-and-telemetry';
23

3-
const logging: { name: string; component: string; args: any[] }[] = ((
4-
globalThis as any
5-
).logging = []);
4+
const logging: LogMessage[] = ((globalThis as any).logging = []);
65

76
const debug = createDebug(`mongodb-compass:compass-web-sandbox`);
87

98
export const sandboxLogger = {
10-
log: (name: string, component: string, ...args: any[]) => {
11-
logging.push({ name, component, args });
9+
log: (event: any) => {
10+
logging.push(event);
1211
},
1312

1413
debug,

packages/compass-web/src/logger-and-telemetry.spec.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ describe('useCompassWebLoggerAndTelemetry', function () {
4242
beforeEach(cleanup);
4343

4444
it('should call callback props when logger is called', function () {
45-
const onLog = Sinon.stub();
45+
const logs: any[] = [];
46+
const onLog = Sinon.stub().callsFake((entry) => logs.push(entry));
4647
const onTrack = Sinon.stub();
4748
const onDebug = Sinon.stub();
4849

@@ -54,13 +55,16 @@ describe('useCompassWebLoggerAndTelemetry', function () {
5455
loggerAndTelemetry.log.info(mongoLogId(123), 'Ctx', 'msg', { attr: 1 });
5556

5657
expect(onDebug).to.have.been.calledOnceWith('TEST', 'foo bar');
57-
expect(onLog).to.have.been.calledOnceWith(
58-
'info',
59-
'TEST',
60-
mongoLogId(123),
61-
'Ctx',
62-
'msg',
63-
{ attr: 1 }
64-
);
58+
expect(logs).to.deep.equal([
59+
{
60+
t: logs[0].t,
61+
s: 'I',
62+
c: 'TEST',
63+
id: 123,
64+
ctx: 'Ctx',
65+
msg: 'msg',
66+
attr: { attr: 1 },
67+
},
68+
]);
6569
});
6670
});

0 commit comments

Comments
 (0)