npm / cron-parser
cron-parser
What changed in cron-parser 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
3 breaking1 security1 deprecations1 performance1 behavior and defaults18 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcron-parser 525 changes
Breaking changes 3
Values for days the month does not have are dropped.
A standalone L in the day-of-week field is now rejected during construction.
Unsatisfiable expressions now throw instead of returning a bogus date because the iteration loop limit is enforced.
Security 1
Bounds expression length and hashed step expansion at parse time.
Deprecations 1
The npm-published 5.6.2 package is deprecated because it shipped the 5.6.1 source tree; use 5.7.0 instead.
Performance 1
CronExpression iteration is faster.
Behavior and default changes 1
Day fields that cover their whole range are kept out of the wildcard form.
Fixes and other changes 18
Preserves crontab fields separated by whitespace when parsing expressions.
Rejects duplicate zero values during field validation.
Bounds field value expansion at parse time.
Short expressions are padded from the leading field slot.
DST transitions wider than one hour are now compensated for.
A hashed step wider than its range no longer empties the field.
Stringifying stepped fields now keeps explicit range bounds.
The current date is rounded to whole seconds so occurrences on the end date are returned.
A day-of-week step no longer adds Sunday when it never reaches 7.
The CronField constructor now copies the values array rather than reusing it.
A matching day of month is no longer dropped when the day of week uses an nth (#) occurrence.
Fixes CronDate throwing on .bind in bundled and CDN builds.
Does not reject an out-of-range day of month when the day of week is restricted.
Handles DST gaps correctly and prevents iteration from stopping prematurely.
Fixes handling of the ES6 iterator done flag, affecting iteration behavior.
Stops the hour-step loop early on spring-forward DST days to prevent skipping a day.
Fixes parsing of repeat ranges in CronExpressionParser.
CronExpression.reset() now preserves the timezone.