Skip to content

Commit 42bbfd2

Browse files
docs(NODE-6413): update rst references to md (mongodb#4282)
Co-authored-by: Aditi Khare <[email protected]>
1 parent 678e932 commit 42bbfd2

File tree

28 files changed

+26
-4925
lines changed

28 files changed

+26
-4925
lines changed

src/cmap/auth/mongo_credentials.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import { GSSAPICanonicalizationValue } from './gssapi';
1010
import type { OIDCCallbackFunction } from './mongodb_oidc';
1111
import { AUTH_MECHS_AUTH_SRC_EXTERNAL, AuthMechanism } from './providers';
1212

13-
// https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst
13+
/**
14+
* @see https://github.com/mongodb/specifications/blob/master/source/auth/auth.md
15+
*/
1416
function getDefaultAuthMechanism(hello: Document | null): AuthMechanism {
1517
if (hello) {
1618
// If hello contains saslSupportedMechs, use scram-sha-256

src/cmap/auth/mongodb_aws.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class MongoDBAWS extends AuthProvider {
107107

108108
if (!ByteUtils.equals(serverNonce.subarray(0, nonce.byteLength), nonce)) {
109109
// throw because the serverNonce's leading 32 bytes must equal the client nonce's 32 bytes
110-
// https://github.com/mongodb/specifications/blob/875446db44aade414011731840831f38a6c668df/source/auth/auth.rst#id11
110+
// https://github.com/mongodb/specifications/blob/master/source/auth/auth.md#conversation-5
111111

112112
// TODO(NODE-3483)
113113
throw new MongoRuntimeError('Server nonce does not begin with client nonce');

src/cmap/handshake/client_metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const NODE_DRIVER_VERSION = require('../../../package.json').version;
1111

1212
/**
1313
* @public
14-
* @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#hello-command
14+
* @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md#hello-command
1515
*/
1616
export interface ClientMetadata {
1717
driver: {

src/error.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ const kErrorLabels = Symbol('errorLabels');
1616
/**
1717
* @internal
1818
* The legacy error message from the server that indicates the node is not a writable primary
19-
* https://github.com/mongodb/specifications/blob/b07c26dc40d04ac20349f989db531c9845fdd755/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-writable-primary-and-node-is-recovering
19+
* https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
2020
*/
2121
export const LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE = new RegExp('not master', 'i');
2222

2323
/**
2424
* @internal
2525
* The legacy error message from the server that indicates the node is not a primary or secondary
26-
* https://github.com/mongodb/specifications/blob/b07c26dc40d04ac20349f989db531c9845fdd755/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-writable-primary-and-node-is-recovering
26+
* https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
2727
*/
2828
export const LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE = new RegExp(
2929
'not master or secondary',
@@ -33,7 +33,7 @@ export const LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE = new RegExp(
3333
/**
3434
* @internal
3535
* The error message from the server that indicates the node is recovering
36-
* https://github.com/mongodb/specifications/blob/b07c26dc40d04ac20349f989db531c9845fdd755/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-writable-primary-and-node-is-recovering
36+
* https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
3737
*/
3838
export const NODE_IS_RECOVERING_ERROR_MESSAGE = new RegExp('node is recovering', 'i');
3939

@@ -69,7 +69,7 @@ export const MONGODB_ERROR_CODES = Object.freeze({
6969
ReadConcernMajorityNotAvailableYet: 134
7070
} as const);
7171

72-
// From spec@https://github.com/mongodb/specifications/blob/f93d78191f3db2898a59013a7ed5650352ef6da8/source/change-streams/change-streams.rst#resumable-error
72+
// From spec https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/change-streams/change-streams.md#resumable-error
7373
export const GET_MORE_RESUMABLE_CODES = new Set<number>([
7474
MONGODB_ERROR_CODES.HostUnreachable,
7575
MONGODB_ERROR_CODES.HostNotFound,
@@ -1303,7 +1303,7 @@ export class MongoWriteConcernError extends MongoServerError {
13031303
}
13041304
}
13051305

1306-
// https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst#retryable-error
1306+
// https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.md#retryable-error
13071307
const RETRYABLE_READ_ERROR_CODES = new Set<number>([
13081308
MONGODB_ERROR_CODES.HostUnreachable,
13091309
MONGODB_ERROR_CODES.HostNotFound,
@@ -1320,7 +1320,7 @@ const RETRYABLE_READ_ERROR_CODES = new Set<number>([
13201320
MONGODB_ERROR_CODES.ReadConcernMajorityNotAvailableYet
13211321
]);
13221322

1323-
// see: https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst#terms
1323+
// see: https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.md#terms
13241324
const RETRYABLE_WRITE_ERROR_CODES = RETRYABLE_READ_ERROR_CODES;
13251325

13261326
export function needsRetryableWriteLabel(
@@ -1457,7 +1457,7 @@ export function isNodeShuttingDownError(err: MongoError): boolean {
14571457
* then the pool will be cleared, and server state will completely reset
14581458
* locally.
14591459
*
1460-
* @see https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-master-and-node-is-recovering
1460+
* @see https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering
14611461
*/
14621462
export function isSDAMUnrecoverableError(error: MongoError): boolean {
14631463
// NOTE: null check is here for a strictly pre-CMAP world, a timeout or

src/mongo_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC
251251
*
252252
* @remarks
253253
* Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error
254-
* (see [libmongocrypt: Auto Encryption Allow-List](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#libmongocrypt-auto-encryption-allow-list)). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.
254+
* (see [libmongocrypt: Auto Encryption Allow-List](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md#libmongocrypt-auto-encryption-allow-list)). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.
255255
*
256256
* Automatic encryption requires the authenticated user to have the [listCollections privilege action](https://www.mongodb.com/docs/manual/reference/command/listCollections/#dbcmd.listCollections).
257257
*

src/read_concern.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class ReadConcern {
3131
* A spec test exists that allows level to be any string.
3232
* "invalid readConcern with out stage"
3333
* @see ./test/spec/crud/v2/aggregate-out-readConcern.json
34-
* @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#unknown-levels-and-additional-options-for-string-based-readconcerns
34+
* @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.md#unknown-levels-and-additional-options-for-string-based-readconcerns
3535
*/
3636
this.level = ReadConcernLevel[level] ?? level;
3737
}

src/sdam/server_description.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ export class ServerDescription {
159159
}
160160

161161
/**
162-
* Determines if another `ServerDescription` is equal to this one per the rules defined
163-
* in the {@link https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#serverdescription|SDAM spec}
162+
* Determines if another `ServerDescription` is equal to this one per the rules defined in the SDAM specification.
163+
* @see https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md
164164
*/
165165
equals(other?: ServerDescription | null): boolean {
166166
// Despite using the comparator that would determine a nullish topologyVersion as greater than

src/sdam/server_selection.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export function secondaryWritableServerSelector(
7575

7676
/**
7777
* Reduces the passed in array of servers by the rules of the "Max Staleness" specification
78-
* found here: https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.rst
78+
* found here:
79+
*
80+
* @see https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.md
7981
*
8082
* @param readPreference - The read preference providing max staleness guidance
8183
* @param topologyDescription - The topology description
@@ -212,7 +214,8 @@ function tagSetReducer(
212214
/**
213215
* Reduces a list of servers to ensure they fall within an acceptable latency window. This is
214216
* further specified in the "Server Selection" specification, found here:
215-
* https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst
217+
*
218+
* @see https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md
216219
*
217220
* @param topologyDescription - The topology description
218221
* @param servers - The list of servers to reduce

src/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,8 +1097,11 @@ export function shuffle<T>(sequence: Iterable<T>, limit = 0): Array<T> {
10971097
return limit % items.length === 0 ? items : items.slice(lowerBound);
10981098
}
10991099

1100-
// TODO(NODE-4936): read concern eligibility for commands should be codified in command construction
1101-
// @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#read-concern
1100+
/**
1101+
* TODO(NODE-4936): read concern eligibility for commands should be codified in command construction
1102+
* @internal
1103+
* @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.md#read-concern
1104+
*/
11021105
export function commandSupportsReadConcern(command: Document): boolean {
11031106
if (command.aggregate || command.count || command.distinct || command.find || command.geoNear) {
11041107
return true;

test/spec/auth/README.rst

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)