Skip to content

Commit 67e9d63

Browse files
committed
fix(NODE-7306): Replace global process with import node:process
1 parent ae2e037 commit 67e9d63

File tree

91 files changed

+173
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+173
-14
lines changed

.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
{
5151
"name": "setInterval",
5252
"message": "Use `import { setInterval } from 'timers';` instead"
53+
},
54+
{
55+
"name": "process",
56+
"message": "Use `import * as process from 'node:process';` instead"
5357
}
5458
],
5559
"prettier/prettier": "error",
@@ -318,4 +322,4 @@
318322
}
319323
}
320324
]
321-
}
325+
}

src/client-side-encryption/state_machine.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import * as fs from 'fs/promises';
24
import { type MongoCryptContext, type MongoCryptKMSRequest } from 'mongodb-client-encryption';
35
import * as net from 'net';

src/cmap/auth/aws_temporary_credentials.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import { type AWSCredentials, getAwsCredentialProvider } from '../../deps';
24
import { MongoAWSError } from '../../error';
35

src/cmap/auth/gssapi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import * as dns from 'dns';
24

35
import { getKerberos, type Kerberos, type KerberosClient } from '../../deps';

src/cmap/auth/mongodb_oidc/k8s_machine_workflow.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import { readFile } from 'fs/promises';
24

35
import type { OIDCCallbackFunction, OIDCResponse } from '../mongodb_oidc';

src/cmap/auth/mongodb_oidc/token_machine_workflow.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import * as fs from 'fs';
24

35
import { MongoAWSError } from '../../../error';

src/cmap/connection_pool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import { clearTimeout, setTimeout } from 'timers';
24

35
import type { ObjectId } from '../bson';

src/connection_string.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import * as dns from 'dns';
24
import ConnectionString from 'mongodb-connection-string-url';
35
import { URLSearchParams } from 'url';

src/gridfs/upload.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import { Writable } from 'stream';
24

35
import { type Document, ObjectId } from '../bson';

src/mongo_logger.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as process from 'node:process';
2+
13
import { inspect } from 'util';
24

35
import {

0 commit comments

Comments
 (0)