Comparing version 0.10.7 to 0.10.8
@@ -0,1 +1,8 @@ | ||
## [0.10.8](https://github.com/VaclavObornik/mongodash/compare/v0.10.7...v0.10.8) (2021-08-27) | ||
### Bug Fixes | ||
* typescript problems after tsc upgrade ([21262b2](https://github.com/VaclavObornik/mongodash/commit/21262b2ec1160914e8796d595c461beea828b58e)) | ||
## [0.10.7](https://github.com/VaclavObornik/mongodash/compare/v0.10.6...v0.10.7) (2021-07-31) | ||
@@ -2,0 +9,0 @@ |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -33,3 +33,3 @@ * | ||
if (!this._collection) { | ||
this._collection = getCollection_1.getCollection('cronTasks'); | ||
this._collection = (0, getCollection_1.getCollection)('cronTasks'); | ||
} | ||
@@ -61,3 +61,3 @@ return this._collection; | ||
const expression = interval.slice(5); | ||
const parsedExpression = cron_parser_1.parseExpression(expression, state.cronExpressionParserOptions); | ||
const parsedExpression = (0, cron_parser_1.parseExpression)(expression, state.cronExpressionParserOptions); | ||
return () => parsedExpression.next().toDate(); | ||
@@ -69,3 +69,3 @@ } | ||
} | ||
const duration = parse_duration_1.default(interval); | ||
const duration = (0, parse_duration_1.default)(interval); | ||
// debug('parsed duration: ', duration); | ||
@@ -174,3 +174,3 @@ if (typeof duration !== 'number') { | ||
// todo solve the "any" | ||
const stopContinuousLock = createContinuousLock_1.createContinuousLock(state.collection, task.taskId, 'lockedTill', lockTime, _onError); | ||
const stopContinuousLock = (0, createContinuousLock_1.createContinuousLock)(state.collection, task.taskId, 'lockedTill', lockTime, _onError); | ||
try { | ||
@@ -177,0 +177,0 @@ await (function mongoDashRunTaskNotCyclic() { |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -27,3 +27,3 @@ * | ||
} | ||
return getMongoClient_1.getMongoClient().db().collection(name); | ||
return (0, getMongoClient_1.getMongoClient)().db().collection(name); | ||
} | ||
@@ -30,0 +30,0 @@ finally { |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -48,5 +48,5 @@ * | ||
}; | ||
getCollection_1.init({ collectionFactory: (_b = options.collectionFactory) !== null && _b !== void 0 ? _b : null }); | ||
withLock_1.init({ onError }); | ||
cronTasks_1.init({ | ||
(0, getCollection_1.init)({ collectionFactory: (_b = options.collectionFactory) !== null && _b !== void 0 ? _b : null }); | ||
(0, withLock_1.init)({ onError }); | ||
(0, cronTasks_1.init)({ | ||
runCronTasks: (_c = options.runCronTasks) !== null && _c !== void 0 ? _c : true, | ||
@@ -56,5 +56,5 @@ cronExpressionParserOptions: (_d = options.cronExpressionParserOptions) !== null && _d !== void 0 ? _d : {}, | ||
}); | ||
await getMongoClient_1.init(Object.assign(Object.assign({}, options), { autoConnect: (_e = options.autoConnect) !== null && _e !== void 0 ? _e : true })); | ||
await (0, getMongoClient_1.init)(Object.assign(Object.assign({}, options), { autoConnect: (_e = options.autoConnect) !== null && _e !== void 0 ? _e : true })); | ||
} | ||
exports.init = init; | ||
//# sourceMappingURL=index.js.map |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -28,3 +28,3 @@ * | ||
collectionPromise = (async () => { | ||
const collection = getCollection_1.getCollection('locks'); | ||
const collection = (0, getCollection_1.getCollection)('locks'); | ||
await collection.createIndex({ [expirationKey]: 1 }, { name: 'expiresAtIndex', expireAfterSeconds: 0 }); | ||
@@ -71,3 +71,3 @@ return collection; | ||
catch (err) { | ||
const randomMultiplier = lodash_1.random(1, 1.2, true); | ||
const randomMultiplier = (0, lodash_1.random)(1, 1.2, true); | ||
let waitTime = Math.min(2 ** n * randomMultiplier * startingDelay, maxDelay); | ||
@@ -92,3 +92,3 @@ let nextTime = new Date(Date.now() + waitTime); | ||
// todo solve the "any" | ||
const stopContinuousLock = createContinuousLock_1.createContinuousLock(collection, stringKey, expirationKey, expireIn, onError); | ||
const stopContinuousLock = (0, createContinuousLock_1.createContinuousLock)(collection, stringKey, expirationKey, expireIn, onError); | ||
const cleanUp = () => Promise.all([stopContinuousLock(), releaseLock()]); | ||
@@ -95,0 +95,0 @@ let value; |
/**! | ||
* mongodash v0.10.7 | ||
* mongodash v0.10.8 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -13,3 +13,3 @@ * | ||
async function withTransaction(callback, options) { | ||
const clientSession = getMongoClient_1.getMongoClient().startSession(); | ||
const clientSession = (0, getMongoClient_1.getMongoClient)().startSession(); | ||
try { | ||
@@ -16,0 +16,0 @@ let returnValue; |
{ | ||
"name": "mongodash", | ||
"version": "0.10.7", | ||
"version": "0.10.8", | ||
"description": "An utility library delivering super-useful and super-simple tools using MongoDB", | ||
@@ -15,3 +15,3 @@ "main": "dist/lib/index.js", | ||
"test:lint": "eslint ./src/**/*.ts ./test/**/*.ts", | ||
"test:simple": "jest", | ||
"test:simple": "jest --runInBand --forceExit", | ||
"test:coverage": "jest --coverage --runInBand --forceExit", | ||
@@ -31,3 +31,3 @@ "test:coverage:noCache": "npm run test:coverage -- --no-cache", | ||
"cron-parser": "^3.5.0", | ||
"debug": "^4.3.1", | ||
"debug": "^4.3.2", | ||
"parse-duration": "^1.0.0" | ||
@@ -42,33 +42,33 @@ }, | ||
"@semantic-release/git": "^9.0.0", | ||
"@stryker-mutator/core": "^5.2.1", | ||
"@stryker-mutator/jest-runner": "^5.2.1", | ||
"@types/debug": "^4.1.5", | ||
"@types/jest": "^26.0.24", | ||
"@types/lodash": "^4.14.168", | ||
"@types/node": "^16.3.1", | ||
"@types/sinon": "^10.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.17.0", | ||
"@typescript-eslint/parser": "^4.17.0", | ||
"coveralls": "^3.1.0", | ||
"deepdash": "^5.3.5", | ||
"eslint": "^7.22.0", | ||
"@stryker-mutator/core": "^5.3.0", | ||
"@stryker-mutator/jest-runner": "^5.3.0", | ||
"@types/debug": "^4.1.7", | ||
"@types/jest": "^27.0.1", | ||
"@types/lodash": "^4.14.172", | ||
"@types/node": "^16.7.4", | ||
"@types/sinon": "^10.0.2", | ||
"@typescript-eslint/eslint-plugin": "^4.29.3", | ||
"@typescript-eslint/parser": "^4.29.3", | ||
"coveralls": "^3.1.1", | ||
"deepdash": "^5.3.9", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-no-only-tests": "^2.5.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"husky": "^7.0.1", | ||
"jest": "^27.0.6", | ||
"jest-config": "^27.0.6", | ||
"eslint-plugin-no-only-tests": "^2.6.0", | ||
"eslint-plugin-prettier": "^3.4.1", | ||
"husky": "^7.0.2", | ||
"jest": "^27.1.0", | ||
"jest-config": "^27.1.0", | ||
"jest-transform-stub": "^2.0.0", | ||
"lint-staged": "^11.0.0", | ||
"lint-staged": "^11.1.2", | ||
"lodash": "^4.17.21", | ||
"mongodb": "^4.0.1", | ||
"mongodb": "^4.1.1", | ||
"npm-run-all": "^4.1.5", | ||
"organize-imports-cli": "^0.8.0", | ||
"prettier": "^2.2.1", | ||
"prettier": "^2.3.2", | ||
"rimraf": "^3.0.2", | ||
"semantic-release": "^17.4.2", | ||
"sinon": "^11.1.1", | ||
"ts-jest": "^27.0.3", | ||
"ts-node": "^10.1.0", | ||
"typescript": "^4.2.3" | ||
"semantic-release": "^17.4.7", | ||
"sinon": "^11.1.2", | ||
"ts-jest": "^27.0.5", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.4.2" | ||
}, | ||
@@ -75,0 +75,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55973
Updateddebug@^4.3.2