Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adopt dns result order changes VSCODE-458 #575

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions src/language/mongoDBService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
Diagnostic,
} from 'vscode-languageserver/node';
import { CliServiceProvider } from '@mongosh/service-provider-server';
import dns from 'node:dns';
import type { Document } from '@mongosh/service-provider-core';
import { getFilteredCompletions } from '@mongodb-js/mongodb-constants';
import parseSchema from 'mongodb-schema';
Expand All @@ -40,6 +41,10 @@ import LINKS from '../utils/links';

import DIAGNOSTIC_CODES from './diagnosticCodes';

// Adopting dns result order changes with Node v18 and vscode 1.82.0-insider update.
// Refs https://github.com/microsoft/vscode/issues/189805
dns.setDefaultResultOrder('ipv4first');
alenakhineika marked this conversation as resolved.
Show resolved Hide resolved

const PROJECT = '$project';

const GROUP = '$group';
Expand Down
5 changes: 5 additions & 0 deletions src/language/worker.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { CliServiceProvider } from '@mongosh/service-provider-server';
import dns from 'node:dns';
import { EJSON } from 'bson';
import { ElectronRuntime } from '@mongosh/browser-runtime-electron';
import { parentPort } from 'worker_threads';
import { ServerCommands } from './serverCommands';

// Adopting dns result order changes with Node v18 and vscode 1.82.0-insider update.
// Refs https://github.com/microsoft/vscode/issues/189805
dns.setDefaultResultOrder('ipv4first');

import type {
ShellEvaluateResult,
PlaygroundDebug,
Expand Down