cosa
Advanced tools
Comparing version 6.2.0 to 6.3.0
@@ -13,3 +13,3 @@ const db = require('./db'); | ||
const abortTransaction = async () => { | ||
let error; | ||
const errors = []; | ||
await session.abortTransaction(); | ||
@@ -19,10 +19,8 @@ await session.endSession(); | ||
try { | ||
await afterAborted(error); | ||
await afterAborted(); | ||
} catch (err) { | ||
if (!err) { | ||
error = err; | ||
} | ||
errors.push(err); | ||
} | ||
}, afterAborts); | ||
if (error) { throw error; } | ||
return { errors }; | ||
}; | ||
@@ -38,3 +36,3 @@ | ||
commitTransaction: async () => { | ||
let error; | ||
const errors = []; | ||
await session.commitTransaction(); | ||
@@ -46,8 +44,6 @@ await session.endSession(); | ||
} catch (err) { | ||
if (!error) { | ||
error = err; | ||
} | ||
errors.push(err); | ||
} | ||
}, afterCommits); | ||
if (error) { throw error; } | ||
return { errors }; | ||
}, | ||
@@ -54,0 +50,0 @@ abortTransaction, |
{ | ||
"name": "cosa", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "Cosa Models for MongoDB", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"bson": "~4.6.4", | ||
"bson": "~4.7.0", | ||
"clone": "^2.1.2", | ||
@@ -45,3 +45,3 @@ "debug": "^4.3.4", | ||
"@hapi/joi": "^17.1.1", | ||
"mongodb": "~4.7.0", | ||
"mongodb": "~4.10.0", | ||
"object-path": "^0.11.8", | ||
@@ -51,9 +51,9 @@ "omnibelt": "^2.1.0" | ||
"devDependencies": { | ||
"@losant/eslint-config-losant": "^1.4.3", | ||
"@losant/eslint-config-losant": "^1.4.4", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.2", | ||
"lint-staged": "^13.0.3", | ||
"chai": "^4.3.6", | ||
"chai-as-promised": "^7.1.1", | ||
"chai-datetime": "^1.8.0", | ||
"documentation": "^13.2.5", | ||
"documentation": "^14.0.0", | ||
"mocha": "^10.0.0", | ||
@@ -60,0 +60,0 @@ "string-template": "^1.0.0" |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
65501
1564
8
+ Addedbson@4.7.2(transitive)
+ Addedmongodb@4.10.0(transitive)
- Removedbson@4.6.5(transitive)
- Removedmongodb@4.7.0(transitive)
Updatedbson@~4.7.0
Updatedmongodb@~4.10.0