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
9 changes: 5 additions & 4 deletions src/cmap/connect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Socket, SocketConnectOpts } from 'net';
import * as net from 'net';
import type { ConnectionOptions as TLSConnectionOpts, TLSSocket } from 'tls';
import * as tls from 'tls';
import type { Socket, SocketConnectOpts } from 'node:net';
import * as net from 'node:net';
import { performance } from 'node:perf_hooks';
import type { ConnectionOptions as TLSConnectionOpts, TLSSocket } from 'node:tls';
import * as tls from 'node:tls';

import type { Document } from '../bson';
import { LEGACY_HELLO_COMMAND } from '../constants';
Expand Down
3 changes: 2 additions & 1 deletion src/timeout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { clearTimeout, setTimeout } from 'timers';
import { performance } from 'node:perf_hooks';
import { clearTimeout, setTimeout } from 'node:timers';

import { type Document } from './bson';
import { MongoInvalidArgumentError, MongoOperationTimeoutError, MongoRuntimeError } from './error';
Expand Down
6 changes: 4 additions & 2 deletions test/integration/client-side-encryption/driver.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import * as crypto from 'node:crypto';
import { performance } from 'node:perf_hooks';
import { setTimeout } from 'node:timers/promises';

import { type Binary, EJSON, UUID } from 'bson';
import { expect } from 'chai';
import * as crypto from 'crypto';
import * as sinon from 'sinon';
import { setTimeout } from 'timers/promises';

// eslint-disable-next-line @typescript-eslint/no-restricted-imports
import { ClientEncryption } from '../../../src/client-side-encryption/client_encryption';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/* Specification prose tests */

import { type ChildProcess, spawn } from 'node:child_process';
import * as os from 'node:os';
import * as path from 'node:path';
import { performance } from 'node:perf_hooks';
import { Readable } from 'node:stream';
import { pipeline } from 'node:stream/promises';

import { expect } from 'chai';
import * as os from 'os';
import * as path from 'path';
import * as semver from 'semver';
import * as sinon from 'sinon';
import { pipeline } from 'stream/promises';

import { type CommandStartedEvent } from '../../../mongodb';
import {
Expand Down
4 changes: 3 additions & 1 deletion test/integration/node-specific/auto_connect.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { once } from 'node:events';
import { performance } from 'node:perf_hooks';

import { expect } from 'chai';
import { once } from 'events';
import * as sinon from 'sinon';

import {
Expand Down