mongodb-legacy
Advanced tools
Comparing version
{ | ||
"name": "mongodb-legacy", | ||
"description": "The legacy MongoDB driver with callback support for Node.js", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"files": [ | ||
@@ -12,6 +12,6 @@ "src", | ||
"engines": { | ||
"node": ">=14.20.1" | ||
"node": ">=16.20.1" | ||
}, | ||
"dependencies": { | ||
"mongodb": "^5.0.0" | ||
"mongodb": "^6.0.0" | ||
}, | ||
@@ -42,12 +42,13 @@ "scripts": { | ||
"devDependencies": { | ||
"@microsoft/api-extractor-model": "^7.23.1", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"@typescript-eslint/parser": "^5.33.0", | ||
"chai": "^4.3.6", | ||
"eslint-config-prettier": "^8.5.0", | ||
"@microsoft/api-extractor-model": "^7.27.6", | ||
"@octokit/core": "^4.2.4", | ||
"@typescript-eslint/eslint-plugin": "^5.59.2", | ||
"@typescript-eslint/parser": "^5.59.2", | ||
"chai": "^4.3.7", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"mocha": "^10.0.0", | ||
"mocha": "^10.2.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.7.1", | ||
"sinon": "^14.0.0", | ||
"prettier": "^2.8.8", | ||
"sinon": "^15.2.0", | ||
"sinon-chai": "^3.7.0", | ||
@@ -57,4 +58,4 @@ "source-map-support": "^0.5.21", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.7.4" | ||
"typescript": "^5.0.4" | ||
} | ||
} |
@@ -70,6 +70,15 @@ # MongoDB Node.js Driver with Optional Callback Support Legacy Package | ||
The next major release of the driver (v5) will drop support for callbacks. | ||
This package will also have a major release at that time to update the dependency requirement to `^5.0.0`. | ||
Users can expect to be able to upgrade to `v5` adopting the changes and features shipped in that version while using this module to maintain any callback code they still need to work on migrating. | ||
Users can expect to be able to upgrade to `v5` or later adopting the changes and features shipped in that version while using this module to maintain any callback code they still need to work on migrating. | ||
#### MongoDB Node.js Driver Version Compatibility Table | ||
The following version combinations with the [MongoDB Node.js Driver](https://github.com/mongodb/node-mongodb-native) are considered stable. | ||
| | `mongodb-legacy@4.x` | `mongodb-legacy@5.x` | `mongodb-legacy@6.x` | | ||
| ------------- | -------------------- | -------------------- | -------------------- | | ||
| `mongodb@6.x` | N/A | N/A | ✓ | | ||
| `mongodb@5.x` | N/A | ✓ | N/A | | ||
| `mongodb@4.x` | ✓ | N/A | N/A | | ||
| `mongodb@3.x` | N/A | N/A | N/A | | ||
## [API](https://mongodb.github.io/node-mongodb-native/) | ||
@@ -76,0 +85,0 @@ |
@@ -10,21 +10,2 @@ 'use strict'; | ||
class LegacyAdmin extends baseClass { | ||
addUser(username, password, options, callback) { | ||
callback = | ||
typeof callback === 'function' | ||
? callback | ||
: typeof options === 'function' | ||
? options | ||
: typeof password === 'function' | ||
? password | ||
: undefined; | ||
options = | ||
options != null && typeof options === 'object' | ||
? options | ||
: password != null && typeof password === 'object' | ||
? password | ||
: undefined; | ||
password = typeof password === 'string' ? password : undefined; | ||
return maybeCallback(super.addUser(username, password, options), callback); | ||
} | ||
buildInfo(options, callback) { | ||
@@ -31,0 +12,0 @@ callback = |
@@ -310,13 +310,2 @@ 'use strict'; | ||
stats(options, callback) { | ||
callback = | ||
typeof callback === 'function' | ||
? callback | ||
: typeof options === 'function' | ||
? options | ||
: undefined; | ||
options = typeof options !== 'function' ? options : undefined; | ||
return maybeCallback(super.stats(options), callback); | ||
} | ||
updateMany(filter, update, options, callback) { | ||
@@ -323,0 +312,0 @@ callback = |
@@ -21,22 +21,2 @@ 'use strict'; | ||
// Async APIs | ||
addUser(username, password, options, callback) { | ||
callback = | ||
typeof callback === 'function' | ||
? callback | ||
: typeof options === 'function' | ||
? options | ||
: typeof password === 'function' | ||
? password | ||
: undefined; | ||
options = | ||
options != null && typeof options === 'object' | ||
? options | ||
: password != null && typeof password === 'object' | ||
? password | ||
: undefined; | ||
password = typeof password === 'string' ? password : undefined; | ||
return maybeCallback(super.addUser(username, password, options), callback); | ||
} | ||
removeUser(username, options, callback) { | ||
@@ -43,0 +23,0 @@ callback = |
Sorry, the diff of this file is too big to display
126
7.69%119705
-2.76%16
6.67%2290
-3.86%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated