Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency cron-parser to v5 #6074

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 18, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cron-parser ^4.1.0 -> ^5.0.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

harrisiirak/cron-parser (cron-parser)

v5.0.2

Compare Source

v5.0.1

Compare Source

This first patch release contains couple of quick bugfixes that were reported after the first release of v5. Thanks for everybody that tried the new version out and provided some feedback.

v5.0.0: - TypeScript rewrite

Compare Source

All changes come from https://github.com/harrisiirak/cron-parser/pull/360

Changelog
  • BREAKING CHANGE: Bumped the minimum Node.js version to >= 18 and TypeScript to >= 5.
  • BREAKING CHANGE: interval.fields (CronExpression.interval) now returns a readonly instance of CronFieldsCollection instead of a regular array. See CronFieldsCollection.from for how to modify the underlying data structure.
  • BREAKING CHANGE: Moved crontab file parsing from CronParser to a standalone CronFileParser class (fixes #​112).
  • Refactored the codebase to TypeScript (fixes #​190).
  • Cleaned up test suites, removed duplicate test cases, and switched from tap to jest.
  • Improved documentation and introduced documentation generated by typedoc (fixes #​309, #​322, #​269).
  • Added benchmark tooling to help detect future performance regressions.
  • Added CronExpression.includesDate to evaluate whether a given date matches the pattern (closes #​299).
  • Fixed issues where certain range and repeat field expressions produced invalid intervals (fixes #​156).
  • Fixed an issue with day-of-month handling when the range is explicitly set and no wildcard is used (fixes #​284).
  • Improved repeat serialization for stringification (fixes #​236).
Performance improvements

While this release won't address the performance issues reported in #​287, it will bring some performance improvements of around 20-30% on average, depending on the pattern complexity. The following benchmark results were produced on my 2023 MBP.

┌────────────────────┬────────────┬────────────┬──────────┬─────┐
│ Pattern            │   Old Mean │   New Mean │   Change │     │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ * * * * * *        │    73.55ms │    37.43ms │   49.10% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 * * 1,4-10,L * * │  3504.51ms │  2338.42ms │   33.27% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 10-30/2 2 12 8 0   │  3111.18ms │  2234.32ms │   28.18% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 0 0 * * 4,6L     │  9400.33ms │  6825.61ms │   27.39% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 12 */5 6 *       │  7442.68ms │  5645.95ms │   24.14% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 15 */5 5 *       │  6998.87ms │  5443.22ms │   22.23% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 0 6-20/2,L 2 *   │  8832.87ms │  6947.63ms │   21.34% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 0 0 0 * * 1L,5L    │ 15416.07ms │ 12474.12ms │   19.08% │  ↑  │
├────────────────────┼────────────┼────────────┼──────────┼─────┤
│ 10 2 12 8 7        │  7105.79ms │  5947.91ms │   16.29% │  ↑  │
└────────────────────┴────────────┴────────────┴──────────┴─────┘

Benchmarks can be run locally by executing the command.:

npm run bench

Individual patterns can be benchmarked by executing bench:pattern command:

npm run bench:pattern "* * * * * *"

Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner February 18, 2025 18:32
@renovate renovate bot added dependencies Pull requests that update a dependency file javascript labels Feb 18, 2025
@mrstork
Copy link
Contributor

mrstork commented Feb 18, 2025

Requires minimum node version >= 18

@mrstork mrstork closed this Feb 18, 2025
@mrstork mrstork deleted the renovate/cron-parser-5.x branch February 18, 2025 18:34
Copy link
Contributor Author

renovate bot commented Feb 18, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 5.x releases. But if you manually upgrade to 5.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant