@deliverysolutions/mongoat
Advanced tools
Comparing version 2.1.7 to 3.0.1-beta.0
{ | ||
"name": "@deliverysolutions/mongoat", | ||
"version": "2.1.7", | ||
"version": "3.0.1-beta.0", | ||
"description": "Mongoat is a MongoDb ODM", | ||
@@ -15,3 +15,2 @@ "keywords": [ | ||
"scripts": { | ||
"pretest": "jshint .", | ||
"test": "jasmine", | ||
@@ -32,3 +31,3 @@ "cover": "istanbul cover ./node_modules/.bin/jasmine", | ||
"lodash": "^4.0.0", | ||
"mongodb": "^3.5.7" | ||
"mongodb": "^4.2.0" | ||
}, | ||
@@ -40,2 +39,3 @@ "devDependencies": { | ||
"jsdoc": "^3.4.0", | ||
"jshint": "^2.13.1", | ||
"minami": "^1.1.1" | ||
@@ -42,0 +42,0 @@ }, |
@@ -15,5 +15,6 @@ 'use strict'; | ||
mongoat.MongoClient.connect('mongodb://localhost:27017/mongoatTest') | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
.then(function (client) { | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -41,6 +42,6 @@ .then(function () { | ||
.then(function () { | ||
_this.testDb.dropDatabase(); | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
.then(function () { | ||
_this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -47,0 +48,0 @@ .then(done); |
@@ -15,5 +15,6 @@ 'use strict'; | ||
mongoat.MongoClient.connect('mongodb://localhost:27017/mongoatTest') | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
.then(function (client) { | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -46,6 +47,6 @@ .then(function () { | ||
.then(function () { | ||
_this.testDb.dropDatabase(); | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
.then(function () { | ||
_this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -64,8 +65,7 @@ .then(done); | ||
expect(typeof mongObject).toBe('object'); | ||
expect(typeof mongObject.result).toBe('object'); | ||
expect(mongObject.result.ok).toBe(1); | ||
expect(mongObject.result.n).toBe(1); | ||
expect(mongObject.insertedCount).toBe(1); | ||
expect(mongObject.acknowledged).toBe(true); | ||
done(); | ||
}); | ||
}); | ||
}) | ||
@@ -82,5 +82,4 @@ // test insert without hooks | ||
expect(typeof mongObject).toBe('object'); | ||
expect(typeof mongObject.result).toBe('object'); | ||
expect(mongObject.result.ok).toBe(1); | ||
expect(mongObject.result.n).toBe(1); | ||
expect(mongObject.insertedCount).toBe(1); | ||
expect(mongObject.acknowledged).toBe(true); | ||
done(); | ||
@@ -124,10 +123,2 @@ }); | ||
document.email = 'khatal.yacine@gmail.com'; | ||
return document; | ||
}); | ||
_this.testCol.before('insert', function (document) { | ||
expect(document.firstName).toBe('Yacine'); | ||
expect(document.lastName).toBe('KHATAL'); | ||
expect(document.age).toBe(25); | ||
expect(document.email).toBe('khatal.yacine@gmail.com'); | ||
document.company = 'Dial Once'; | ||
@@ -139,19 +130,13 @@ return document; | ||
_this.testCol.after('insert', function (mongObject) { | ||
expect(mongObject.ops[0].firstName).toBe('Yacine'); | ||
expect(mongObject.ops[0].lastName).toBe('KHATAL'); | ||
expect(mongObject.ops[0].age).toBe(25); | ||
expect(mongObject.ops[0].email).toBe('khatal.yacine@gmail.com'); | ||
expect(mongObject.ops[0].company).toBe('Dial Once'); | ||
return mongObject; | ||
_this.testCol.findOne({ _id : mongObject.insertedIds['0'] }) | ||
.then((insertedObj) => { | ||
expect(insertedObj.firstName).toBe('Yacine'); | ||
expect(insertedObj.lastName).toBe('KHATAL'); | ||
expect(insertedObj.age).toBe(25); | ||
expect(insertedObj.email).toBe('khatal.yacine@gmail.com'); | ||
expect(insertedObj.company).toBe('Dial Once'); | ||
return mongObject; | ||
}) | ||
}); | ||
_this.testCol.after('insert', function (mongObject) { | ||
expect(mongObject.ops[0].firstName).toBe('Yacine'); | ||
expect(mongObject.ops[0].lastName).toBe('KHATAL'); | ||
expect(mongObject.ops[0].age).toBe(25); | ||
expect(mongObject.ops[0].email).toBe('khatal.yacine@gmail.com'); | ||
expect(mongObject.ops[0].company).toBe('Dial Once'); | ||
return mongObject; | ||
}); | ||
_this.testCol.insert({ | ||
@@ -164,10 +149,4 @@ firstName: 'Yacine', | ||
expect(typeof mongObject).toBe('object'); | ||
expect(typeof mongObject.result).toBe('object'); | ||
expect(mongObject.result.ok).toBe(1); | ||
expect(mongObject.result.n).toBe(1); | ||
expect(mongObject.ops[0].firstName).toBe('Yacine'); | ||
expect(mongObject.ops[0].lastName).toBe('KHATAL'); | ||
expect(mongObject.ops[0].age).toBe(25); | ||
expect(mongObject.ops[0].email).toBe('khatal.yacine@gmail.com'); | ||
expect(mongObject.ops[0].company).toBe('Dial Once'); | ||
expect(mongObject.insertedCount).toBe(1); | ||
expect(mongObject.acknowledged).toBe(true); | ||
}) | ||
@@ -174,0 +153,0 @@ .then(done); |
@@ -16,4 +16,5 @@ 'use strict'; | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -35,6 +36,6 @@ .then(function () { | ||
.then(function () { | ||
_this.testDb.dropDatabase(); | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
.then(function () { | ||
_this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -41,0 +42,0 @@ .then(done); |
@@ -16,4 +16,5 @@ 'use strict'; | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -45,6 +46,6 @@ .then(function () { | ||
.then(function () { | ||
_this.testDb.dropDatabase(); | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
.then(function () { | ||
_this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -51,0 +52,0 @@ .then(done); |
@@ -15,4 +15,5 @@ 'use strict'; | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -146,3 +147,3 @@ .then(function () { | ||
.then(function () { | ||
return _this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -149,0 +150,0 @@ .then(done); |
@@ -17,4 +17,5 @@ 'use strict'; | ||
.then(function (db) { | ||
_this.testDb = db; | ||
return db.dropDatabase(); | ||
_this.testDb = client.db('mongoatTest'); | ||
_this.client = client; | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
@@ -59,6 +60,6 @@ .then(function () { | ||
.then(function () { | ||
_this.testDb.dropDatabase(); | ||
return _this.testDb.dropDatabase(); | ||
}) | ||
.then(function () { | ||
_this.testDb.close(); | ||
return _this.client.close(); | ||
}) | ||
@@ -65,0 +66,0 @@ .then(done); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2163213
6
1642
1
+ Added@aws-crypto/ie11-detection@3.0.0(transitive)
+ Added@aws-crypto/sha256-browser@3.0.0(transitive)
+ Added@aws-crypto/sha256-js@3.0.0(transitive)
+ Added@aws-crypto/supports-web-crypto@3.0.0(transitive)
+ Added@aws-crypto/util@3.0.0(transitive)
+ Added@aws-sdk/client-cognito-identity@3.592.0(transitive)
+ Added@aws-sdk/client-sso@3.592.0(transitive)
+ Added@aws-sdk/client-sso-oidc@3.592.0(transitive)
+ Added@aws-sdk/client-sts@3.592.0(transitive)
+ Added@aws-sdk/core@3.592.0(transitive)
+ Added@aws-sdk/credential-provider-cognito-identity@3.592.0(transitive)
+ Added@aws-sdk/credential-provider-env@3.587.0(transitive)
+ Added@aws-sdk/credential-provider-http@3.587.0(transitive)
+ Added@aws-sdk/credential-provider-ini@3.592.0(transitive)
+ Added@aws-sdk/credential-provider-node@3.592.0(transitive)
+ Added@aws-sdk/credential-provider-process@3.587.0(transitive)
+ Added@aws-sdk/credential-provider-sso@3.592.0(transitive)
+ Added@aws-sdk/credential-provider-web-identity@3.587.0(transitive)
+ Added@aws-sdk/credential-providers@3.592.0(transitive)
+ Added@aws-sdk/middleware-host-header@3.577.0(transitive)
+ Added@aws-sdk/middleware-logger@3.577.0(transitive)
+ Added@aws-sdk/middleware-recursion-detection@3.577.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.587.0(transitive)
+ Added@aws-sdk/region-config-resolver@3.587.0(transitive)
+ Added@aws-sdk/token-providers@3.587.0(transitive)
+ Added@aws-sdk/types@3.577.0(transitive)
+ Added@aws-sdk/util-endpoints@3.587.0(transitive)
+ Added@aws-sdk/util-locate-window@3.568.0(transitive)
+ Added@aws-sdk/util-user-agent-browser@3.577.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.587.0(transitive)
+ Added@aws-sdk/util-utf8-browser@3.259.0(transitive)
+ Added@mongodb-js/saslprep@1.1.7(transitive)
+ Added@smithy/abort-controller@3.0.0(transitive)
+ Added@smithy/config-resolver@3.0.1(transitive)
+ Added@smithy/core@2.2.0(transitive)
+ Added@smithy/credential-provider-imds@3.1.0(transitive)
+ Added@smithy/fetch-http-handler@3.0.1(transitive)
+ Added@smithy/hash-node@3.0.0(transitive)
+ Added@smithy/invalid-dependency@3.0.0(transitive)
+ Added@smithy/is-array-buffer@3.0.0(transitive)
+ Added@smithy/middleware-content-length@3.0.0(transitive)
+ Added@smithy/middleware-endpoint@3.0.1(transitive)
+ Added@smithy/middleware-retry@3.0.3(transitive)
+ Added@smithy/middleware-serde@3.0.0(transitive)
+ Added@smithy/middleware-stack@3.0.0(transitive)
+ Added@smithy/node-config-provider@3.1.0(transitive)
+ Added@smithy/node-http-handler@3.0.0(transitive)
+ Added@smithy/property-provider@3.1.0(transitive)
+ Added@smithy/protocol-http@4.0.0(transitive)
+ Added@smithy/querystring-builder@3.0.0(transitive)
+ Added@smithy/querystring-parser@3.0.0(transitive)
+ Added@smithy/service-error-classification@3.0.0(transitive)
+ Added@smithy/shared-ini-file-loader@3.1.0(transitive)
+ Added@smithy/signature-v4@3.0.0(transitive)
+ Added@smithy/smithy-client@3.1.1(transitive)
+ Added@smithy/types@3.0.0(transitive)
+ Added@smithy/url-parser@3.0.0(transitive)
+ Added@smithy/util-base64@3.0.0(transitive)
+ Added@smithy/util-body-length-browser@3.0.0(transitive)
+ Added@smithy/util-body-length-node@3.0.0(transitive)
+ Added@smithy/util-buffer-from@3.0.0(transitive)
+ Added@smithy/util-config-provider@3.0.0(transitive)
+ Added@smithy/util-defaults-mode-browser@3.0.3(transitive)
+ Added@smithy/util-defaults-mode-node@3.0.3(transitive)
+ Added@smithy/util-endpoints@2.0.1(transitive)
+ Added@smithy/util-hex-encoding@3.0.0(transitive)
+ Added@smithy/util-middleware@3.0.0(transitive)
+ Added@smithy/util-retry@3.0.0(transitive)
+ Added@smithy/util-stream@3.0.1(transitive)
+ Added@smithy/util-uri-escape@3.0.0(transitive)
+ Added@smithy/util-utf8@3.0.0(transitive)
+ Added@types/node@20.14.2(transitive)
+ Added@types/webidl-conversions@7.0.3(transitive)
+ Added@types/whatwg-url@8.2.2(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbowser@2.11.0(transitive)
+ Addedbson@4.7.2(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedfast-xml-parser@4.2.5(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedip-address@9.0.5(transitive)
+ Addedjsbn@1.1.0(transitive)
+ Addedmongodb@4.17.2(transitive)
+ Addedmongodb-connection-string-url@2.6.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedsmart-buffer@4.2.0(transitive)
+ Addedsocks@2.8.3(transitive)
+ Addedsprintf-js@1.1.3(transitive)
+ Addedstrnum@1.0.5(transitive)
+ Addedtr46@3.0.0(transitive)
+ Addedtslib@1.14.12.6.3(transitive)
+ Addedundici-types@5.26.5(transitive)
+ Addeduuid@9.0.1(transitive)
+ Addedwebidl-conversions@7.0.0(transitive)
+ Addedwhatwg-url@11.0.0(transitive)
- Removedbl@2.2.1(transitive)
- Removedbson@1.1.6(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddenque@1.5.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmongodb@3.7.4(transitive)
- Removedoptional-require@1.1.8(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedrequire-at@1.0.6(transitive)
- Removedsafe-buffer@5.1.25.2.1(transitive)
- Removedsaslprep@1.0.3(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
Updatedmongodb@^4.2.0