Upgrade node-cron to v4 - #1499
Open
merencia wants to merge 1 commit into
Open
Conversation
Bump node-cron from ^2.0.3 to ^4.5.0 in dbgate-api. The scheduler controller uses cron.validate, cron.schedule(expr, fn) and task.destroy, all of which keep the same signatures in v4, so no code changes are needed. Drop the now-unused opencollective-postinstall and tz-offset transitive deps from the lockfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
node-cronfrom^2.0.3to^4.5.0indbgate-api.Context: I maintain node-cron, and v2 is on its way out, so it's a good time to move.
Why
node-cron v2 is several major versions behind. v4 is a TypeScript rewrite
with a maintained, actively supported codebase.
Changes
packages/api/package.json:node-cron^2.0.3->^4.5.0yarn.lock: updated entry, plus removal of the now-unused transitive depsopencollective-postinstallandtz-offset(pulled only by node-cron v2)No source changes were needed. The scheduler controller
(
packages/api/src/controllers/scheduler.js) uses only three node-cron APIs,all unchanged in v4:
cron.validate(pattern)cron.schedule(pattern, fn)task.destroy()