Skip to content

Commit 1d3cc9a

Browse files
committed
chore: bump various deps to latest
1 parent 0d6cf7a commit 1d3cc9a

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-wp-proxy",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A logging mongodb wire protocol proxy",
55
"keywords": [
66
"mongodb",
@@ -33,21 +33,19 @@
3333
],
3434
"scripts": {
3535
"lint": "eslint {src,test}/**/*.ts",
36-
"pretestonly": "mongodb-runner start --port=27018",
37-
"posttestonly": "mongodb-runner stop --port=27018",
38-
"testonly": "nyc mocha --colors -r ts-node/register test/*.ts",
36+
"testonly": "mongodb-runner exec -t standalone -- nyc mocha --colors -r ts-node/register test/*.ts",
3937
"test": "npm run lint && npm run build && npm run testonly",
4038
"build": "npm run compile-ts && gen-esm-wrapper . ./.esm-wrapper.mjs",
4139
"prepack": "npm run build",
4240
"compile-ts": "tsc -p tsconfig.json"
4341
},
4442
"license": "Apache-2.0",
4543
"dependencies": {
46-
"bson": "^4.4.1"
44+
"bson": "^6.10.4"
4745
},
4846
"devDependencies": {
4947
"@types/mocha": "^8.0.3",
50-
"@types/node": "^16.4.10",
48+
"@types/node": "^24.3.0",
5149
"@typescript-eslint/eslint-plugin": "^5.30.7",
5250
"@typescript-eslint/parser": "^5.30.7",
5351
"eslint": "^7.9.0",
@@ -59,10 +57,10 @@
5957
"eslint-plugin-standard": "^4.0.1",
6058
"gen-esm-wrapper": "^1.1.0",
6159
"mocha": "^8.1.3",
62-
"mongodb": "^4.0.1",
63-
"mongodb-runner": "^4.8.3",
60+
"mongodb": "^6.19.0",
61+
"mongodb-runner": "^5.9.2",
6462
"nyc": "^15.1.0",
65-
"ts-node": "^10.9.1",
66-
"typescript": "^4.7.4"
63+
"ts-node": "^10.9.2",
64+
"typescript": "^5.9.2"
6765
}
6866
}

test/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ import { EJSON } from 'bson';
66
import path from 'path';
77
import { once } from 'events';
88

9+
let hostport: string;
10+
before(() => {
11+
if (!process.env.MONGODB_HOSTPORT) {
12+
throw new Error('MONGODB_HOSTPORT not set');
13+
}
14+
hostport = process.env.MONGODB_HOSTPORT;
15+
});
16+
917
describe('Proxy', function() {
1018
this.timeout(10_000);
1119

@@ -16,9 +24,9 @@ describe('Proxy', function() {
1624

1725
beforeEach(async() => {
1826
events = [];
19-
proxy = new Proxy({ host: 'localhost', port: 27018 });
27+
proxy = new Proxy({ host: hostport.split(':')[0], port: +hostport.split(':')[1] });
2028
proxy.on('newConnection', (conn: any) => {
21-
conn.on('connectionEnded', (source: string) => events.push({ ev: 'connecionEnded', source }));
29+
conn.on('connectionEnded', (source: string) => events.push({ ev: 'connectionEnded', source }));
2230
conn.on('connectionError', (source: string, err: Error) => events.push({ ev: 'connectionError', source, err }));
2331
conn.on('message', (source: string, msg: any) => events.push({ ev: 'message', source, msg }));
2432
conn.on('parseError', (source: string, err: Error) => events.push({ ev: 'parseError', source, err }));
@@ -62,7 +70,7 @@ describe('bin', function() {
6270
proc = childProcess.spawn('ts-node', [
6371
'-P', path.join(__dirname, '..', 'tsconfig.json'),
6472
path.join(__dirname, '..', 'src', 'cli.ts'),
65-
'localhost:27018', 'localhost:0'
73+
hostport, 'localhost:0'
6674
], { stdio: 'pipe' });
6775
port = 0;
6876
await new Promise<void>((resolve) => {
@@ -107,7 +115,7 @@ describe('bin', function() {
107115
'-P', path.join(__dirname, '..', 'tsconfig.json'),
108116
path.join(__dirname, '..', 'src', 'cli.ts'),
109117
'--ndjson',
110-
'localhost:27018', 'localhost:0'
118+
hostport, 'localhost:0'
111119
], { stdio: 'pipe' });
112120
port = 0;
113121
await new Promise<void>((resolve) => {

0 commit comments

Comments
 (0)