From 3096d996102aee8ca0abdfb424b6f2d0ca6d2b56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:46:32 +0800 Subject: [PATCH] npm(deps): bump the npm group with 1 update (#348) * npm(deps): bump the npm group with 1 update Bumps the npm group with 1 update: [cron](https://github.com/kelektiv/node-cron). - [Release notes](https://github.com/kelektiv/node-cron/releases) - [Changelog](https://github.com/kelektiv/node-cron/blob/main/CHANGELOG.md) - [Commits](https://github.com/kelektiv/node-cron/compare/v3.1.3...v3.1.4) --- updated-dependencies: - dependency-name: cron dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] * auto(Gadget-cron): bump cron to 3.1.4 by browserify --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- src/gadgets/cron/MediaWiki:Gadget-cron.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f977827..7bd5a411 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "browserify": "^17.0.0", "common-shakeify": "^1.1.2", "concat-stream": "^2.0.0", - "cron": "^3.1.3", + "cron": "^3.1.4", "duplexify": "^4.1.2", "envify": "^4.1.0", "eslint": "^8.52.0", @@ -2613,9 +2613,9 @@ } }, "node_modules/cron": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.3.tgz", - "integrity": "sha512-KVxeKTKYj2eNzN4ElnT6nRSbjbfhyxR92O/Jdp6SH3pc05CDJws59jBrZWEMQlxevCiE6QUTrXy+Im3vC3oD3A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.4.tgz", + "integrity": "sha512-HMq+5lvaKFR7os6E+2FuA9nMydylYJWVN8gIkU/UVa7bYBr7RxExH++hTWSTApkCoyf/c03jEbWgHrNNOwsvCA==", "dependencies": { "@types/luxon": "~3.3.0", "luxon": "~3.4.0" diff --git a/package.json b/package.json index 75956432..40957d3e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "browserify": "^17.0.0", "common-shakeify": "^1.1.2", "concat-stream": "^2.0.0", - "cron": "^3.1.3", + "cron": "^3.1.4", "duplexify": "^4.1.2", "envify": "^4.1.0", "eslint": "^8.52.0", diff --git a/src/gadgets/cron/MediaWiki:Gadget-cron.js b/src/gadgets/cron/MediaWiki:Gadget-cron.js index c81e6e81..0a7311a0 100644 --- a/src/gadgets/cron/MediaWiki:Gadget-cron.js +++ b/src/gadgets/cron/MediaWiki:Gadget-cron.js @@ -3732,8 +3732,8 @@ }), _$job_6.CronJob = void 0; _$job_6.CronJob = class CronJob { constructor(cronTime, onTick, onComplete, start, timeZone, context, runOnInit, utcOffset, unrefTimeout) { - if (this.running = !1, this.unrefTimeout = !1, this.lastExecution = null, this.runOnce = !1, this._callbacks = [], this.context = null != context ? context : this, null != timeZone && null != utcOffset) throw new _$errors_4.ExclusiveParametersError("timeZone", "utcOffset"); - this.cronTime = null != timeZone ? new _$time_7.CronTime(cronTime, timeZone, null) : null != utcOffset ? new _$time_7.CronTime(cronTime, null, utcOffset) : new _$time_7.CronTime(cronTime, timeZone, utcOffset), null != unrefTimeout && (this.unrefTimeout = unrefTimeout), null != onComplete && (this.onComplete = this._fnWrap(onComplete)), this.cronTime.realDate && (this.runOnce = !0), this.addCallback(this._fnWrap(onTick)), runOnInit && (this.lastExecution = new Date(), this.fireOnTick()), start && this.start(); + if (this.running = !1, this.unrefTimeout = !1, this.lastExecution = null, this._callbacks = [], this.context = null != context ? context : this, null != timeZone && null != utcOffset) throw new _$errors_4.ExclusiveParametersError("timeZone", "utcOffset"); + this.cronTime = null != timeZone ? new _$time_7.CronTime(cronTime, timeZone, null) : null != utcOffset ? new _$time_7.CronTime(cronTime, null, utcOffset) : new _$time_7.CronTime(cronTime, timeZone, utcOffset), null != unrefTimeout && (this.unrefTimeout = unrefTimeout), null != onComplete && (this.onComplete = this._fnWrap(onComplete)), this.addCallback(this._fnWrap(onTick)), runOnInit && (this.lastExecution = new Date(), this.fireOnTick()), start && this.start(); } static from(params) { if (null != params.timeZone && null != params.utcOffset) throw new _$errors_4.ExclusiveParametersError("timeZone", "utcOffset"); @@ -3781,7 +3781,7 @@ let newTimeout = this.cronTime.getTimeout(); newTimeout > diff && (newTimeout = diff), remaining += newTimeout; } - remaining ? (remaining > MAXDELAY ? (remaining -= MAXDELAY, timeout = MAXDELAY) : (timeout = remaining, remaining = 0), setCronTimeout(timeout)) : (this.lastExecution = new Date(), this.running = !1, this.runOnce || this.start(), this.fireOnTick()); + remaining ? (remaining > MAXDELAY ? (remaining -= MAXDELAY, timeout = MAXDELAY) : (timeout = remaining, remaining = 0), setCronTimeout(timeout)) : (this.lastExecution = new Date(), this.running = !1, this.cronTime.realDate || this.start(), this.fireOnTick()); }; 0 <= timeout ? (this.running = !0, timeout > MAXDELAY && (remaining = timeout - MAXDELAY, timeout = MAXDELAY), setCronTimeout(timeout)) : this.stop(); }