Skip to content

Commit

Permalink
chore(deps): update driver dependencies to latest MONGOSH-1728 (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Mar 13, 2024
1 parent 7b7fa99 commit 97aac24
Show file tree
Hide file tree
Showing 15 changed files with 2,309 additions and 2,106 deletions.
4,338 changes: 2,276 additions & 2,062 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"find-up": "^5.0.0",
"husky": "^8.0.3",
"mocha": "^10.2.0",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"mongodb-runner": "^5.4.6",
"node-gyp": "^9.0.0",
"nyc": "^15.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/arg-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"depcheck": "^1.4.3",
"eslint": "^7.25.0",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"prettier": "^2.8.8"
}
}
2 changes: 1 addition & 1 deletion packages/browser-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"@mongodb-js/compass-components": "*",
"@mongodb-js/compass-editor": "*",
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-runtime-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@mongosh/types": "0.0.0-dev.0",
"bson": "^6.2.0",
"bson": "^6.5.0",
"depcheck": "^1.4.3",
"eslint": "^7.25.0",
"prettier": "^2.8.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"yargs-parser": "^20.2.4"
},
"devDependencies": {
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/sbom-tools": "^0.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"eslint": "^7.25.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"node-fetch": "^3.3.2",
"prettier": "^2.8.8",
"rimraf": "^3.0.2"
Expand Down
42 changes: 15 additions & 27 deletions packages/e2e-tests/test/e2e-direct.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,32 +109,26 @@ describe('e2e direct connection', function () {
shell.assertContainsOutput(`setName: '${replSetId}'`);
});

it('fails to list collections without explicit readPreference', async function () {
it('lists collections without explicit readPreference', async function () {
const shell = TestShell.start({
args: [`${await rs1.connectionString()}`],
});
await shell.waitForPrompt();
await shell.executeLine('use admin');
await shell.executeLine('db.runCommand({ listCollections: 1 })');
shell.assertContainsError(
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
);
shell.assertContainsOutput("name: 'system.version'");
});

it('lists collections when readPreference is in the connection string', async function () {
it('lists collections when an incompatible readPreference is provided', async function () {
const shell = TestShell.start({
args: [
await rs1.connectionString({
readPreference: 'secondaryPreferred',
}),
],
args: [`${await rs1.connectionString()}`],
});
await shell.waitForPrompt();
await shell.executeLine('use admin');
await shell.executeLine('db.runCommand({ listCollections: 1 })');
shell.assertContainsOutput(
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
await shell.executeLine(
'db.runCommand({ listCollections: 1 }, { readPreference: "primary" })'
);
shell.assertContainsOutput("name: 'system.version'");
});

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

it('fails to list databases without explicit readPreference', async function () {
it('slists databases without explicit readPreference', async function () {
const shell = TestShell.start({
args: [await rs1.connectionString()],
});
await shell.waitForPrompt();
await shell.executeLine('use admin');
await shell.executeLine('db.getMongo().getDBs()');
shell.assertContainsError(
'MongoServerError[NotPrimaryNoSecondaryOk]: not primary'
);
shell.assertContainsOutput("name: 'admin'");
});

it('lists databases when readPreference is in the connection string', async function () {
it('lists databases when an incompatible readPreference is provided', async function () {
const shell = TestShell.start({
args: [
await rs1.connectionString({
readPreference: 'secondaryPreferred',
}),
],
args: [await rs1.connectionString()],
});
await shell.waitForPrompt();
await shell.executeLine('use admin');
await shell.executeLine('db.getMongo().getDBs()');
await shell.executeLine(
'db.getMongo().getDBs({ readPreference: "primary" })'
);
shell.assertContainsOutput("name: 'admin'");
});

Expand Down
2 changes: 1 addition & 1 deletion packages/node-runtime-worker-thread/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@mongosh/service-provider-core": "0.0.0-dev.0",
"@mongosh/service-provider-server": "0.0.0-dev.0",
"@mongosh/types": "0.0.0-dev.0",
"bson": "^6.2.0",
"bson": "^6.5.0",
"depcheck": "^1.4.3",
"eslint": "^7.25.0",
"mocha": "^10.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/service-provider-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
}
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.347.1",
"@aws-sdk/credential-providers": "^3.525.0",
"@mongosh/errors": "0.0.0-dev.0",
"bson": "^6.2.0",
"mongodb": "^6.3.0",
"bson": "^6.5.0",
"mongodb": "^6.5.0",
"mongodb-build-info": "^1.7.1"
},
"optionalDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/service-provider-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"@mongosh/service-provider-core": "0.0.0-dev.0",
"@mongosh/types": "0.0.0-dev.0",
"@types/sinon-chai": "^3.2.4",
"aws4": "^1.11.0",
"mongodb": "^6.3.0",
"aws4": "^1.12.0",
"mongodb": "^6.5.0",
"mongodb-connection-string-url": "^3.0.0",
"socks": "^2.7.3"
"socks": "^2.8.1"
},
"optionalDependencies": {
"kerberos": "^2.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/shell-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@mongosh/types": "0.0.0-dev.0",
"bson": "^6.2.0",
"bson": "^6.5.0",
"depcheck": "^1.4.3",
"eslint": "^7.25.0",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"prettier": "^2.8.8",
"semver": "^7.5.3"
}
Expand Down
1 change: 1 addition & 0 deletions packages/shell-api/src/shell-bson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ export default function constructShellBson(
'SUBTYPE_MD5',
'SUBTYPE_ENCRYPTED',
'SUBTYPE_COLUMN',
'SUBTYPE_SENSITIVE',
'SUBTYPE_USER_DEFINED',
])
),
Expand Down
2 changes: 1 addition & 1 deletion packages/snippet-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@mongosh/import-node-fetch": "0.0.0-dev.0",
"@mongosh/shell-api": "0.0.0-dev.0",
"@mongosh/types": "0.0.0-dev.0",
"bson": "^6.2.0",
"bson": "^6.5.0",
"cross-spawn": "^7.0.3",
"escape-string-regexp": "^4.0.0",
"joi": "^17.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"depcheck": "^1.4.3",
"eslint": "^7.25.0",
"mongodb": "^6.3.0",
"mongodb": "^6.5.0",
"prettier": "^2.8.8"
}
}

0 comments on commit 97aac24

Please sign in to comment.