Skip to content

Commit abdefbe

Browse files
committed
emphasize deprecation
1 parent 7e79b7f commit abdefbe

File tree

6 files changed

+143
-108
lines changed

6 files changed

+143
-108
lines changed

lib/admin.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ Admin.prototype.ping = function(options, callback) {
166166
* @param {string} username The username.
167167
* @param {string} password The password.
168168
* @param {object} [options] Optional settings.
169-
* @param {(number|string)} [options.w] The write concern.
170-
* @param {number} [options.wtimeout] The write concern timeout.
171-
* @param {boolean} [options.j=false] Specify a journal write concern.
172-
* @param {boolean} [options.fsync=false] Specify a file sync write concern.
169+
* @param {(number|string)} [options.w] DEPRECATED: The write concern. Use writeConcern instead.
170+
* @param {number} [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
171+
* @param {boolean} [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
172+
* @param {boolean} [options.fsync=false] DEPRECATED: Specify a file sync write concern. Use writeConcern instead.
173+
* @param {object|WriteConcern} [options.writeConcern] Specify write concern settings.
173174
* @param {object} [options.customData] Custom data associated with the user (only Mongodb 2.6 or higher)
174175
* @param {object[]} [options.roles] Roles associated with the created user (only Mongodb 2.6 or higher)
175176
* @param {ClientSession} [options.session] optional session to use for this operation
@@ -203,10 +204,11 @@ Admin.prototype.addUser = function(username, password, options, callback) {
203204
* @method
204205
* @param {string} username The username.
205206
* @param {object} [options] Optional settings.
206-
* @param {(number|string)} [options.w] The write concern.
207-
* @param {number} [options.wtimeout] The write concern timeout.
208-
* @param {boolean} [options.j=false] Specify a journal write concern.
209-
* @param {boolean} [options.fsync=false] Specify a file sync write concern.
207+
* @param {(number|string)} [options.w] DEPRECATED: The write concern. Use writeConcern instead.
208+
* @param {number} [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
209+
* @param {boolean} [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
210+
* @param {boolean} [options.fsync=false] DEPRECATED: Specify a file sync write concern. Use writeConcern instead.
211+
* @param {object|WriteConcern} [options.writeConcern] Specify write concern settings.
210212
* @param {ClientSession} [options.session] optional session to use for this operation
211213
* @param {Admin~resultCallback} [callback] The command result callback
212214
* @return {Promise} returns Promise if no callback passed

lib/bulk/common.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,11 @@ class BulkOperationBase {
11251125
* @method
11261126
* @param {WriteConcern} [_writeConcern] Optional write concern. Can also be specified through options.
11271127
* @param {object} [options] Optional settings.
1128-
* @param {(number|string)} [options.w] The write concern.
1129-
* @param {number} [options.wtimeout] The write concern timeout.
1130-
* @param {boolean} [options.j=false] Specify a journal write concern.
1131-
* @param {boolean} [options.fsync=false] Specify a file sync write concern.
1128+
* @param {(number|string)} [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1129+
* @param {number} [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1130+
* @param {boolean} [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1131+
* @param {boolean} [options.fsync=false] DEPRECATED: Specify a file sync write concern. Use writeConcern instead.
1132+
* @param {object|WriteConcern} [options.writeConcern] Specify write concern settings.
11321133
* @param {BulkOperationBase~resultCallback} [callback] A callback that will be invoked when bulkWrite finishes/errors
11331134
* @throws {MongoError} Throws error if the bulk object has already been executed
11341135
* @throws {MongoError} Throws error if the bulk object does not have any operations

0 commit comments

Comments
 (0)