Skip to content

Commit 97aac24

Browse files
authored
chore(deps): update driver dependencies to latest MONGOSH-1728 (#1851)
1 parent 7b7fa99 commit 97aac24

File tree

15 files changed

+2309
-2106
lines changed

15 files changed

+2309
-2106
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"find-up": "^5.0.0",
103103
"husky": "^8.0.3",
104104
"mocha": "^10.2.0",
105-
"mongodb": "^6.3.0",
105+
"mongodb": "^6.5.0",
106106
"mongodb-runner": "^5.4.6",
107107
"node-gyp": "^9.0.0",
108108
"nyc": "^15.1.0",

packages/arg-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
4747
"depcheck": "^1.4.3",
4848
"eslint": "^7.25.0",
49-
"mongodb": "^6.3.0",
49+
"mongodb": "^6.5.0",
5050
"prettier": "^2.8.8"
5151
}
5252
}

packages/browser-repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@babel/plugin-proposal-class-properties": "^7.8.3",
7070
"@babel/preset-react": "^7.18.6",
7171
"@babel/preset-typescript": "^7.18.6",
72-
"mongodb": "^6.3.0",
72+
"mongodb": "^6.5.0",
7373
"@mongodb-js/compass-components": "*",
7474
"@mongodb-js/compass-editor": "*",
7575
"@mongodb-js/eslint-config-mongosh": "^1.0.0",

packages/browser-runtime-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@mongodb-js/prettier-config-devtools": "^1.0.1",
4343
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
4444
"@mongosh/types": "0.0.0-dev.0",
45-
"bson": "^6.2.0",
45+
"bson": "^6.5.0",
4646
"depcheck": "^1.4.3",
4747
"eslint": "^7.25.0",
4848
"prettier": "^2.8.8",

packages/cli-repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"yargs-parser": "^20.2.4"
9191
},
9292
"devDependencies": {
93-
"mongodb": "^6.3.0",
93+
"mongodb": "^6.5.0",
9494
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
9595
"@mongodb-js/prettier-config-devtools": "^1.0.1",
9696
"@mongodb-js/sbom-tools": "^0.5.2",

packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"eslint": "^7.25.0",
4545
"lodash": "^4.17.21",
4646
"moment": "^2.29.1",
47-
"mongodb": "^6.3.0",
47+
"mongodb": "^6.5.0",
4848
"node-fetch": "^3.3.2",
4949
"prettier": "^2.8.8",
5050
"rimraf": "^3.0.2"

packages/e2e-tests/test/e2e-direct.spec.ts

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,32 +109,26 @@ describe('e2e direct connection', function () {
109109
shell.assertContainsOutput(`setName: '${replSetId}'`);
110110
});
111111

112-
it('fails to list collections without explicit readPreference', async function () {
112+
it('lists collections without explicit readPreference', async function () {
113113
const shell = TestShell.start({
114114
args: [`${await rs1.connectionString()}`],
115115
});
116116
await shell.waitForPrompt();
117117
await shell.executeLine('use admin');
118118
await shell.executeLine('db.runCommand({ listCollections: 1 })');
119-
shell.assertContainsError(
120-
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
121-
);
119+
shell.assertContainsOutput("name: 'system.version'");
122120
});
123121

124-
it('lists collections when readPreference is in the connection string', async function () {
122+
it('lists collections when an incompatible readPreference is provided', async function () {
125123
const shell = TestShell.start({
126-
args: [
127-
await rs1.connectionString({
128-
readPreference: 'secondaryPreferred',
129-
}),
130-
],
124+
args: [`${await rs1.connectionString()}`],
131125
});
132126
await shell.waitForPrompt();
133127
await shell.executeLine('use admin');
134-
await shell.executeLine('db.runCommand({ listCollections: 1 })');
135-
shell.assertContainsOutput(
136-
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
128+
await shell.executeLine(
129+
'db.runCommand({ listCollections: 1 }, { readPreference: "primary" })'
137130
);
131+
shell.assertContainsOutput("name: 'system.version'");
138132
});
139133

140134
it('lists collections when readPreference is set via Mongo', async function () {
@@ -147,34 +141,28 @@ describe('e2e direct connection', function () {
147141
'db.getMongo().setReadPref("secondaryPreferred")'
148142
);
149143
await shell.executeLine('db.runCommand({ listCollections: 1 })');
150-
shell.assertContainsOutput(
151-
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
152-
);
144+
shell.assertContainsOutput("name: 'system.version'");
153145
});
154146

155-
it('fails to list databases without explicit readPreference', async function () {
147+
it('slists databases without explicit readPreference', async function () {
156148
const shell = TestShell.start({
157149
args: [await rs1.connectionString()],
158150
});
159151
await shell.waitForPrompt();
160152
await shell.executeLine('use admin');
161153
await shell.executeLine('db.getMongo().getDBs()');
162-
shell.assertContainsError(
163-
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
164-
);
154+
shell.assertContainsOutput("name: 'admin'");
165155
});
166156

167-
it('lists databases when readPreference is in the connection string', async function () {
157+
it('lists databases when an incompatible readPreference is provided', async function () {
168158
const shell = TestShell.start({
169-
args: [
170-
await rs1.connectionString({
171-
readPreference: 'secondaryPreferred',
172-
}),
173-
],
159+
args: [await rs1.connectionString()],
174160
});
175161
await shell.waitForPrompt();
176162
await shell.executeLine('use admin');
177-
await shell.executeLine('db.getMongo().getDBs()');
163+
await shell.executeLine(
164+
'db.getMongo().getDBs({ readPreference: "primary" })'
165+
);
178166
shell.assertContainsOutput("name: 'admin'");
179167
});
180168

packages/node-runtime-worker-thread/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@mongosh/service-provider-core": "0.0.0-dev.0",
4343
"@mongosh/service-provider-server": "0.0.0-dev.0",
4444
"@mongosh/types": "0.0.0-dev.0",
45-
"bson": "^6.2.0",
45+
"bson": "^6.5.0",
4646
"depcheck": "^1.4.3",
4747
"eslint": "^7.25.0",
4848
"mocha": "^10.2.0",

packages/service-provider-core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
}
4444
},
4545
"dependencies": {
46-
"@aws-sdk/credential-providers": "^3.347.1",
46+
"@aws-sdk/credential-providers": "^3.525.0",
4747
"@mongosh/errors": "0.0.0-dev.0",
48-
"bson": "^6.2.0",
49-
"mongodb": "^6.3.0",
48+
"bson": "^6.5.0",
49+
"mongodb": "^6.5.0",
5050
"mongodb-build-info": "^1.7.1"
5151
},
5252
"optionalDependencies": {

0 commit comments

Comments
 (0)