Skip to content

Commit 536e6a1

Browse files
authored
chore(NODE-5247): update dependencies (#3657)
1 parent bf92d10 commit 536e6a1

29 files changed

+1742
-8305
lines changed

.evergreen/run-typescript.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function get_ts_version() {
3131
export TSC="./node_modules/typescript/bin/tsc"
3232
export TS_VERSION=$(get_ts_version)
3333

34-
npm install --no-save --force typescript@"$TS_VERSION"
34+
# On old versions of TS we need to put the node types back to 18.11.19
35+
npm install --no-save --force typescript@"$TS_VERSION" "$(if [[ $TS_VERSION == '4.1.6' ]]; then echo "@types/[email protected]"; else echo ""; fi)"
3536

3637
echo "Typescript $($TSC -v)"
3738

etc/clean_definition_files.cjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#! /usr/bin/env node
2+
/* eslint-disable @typescript-eslint/no-var-requires */
3+
const fs = require('fs');
4+
const path = require('path');
5+
6+
function* walk(root) {
7+
const directoryContents = fs.readdirSync(root);
8+
for (const filepath of directoryContents) {
9+
const fullPath = path.join(root, filepath);
10+
const stat = fs.statSync(fullPath);
11+
if (stat.isDirectory()) {
12+
yield* walk(fullPath);
13+
} else if (stat.isFile()) {
14+
yield fullPath;
15+
}
16+
}
17+
}
18+
19+
const libPath = path.resolve(__dirname, '..', 'lib');
20+
if (fs.existsSync(libPath)) {
21+
const definitionFiles = Array.from(walk(libPath)).filter(filePath => {
22+
return filePath.endsWith('.d.ts') || filePath.endsWith('.d.ts.map');
23+
});
24+
for (const definitionFile of definitionFiles) {
25+
fs.unlinkSync(definitionFile);
26+
}
27+
}

package-lock.json

Lines changed: 1658 additions & 8247 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,35 @@
2626
},
2727
"dependencies": {
2828
"bson": "^4.7.2",
29-
"mongodb-connection-string-url": "^2.5.4",
29+
"mongodb-connection-string-url": "^2.6.0",
3030
"socks": "^2.7.1"
3131
},
3232
"devDependencies": {
3333
"@iarna/toml": "^2.2.5",
3434
"@istanbuljs/nyc-config-typescript": "^1.0.2",
35-
"@microsoft/api-extractor": "^7.33.3",
35+
"@microsoft/api-extractor": "^7.34.7",
3636
"@microsoft/tsdoc-config": "^0.16.2",
37-
"@mongodb-js/zstd": "^1.0.0",
38-
"@types/chai": "^4.3.3",
37+
"@mongodb-js/zstd": "^1.1.0",
38+
"@types/chai": "^4.3.5",
3939
"@types/chai-subset": "^1.3.3",
40-
"@types/express": "^4.17.14",
40+
"@types/express": "^4.17.17",
4141
"@types/kerberos": "^1.1.1",
42-
"@types/mocha": "^10.0.0",
43-
"@types/node": "^18.11.0",
42+
"@types/mocha": "^10.0.1",
43+
"@types/node": "^18.16.3",
4444
"@types/saslprep": "^1.0.1",
45-
"@types/semver": "^7.3.12",
46-
"@types/sinon": "^10.0.13",
47-
"@types/sinon-chai": "^3.2.8",
45+
"@types/semver": "^7.3.13",
46+
"@types/sinon": "^10.0.14",
47+
"@types/sinon-chai": "^3.2.9",
4848
"@types/whatwg-url": "^11.0.0",
49-
"@typescript-eslint/eslint-plugin": "^5.40.0",
50-
"@typescript-eslint/parser": "^5.40.0",
49+
"@typescript-eslint/eslint-plugin": "^5.59.2",
50+
"@typescript-eslint/parser": "^5.59.2",
5151
"bluebird": "^3.7.2",
52-
"chai": "^4.3.6",
52+
"chai": "^4.3.7",
5353
"chai-subset": "^1.6.0",
5454
"chalk": "^4.1.2",
55-
"eslint": "^8.25.0",
56-
"eslint-config-prettier": "^8.5.0",
57-
"eslint-plugin-import": "^2.26.0",
55+
"eslint": "^8.39.0",
56+
"eslint-config-prettier": "^8.8.0",
57+
"eslint-plugin-import": "^2.27.5",
5858
"eslint-plugin-prettier": "^4.2.1",
5959
"eslint-plugin-simple-import-sort": "^8.0.0",
6060
"eslint-plugin-tsdoc": "^0.2.17",
@@ -63,20 +63,18 @@
6363
"mocha": "^9.2.2",
6464
"mocha-sinon": "^2.1.2",
6565
"nyc": "^15.1.0",
66-
"prettier": "^2.7.1",
67-
"rimraf": "^3.0.2",
68-
"semver": "^7.3.8",
66+
"prettier": "^2.8.8",
67+
"semver": "^7.5.0",
6968
"sinon": "^13.0.1",
7069
"sinon-chai": "^3.7.0",
7170
"source-map-support": "^0.5.21",
7271
"standard-version": "^9.5.0",
7372
"ts-node": "^10.9.1",
74-
"tsd": "^0.24.1",
73+
"tsd": "^0.27.0",
7574
"typescript": "^4.8.4",
7675
"typescript-cached-transpile": "^0.0.6",
7776
"v8-heapsnapshot": "^1.2.0",
78-
"xml2js": "^0.4.23",
79-
"yargs": "^17.6.0"
77+
"yargs": "^17.7.2"
8078
},
8179
"license": "Apache-2.0",
8280
"engines": {
@@ -93,7 +91,7 @@
9391
"scripts": {
9492
"build:evergreen": "node .evergreen/generate_evergreen_tasks.js",
9593
"build:ts": "node ./node_modules/typescript/bin/tsc",
96-
"build:dts": "npm run build:ts && api-extractor run && rimraf 'lib/**/*.d.ts*'",
94+
"build:dts": "npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs",
9795
"build:docs": "./etc/docs/build.ts",
9896
"build:typedoc": "typedoc",
9997
"check:bench": "node test/benchmarks/driverBench",

src/bulk/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const BatchType = Object.freeze({
4747
} as const);
4848

4949
/** @public */
50-
export type BatchType = typeof BatchType[keyof typeof BatchType];
50+
export type BatchType = (typeof BatchType)[keyof typeof BatchType];
5151

5252
/** @public */
5353
export interface InsertOneModel<TSchema extends Document = Document> {

src/cmap/auth/gssapi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const GSSAPICanonicalizationValue = Object.freeze({
2323

2424
/** @public */
2525
export type GSSAPICanonicalizationValue =
26-
typeof GSSAPICanonicalizationValue[keyof typeof GSSAPICanonicalizationValue];
26+
(typeof GSSAPICanonicalizationValue)[keyof typeof GSSAPICanonicalizationValue];
2727

2828
type MechanismProperties = {
2929
/** @deprecated use `CANONICALIZE_HOST_NAME` instead */

src/cmap/auth/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const AuthMechanism = Object.freeze({
1111
} as const);
1212

1313
/** @public */
14-
export type AuthMechanism = typeof AuthMechanism[keyof typeof AuthMechanism];
14+
export type AuthMechanism = (typeof AuthMechanism)[keyof typeof AuthMechanism];
1515

1616
/** @internal */
1717
export const AUTH_MECHS_AUTH_SRC_EXTERNAL = new Set<AuthMechanism>([

src/cmap/connect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ function parseSslOptions(options: MakeConnectionOptions): TLSConnectionOpts {
348348
}
349349

350350
const SOCKET_ERROR_EVENT_LIST = ['error', 'close', 'timeout', 'parseError'] as const;
351-
type ErrorHandlerEventName = typeof SOCKET_ERROR_EVENT_LIST[number] | 'cancel';
351+
type ErrorHandlerEventName = (typeof SOCKET_ERROR_EVENT_LIST)[number] | 'cancel';
352352
const SOCKET_ERROR_EVENTS = new Set(SOCKET_ERROR_EVENT_LIST);
353353

354354
function makeConnection(options: MakeConnectionOptions, _callback: Callback<Stream>) {

src/cmap/connection_pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export type ConnectionPoolEvents = {
138138
*/
139139
export class ConnectionPool extends TypedEventEmitter<ConnectionPoolEvents> {
140140
options: Readonly<ConnectionPoolOptions>;
141-
[kPoolState]: typeof PoolState[keyof typeof PoolState];
141+
[kPoolState]: (typeof PoolState)[keyof typeof PoolState];
142142
[kServer]: Server;
143143
[kLogger]: Logger;
144144
[kConnections]: List<Connection>;

src/cmap/wire_protocol/compression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const Compressor = Object.freeze({
1515
} as const);
1616

1717
/** @public */
18-
export type Compressor = typeof Compressor[CompressorName];
18+
export type Compressor = (typeof Compressor)[CompressorName];
1919

2020
/** @public */
2121
export type CompressorName = keyof typeof Compressor;

0 commit comments

Comments
 (0)