Repository navigation
chore(deps): Update dependency croner to v11 (main) - #595
Merged
Merged
Conversation
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.
This PR contains the following updates:
10.0.1→11.0.0Release Notes
Hexagon/croner (croner)
v11.0.0Compare Source
Breaking changes
are either fixed-time jobs (one value each for seconds, minutes and hours) or interval jobs.
10.x it ran as much later as the gap was long (
0 30 2 * * *ran at 3:30 AM, now 3:00 AM).* * * * *keeps running through the repeated hour (#343, #407). Patterns with more than onehour, minute or second, like
0 30 1,2 * * *, are interval jobs.startAtis inclusive: a pattern match exactly atstartAtnow runs. Previously the firstrun was the following match. This does not apply with
intervalset, which works as in 10.x.A
startAtbetween two whole seconds counts from the next whole second, and a run in the samesecond before a fractional
stopAt(00:00:00 withstopAt00:00:00.500) now runs. 10.xexcluded it.
dayOffset,nextRun(),nextRuns(),previousRuns(),msToNext()andenumerate()return actual run times, searched from the reference, the same way the scheduler and
isRunning()do. Previously they shifted the next pattern match after the reference, so anegative offset could return a time before the reference, and
msToNext()ignored the offset.startAtandstopAtalso apply to the shifted run time. In 10.x they applied to the unshiftedpattern match, so a job could run before
startAtor afterstopAt.previousRun()returns when the previous run started, as documented. Previously it returnedwhen the run finished.
Added
enumerate(startAt?)method returning a statefulCronIteratorthat supports iterator/iterableprotocols (
for...of, destructuring,next(),peek(),reset()) and honorsmaxRuns(#365). The
CronIteratorclass is exported.allowPastoption for explicitly allowing date-based jobs scheduled more than 1 second in thepast to fire immediately (#349).
CatchCallbackFn,CronModeandProtectCallbackFnare exported from the source entry point(JSR). The npm type declarations already exposed them.
Changed
Intl.DateTimeFormatinstances per timezone, making timezone-aware scheduling noticeablyfaster (based on #389).
"now" is not lost to the time it took to create it. Older dates fire only with
allowPast: true.Previously a date-based job in the past never fired (#348, #349).
dayOffsetJSDoc and completed missing option documentation, including iterator usage,allowPast, and DST behavior.Fixed
(#399).
nextRun()andmsToNext()no longer return a time in the past when the reference isinside the repeated hour, and searches move in real time in both directions.
nextRuns()going backwards or repeating times around a DST spring forward.msToNext()returning a wrong (often negative) value when passed an ISO 8601 string on ajob with
timezoneset. The string was read in system local time (#401, #402).utcOffset, innextRun(),msToNext(),match(),startAt,stopAtand one-off dates. Strings withZor an offset,like
2026-01-01T00:00:00Z, are read as that exact instant (#401).startAtgiven as aDatebeing searched in system local time on jobs withutcOffset.previousRuns()throwing for patterns with month-specific wildcards (e.g.,0 9 * 4 *)when the reference date falls outside allowed months, and for leap-day patterns (
0 0 29 2 *)in leap years (#408, #409).
previousRuns()threw aTypeErrorfor patterns like0 0 30 2 *, andnextRun(),nextRuns()andpreviousRuns()threwMaximum call stack size exceededfor0 0 16 * 5#LwithdomAndDow: true. They now returnnulland an empty list.steps (#388, #393), timer and target disagreeing after backward clock steps (#417), and timer
targets for
dayOffsetschedules and protected jobs (#395).isRunning(),nextRun()andmsToNext()disagreeing with the scheduler whendayOffsetis set.TimeoutNegativeWarningwhen a timer delay was negative. Negative delays are now clampedto 0 (#370, #369).
?in day-of-month or day-of-week behaving differently from*:0 0 ? * MONran everyday instead of every Monday (#392).
nextRun(),nextRuns(),msToNext()and scheduling throwing aTypeErrorwhen aschedule with
startAtandintervalhas no runs left (#390).RangeErrorwhen using stepping with year field wildcard.*/2in the year field matcheseven years (#373, #374).
@deprecatedJSDoc tag being ondayOffsetinstead oflegacyMode.timezone: a one-off date like2030-01-01T00:00:00.700Zran at.000, and strings andDates could differ instopAt,one-off dates,
nextRun()andmsToNext(). Also fixed a one-off date given as a string, laterin the same second as
startAt, never running. Jobs with a namedtimezonestill work in wholeseconds, as in 10.x.
CI / Build
metadata now comes from the committed
package.json;build/package.template.jsonis removed.parity with previous releases.
package.jsonis committed and is the source of truth forversion, scripts and dev dependencies, the build script runs on Node.js (
npm run build), andtests run with
npm test. Deno is still supported (deno task test, fmt/lint, JSR publishing),and
npm versionkeepsdeno.jsonin sync.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.