Skip to content

Commit 3bf91cd

Browse files
authored
Merge branch 'main' into NODE-7345
2 parents 38ff598 + 2b2366d commit 3bf91cd

15 files changed

Lines changed: 305 additions & 379 deletions

.evergreen/run-oidc-prose-tests.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,11 @@ if [ -z "${MONGODB_URI_SINGLE}" ]; then
1515
exit 1
1616
fi
1717

18-
if [ "$ENVIRONMENT" = "azure" ]; then
19-
npm run check:oidc-azure
20-
elif [ "$ENVIRONMENT" = "gcp" ]; then
21-
npm run check:oidc-gcp
22-
elif [ "$ENVIRONMENT" = "test" ]; then
18+
if [ "$ENVIRONMENT" = "test" ]; then
2319
if [ -z "${OIDC_TOKEN_FILE}" ]; then
2420
echo "Must specify OIDC_TOKEN_FILE"
2521
exit 1
2622
fi
27-
npm run check:oidc-test
28-
else
29-
if [ -z "${K8S_VARIANT}" ]; then
30-
echo "Must specify K8S_VARIANT"
31-
exit 1
32-
fi
33-
npm run check:oidc-k8s
3423
fi
24+
25+
npm run check:oidc-test

package-lock.json

Lines changed: 4 additions & 4 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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"@mongodb-js/saslprep": "^1.3.0",
29-
"bson": "^7.0.0",
29+
"bson": "^7.1.1",
3030
"mongodb-connection-string-url": "^7.0.0"
3131
},
3232
"peerDependencies": {
@@ -147,9 +147,6 @@
147147
"check:aws": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_aws.test.ts test/integration/auth/mongodb_aws.prose.test.ts",
148148
"check:oidc-auth": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts",
149149
"check:oidc-test": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc.prose.test.ts",
150-
"check:oidc-azure": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_azure.prose.05.test.ts",
151-
"check:oidc-gcp": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts",
152-
"check:oidc-k8s": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts",
153150
"check:kerberos": "nyc mocha --config test/manual/mocharc.js test/manual/kerberos.test.ts",
154151
"check:tls": "nyc mocha --config test/manual/mocharc.js test/manual/tls_support.test.ts",
155152
"check:ldap": "nyc mocha --config test/manual/mocharc.js test/manual/ldap.test.ts",

src/bson.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export {
2222
Long,
2323
MaxKey,
2424
MinKey,
25+
NumberUtils,
2526
ObjectId,
2627
type ObjectIdLike,
2728
serialize,

src/cmap/handshake/client_metadata.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as os from 'os';
22
import * as process from 'process';
33

4-
import { BSON, type Document, Int32 } from '../../bson';
4+
import { BSON, type Document, Int32, NumberUtils } from '../../bson';
55
import { MongoInvalidArgumentError } from '../../error';
66
import type { DriverInfo, MongoOptions } from '../../mongo_client';
77
import { fileIsAccessible } from '../../utils';
@@ -336,17 +336,18 @@ declare const Bun: { (): void; version?: string } | undefined;
336336
* with a future change to these global objects.
337337
*/
338338
function getRuntimeInfo(): string {
339+
const endianness = NumberUtils.isBigEndian ? 'BE' : 'LE';
339340
if ('Deno' in globalThis) {
340341
const version = typeof Deno?.version?.deno === 'string' ? Deno?.version?.deno : '0.0.0-unknown';
341342

342-
return `Deno v${version}, ${os.endianness()}`;
343+
return `Deno v${version}, ${endianness}`;
343344
}
344345

345346
if ('Bun' in globalThis) {
346347
const version = typeof Bun?.version === 'string' ? Bun?.version : '0.0.0-unknown';
347348

348-
return `Bun v${version}, ${os.endianness()}`;
349+
return `Bun v${version}, ${endianness}`;
349350
}
350351

351-
return `Node.js ${process.version}, ${os.endianness()}`;
352+
return `Node.js ${process.version}, ${endianness}`;
352353
}

src/sdam/server_selection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function sameServerSelector(description?: ServerDescription): ServerSelec
8888
* server potentially for a write on a secondary.
8989
*/
9090
export function secondaryWritableServerSelector(
91-
wireVersion?: number,
91+
wireVersion: number,
9292
readPreference?: ReadPreference
9393
): ServerSelector {
9494
// If server version < 5.0, read preference always primary.

src/sdam/topology.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
778778
return result;
779779
}
780780

781-
get commonWireVersion(): number | undefined {
781+
get commonWireVersion(): number {
782782
return this.description.commonWireVersion;
783783
}
784784

src/sdam/topology_description.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export class TopologyDescription {
192192

193193
// update common wire version
194194
if (serverDescription.maxWireVersion !== 0) {
195-
if (commonWireVersion == null) {
195+
if (commonWireVersion === 0) {
196196
commonWireVersion = serverDescription.maxWireVersion;
197197
} else {
198198
commonWireVersion = Math.min(commonWireVersion, serverDescription.maxWireVersion);

0 commit comments

Comments
 (0)