Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@
"@babel/preset-typescript": "^7.25.7",
"@babel/types": "^7.25.8",
"@modelcontextprotocol/sdk": "^1.24.0",
"@mongodb-js/eslint-config-devtools": "^0.9.12",
"@mongodb-js/eslint-config-devtools": "^0.11.2",
"@mongodb-js/oidc-mock-provider": "^0.11.5",
"@mongodb-js/oidc-plugin": "^2.0.5",
"@mongodb-js/prettier-config-devtools": "^1.0.2",
Expand Down
16 changes: 11 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/explorer/connectionTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ export default class ConnectionTreeItem
const databases = await this.listDatabases();
databases.sort((a: string, b: string) => a.localeCompare(b));

const newChildrenCache: Record<string, DatabaseTreeItem> = {};
const newChildrenCache: Record<string, DatabaseTreeItem> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is from pulling in a new rule https://github.com/mongodb-js/devtools-shared/blob/main/configs/eslint-plugin-devtools/rules/no-plain-object-records.js

We added in mongodb-js/devtools-shared#604
The rule might not be suggesting quite the right fix here though, it's breaking the ts check in other places when it's applied. Looking into it a bit more.

Object.create(null);

databases.forEach((databaseName: string) => {
const cachedItem = this._childrenCache[databaseName] as DatabaseTreeItem;
Expand All @@ -239,7 +240,8 @@ export default class ConnectionTreeItem
const processors = await this.listStreamProcessors();
processors.sort((a, b) => a.name.localeCompare(b.name));

const newChildrenCache: Record<string, StreamProcessorTreeItem> = {};
const newChildrenCache: Record<string, StreamProcessorTreeItem> =
Object.create(null);

processors.forEach((sp) => {
const cachedItem = this._childrenCache[
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/mcpController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class MCPController {
}

const token = crypto.randomUUID();
const headers: Record<string, string> = {
const headers = {
authorization: `Bearer ${token}`,
};
registerGlobalSecretToRedact(token, 'password');
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/telemetry/telemetryService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
});

// TODO: re-enable two tests after https://jira.mongodb.org/browse/VSCODE-432
test.skip('track mongodb playground loaded event', async function () {

Check warning on line 278 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (macos-latest)

Unexpected skipped mocha test

Check warning on line 278 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (ubuntu-latest)

Unexpected skipped mocha test
const docPath = path.resolve(
__dirname,
'../../../../src/test/fixture/testPlayground.mongodb',
Expand All @@ -294,7 +294,7 @@
);
});

test.skip('track mongodbjs playground loaded event', async function () {

Check warning on line 297 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (macos-latest)

Unexpected skipped mocha test

Check warning on line 297 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (ubuntu-latest)

Unexpected skipped mocha test
const docPath = path.resolve(
__dirname,
'../../../../src/test/fixture/testPlayground.mongodb.js',
Expand Down Expand Up @@ -535,7 +535,7 @@
});
});

test.skip('track saved connections loaded', function () {

Check warning on line 538 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (macos-latest)

Unexpected skipped mocha test

Check warning on line 538 in src/test/suite/telemetry/telemetryService.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build (ubuntu-latest)

Unexpected skipped mocha test
testTelemetryService.track(
new SavedConnectionsLoadedTelemetryEvent({
savedConnections: 3,
Expand Down Expand Up @@ -595,7 +595,7 @@
});
}

const mappedTypes: Record<string, string> = {
const mappedTypes = {
Cursor: 'query',
DeleteResult: 'delete',
InsertManyResult: 'insert',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Resources panel test suite', function () {

it('should render resources panel', function () {
render(<ResourcesPanel onClose={(): void => {}} />);
expect(() => screen.getByLabelText('Close')).to.not.throw;
expect(screen.getByLabelText('Close')).to.exist;
expect(screen.getAllByTestId(/link-\w+/)).to.have.length.greaterThan(0);
expect(
screen.getAllByTestId(/footer-feature-\w+/),
Expand Down
Loading