Skip to content
Closed
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: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock.json linguist-vendored
package-lock.json -diff
2 changes: 1 addition & 1 deletion .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

runs-on: ${{ matrix.os }}
Expand Down
5,494 changes: 3,804 additions & 1,690 deletions package-lock.json

Large diffs are not rendered by default.

73 changes: 36 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1329,10 +1329,10 @@
"@mongosh/i18n": "^2.13.1",
"@mongosh/service-provider-node-driver": "^3.12.0",
"@mongosh/shell-api": "^3.13.0",
"@segment/analytics-node": "^1.3.0",
"@segment/analytics-node": "^2.2.1",
"bson": "^6.10.4",
"debug": "^4.3.7",
"dotenv": "^16.4.5",
"debug": "^4.4.1",
"dotenv": "^16.5.0",
"ejson-shell-parser": "^2.0.1",
"lodash": "^4.17.21",
"micromatch": "^4.0.8",
Expand All @@ -1350,57 +1350,56 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"ts-log": "^2.2.7",
"uuid": "^8.3.2",
"uuid": "^11.1.0",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12"
},
"devDependencies": {
"@babel/preset-typescript": "^7.25.7",
"@babel/types": "^7.25.8",
"@babel/preset-typescript": "^7.27.1",
"@babel/types": "^7.27.6",
"@mongodb-js/oidc-mock-provider": "^0.11.0",
"@mongodb-js/oidc-plugin": "^1.1.8",
"@mongodb-js/oidc-plugin": "^2.0.3",
"@mongodb-js/prettier-config-devtools": "^1.0.2",
"@mongodb-js/sbom-tools": "^0.8.1",
"@mongodb-js/signing-utils": "^0.4.0",
"@mongosh/service-provider-core": "^3.3.3",
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.5.2",
"@types/babel__traverse": "^7.20.6",
"@types/chai": "^4.3.20",
"@testing-library/user-event": "^14.6.1",
"@types/babel__traverse": "^7.20.7",
"@types/chai": "^5.2.2",
"@types/debug": "^4.1.12",
"@types/glob": "^7.2.0",
"@types/lodash": "^4.17.14",
"@types/glob": "^8.1.0",
"@types/lodash": "^4.17.17",
"@types/micromatch": "^4.0.9",
"@types/mkdirp": "^2.0.0",
"@types/mocha": "^8.2.3",
"@types/node": "^14.18.63",
"@types/mocha": "^10.0.10",
"@types/node": "^24.0.1",
"@types/prettier": "^2.7.3",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.25",
"@types/sinon": "^9.0.11",
"@types/sinon-chai": "^3.2.12",
"@types/uuid": "^8.3.4",
"@types/vscode": "^1.94.0",
"@types/sinon": "^17.0.4",
"@types/sinon-chai": "^4.0.0",
"@types/uuid": "^10.0.0",
"@types/vscode": "^1.101.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.2.0",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.5.0",
"buffer": "^6.0.3",
"chai": "^4.5.0",
"chai-as-promised": "^7.1.2",
"chai": "^5.2.0",
"chai-as-promised": "^8.0.1",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",
"crypto-browserify": "^3.12.1",
"depcheck": "^1.4.7",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"eslint": "^8.57.1",
"eslint-config-mongodb-js": "^5.0.3",
"eslint-plugin-mocha": "^10.5.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"glob": "^7.2.3",
"husky": "^9.1.6",
"jsdom": "^23.2.0",
"mkdirp": "^1.0.4",
"fork-ts-checker-webpack-plugin": "^9.1.0",
"glob": "^11.0.3",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"mkdirp": "^3.0.1",
"mocha": "^10.7.3",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi": "^1.1.7",
Expand All @@ -1416,19 +1415,19 @@
"prettier": "^3.5.3",
"process": "^0.11.10",
"rewiremock": "^3.14.5",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0",
"sinon": "^21.0.0",
"sinon-chai": "^4.0.0",
"source-map-support": "^0.5.21",
"stream-browserify": "^3.0.0",
"terser-webpack-plugin": "^5.3.10",
"ts-loader": "^9.5.1",
"terser-webpack-plugin": "^5.3.14",
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
"typescript": "^4.9.5",
"typescript": "^5.8.3",
"webfont": "^11.2.26",
"webpack": "^5.95.0",
"webpack": "^5.99.9",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.10.0",
"webpack-cli": "^6.0.1",
"webpack-merge": "^6.0.1",
"xvfb-maybe": "^0.2.1"
},
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-grammar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path';
import mkdirp from 'mkdirp';
import { mkdirp } from 'mkdirp';
import ora from 'ora';
import fs from 'fs';
import { promisify } from 'util';
Expand Down
2 changes: 1 addition & 1 deletion src/editors/memoryFileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class MemoryFileSystemProvider implements vscode.FileSystemProvider {

_emitter = new vscode.EventEmitter<vscode.FileChangeEvent[]>();
_bufferedEvents: vscode.FileChangeEvent[] = [];
_fireSoonHandle?: NodeJS.Timer;
_fireSoonHandle?: NodeJS.Timeout;

readonly onDidChangeFile: vscode.Event<vscode.FileChangeEvent[]> =
this._emitter.event;
Expand Down
20 changes: 10 additions & 10 deletions src/explorer/collectionTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ import SchemaTreeItem from './schemaTreeItem';
function getIconPath(
type: string,
isExpanded: boolean,
): { light: string; dark: string } {
): { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

if (type === CollectionTypes.timeseries) {
return {
light: path.join(LIGHT, 'collection-timeseries.svg'),
dark: path.join(DARK, 'collection-timeseries.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'collection-timeseries.svg')),
dark: vscode.Uri.file(path.join(DARK, 'collection-timeseries.svg')),
};
} else if (type === CollectionTypes.collection) {
if (isExpanded) {
return {
light: path.join(LIGHT, 'collection-folder-open.svg'),
dark: path.join(DARK, 'collection-folder-open.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'collection-folder-open.svg')),
dark: vscode.Uri.file(path.join(DARK, 'collection-folder-open.svg')),
};
}
return {
light: path.join(LIGHT, 'collection-folder-closed.svg'),
dark: path.join(DARK, 'collection-folder-closed.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'collection-folder-closed.svg')),
dark: vscode.Uri.file(path.join(DARK, 'collection-folder-closed.svg')),
};
}
return {
light: path.join(LIGHT, 'view-folder.svg'),
dark: path.join(DARK, 'view-folder.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'view-folder.svg')),
dark: vscode.Uri.file(path.join(DARK, 'view-folder.svg')),
};
}

Expand Down Expand Up @@ -81,7 +81,7 @@ export default class CollectionTreeItem

isDropped = false;

iconPath: { light: string; dark: string };
iconPath: { light: vscode.Uri; dark: vscode.Uri };

constructor({
collection,
Expand Down
12 changes: 6 additions & 6 deletions src/explorer/connectionTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ export type ConnectionItemContextValue = `${'disconnected' | 'connected'}${
| 'Preset'}ConnectionTreeItem`;

function getIconPath(isActiveConnection: boolean): {
light: string;
dark: string;
light: vscode.Uri;
dark: vscode.Uri;
} {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

return isActiveConnection
? {
light: path.join(LIGHT, 'connection-active.svg'),
dark: path.join(DARK, 'connection-active.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'connection-active.svg')),
dark: vscode.Uri.file(path.join(DARK, 'connection-active.svg')),
}
: {
light: path.join(LIGHT, 'connection-inactive.svg'),
dark: path.join(DARK, 'connection-inactive.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'connection-inactive.svg')),
dark: vscode.Uri.file(path.join(DARK, 'connection-inactive.svg')),
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/explorer/databaseTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import formatError from '../utils/formatError';
import { getImagesPath } from '../extensionConstants';
import type TreeItemParent from './treeItemParentInterface';

function getIconPath(): { light: string; dark: string } {
function getIconPath(): { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

return {
light: path.join(LIGHT, 'database.svg'),
dark: path.join(DARK, 'database.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'database.svg')),
dark: vscode.Uri.file(path.join(DARK, 'database.svg')),
};
}

Expand Down
8 changes: 4 additions & 4 deletions src/explorer/documentListTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export const formatDocCount = (count: number): string => {
return `${numeral(count).format('0a')}`.toUpperCase();
};

function getIconPath(): { light: string; dark: string } {
function getIconPath(): { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

return {
light: path.join(LIGHT, 'documents.svg'),
dark: path.join(DARK, 'documents.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'documents.svg')),
dark: vscode.Uri.file(path.join(DARK, 'documents.svg')),
};
}

Expand Down Expand Up @@ -113,7 +113,7 @@ export default class DocumentListTreeItem

isExpanded: boolean;

iconPath: { light: string; dark: string };
iconPath: { light: vscode.Uri; dark: vscode.Uri };

constructor({
collectionName,
Expand Down
8 changes: 4 additions & 4 deletions src/explorer/fieldTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function getFieldTypeString(field: SchemaFieldType): string {

function getIconPath(
field: SchemaFieldType,
): string | { light: string; dark: string } {
): string | { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

Expand All @@ -147,8 +147,8 @@ function getIconPath(
}

return {
light: path.join(LIGHT, 'schema', `${iconFileName}.svg`),
dark: path.join(DARK, 'schema', `${iconFileName}.svg`),
light: vscode.Uri.file(path.join(LIGHT, 'schema', `${iconFileName}.svg`)),
dark: vscode.Uri.file(path.join(DARK, 'schema', `${iconFileName}.svg`)),
};
}

Expand All @@ -173,7 +173,7 @@ export default class FieldTreeItem

isExpanded: boolean;

iconPath: string | { light: string; dark: string };
iconPath: string | { light: vscode.Uri; dark: vscode.Uri };

constructor({
field,
Expand Down
6 changes: 3 additions & 3 deletions src/explorer/helpTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const HELP_LINK_CONTEXT_VALUE = 'HELP_LINK';

function getIconPath(
iconName?: string,
): string | { light: string; dark: string } {
): string | { light: vscode.Uri; dark: vscode.Uri } {
if (!iconName || iconName === '') {
return '';
}
Expand All @@ -19,8 +19,8 @@ function getIconPath(
const DARK = path.join(getImagesPath(), 'dark');

return {
light: path.join(LIGHT, 'help', `${iconName}.svg`),
dark: path.join(DARK, 'help', `${iconName}.svg`),
light: vscode.Uri.file(path.join(LIGHT, 'help', `${iconName}.svg`)),
dark: vscode.Uri.file(path.join(DARK, 'help', `${iconName}.svg`)),
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/explorer/indexListTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import type TreeItemParent from './treeItemParentInterface';

const ITEM_LABEL = 'Indexes';

function getIconPath(): { light: string; dark: string } {
function getIconPath(): { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

return {
light: path.join(LIGHT, 'indexes.svg'),
dark: path.join(DARK, 'indexes.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'indexes.svg')),
dark: vscode.Uri.file(path.join(DARK, 'indexes.svg')),
};
}

Expand Down
8 changes: 4 additions & 4 deletions src/explorer/indexTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ function getIconNameForIndexKeyType(indexKeyType: IndexKeyType): string {
}

function getIndexFieldIconPath(indexKeyType: IndexKeyType): {
light: string;
dark: string;
light: vscode.Uri;
dark: vscode.Uri;
} {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

const iconName = getIconNameForIndexKeyType(indexKeyType);

return {
light: path.join(LIGHT, 'index', `${iconName}.svg`),
dark: path.join(DARK, 'index', `${iconName}.svg`),
light: vscode.Uri.file(path.join(LIGHT, 'index', `${iconName}.svg`)),
dark: vscode.Uri.file(path.join(DARK, 'index', `${iconName}.svg`)),
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/explorer/playgroundsTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { getImagesPath } from '../extensionConstants';

export const PLAYGROUND_ITEM = 'playgroundsTreeItem';

function getIconPath(): { light: string; dark: string } {
function getIconPath(): { light: vscode.Uri; dark: vscode.Uri } {
const LIGHT = path.join(getImagesPath(), 'light');
const DARK = path.join(getImagesPath(), 'dark');

return {
light: path.join(LIGHT, 'file-light.svg'),
dark: path.join(DARK, 'file-light.svg'),
light: vscode.Uri.file(path.join(LIGHT, 'file-light.svg')),
dark: vscode.Uri.file(path.join(DARK, 'file-light.svg')),
};
}

Expand Down
Loading
Loading