Skip to content

chore(deps): Bump croner from 2.2.0 to 3.0.0#306

Merged
notheotherben merged 3 commits intomainfrom
dependabot/cargo/croner-3.0.0
Aug 20, 2025
Merged

chore(deps): Bump croner from 2.2.0 to 3.0.0#306
notheotherben merged 3 commits intomainfrom
dependabot/cargo/croner-3.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Jul 14, 2025

Bumps croner from 2.2.0 to 3.0.0.

Release notes

Sourced from croner's releases.

v3.0.0

Croner 3.0 Release Notes

Version 3.0 is a significant release, introducing powerful new features, major API enhancements for improved safety and flexibility, and important bug fixes.

Major New Features

  • Reverse Lookup: You can now search for previous occurrences of a cron pattern. The new find_previous_occurrence() method and iter_before() iterator allow for iterating backwards in time from a given point.
  • Flexible Parser Configuration with Builder Pattern: The CronParser has been enhanced with a builder pattern (CronParser::builder()) for a more type-safe and explicit configuration. This allows you to precisely control:
    • How the seconds field is handled (Optional, Required, Disallowed).
    • Whether the year field is supported (Optional, Required, Disallowed).
    • The logical combination of Day-of-Month and Day-of-Week fields (dom_and_dow).
    • Support for forcing alternative (Quartz-style) weekdays.
  • Logical AND for Day-of-Month and Day-of-Week with + modifier: Introduced the + prefix in the day-of-week field (e.g., 0 0 1 * +MON) to explicitly enforce a logical AND relationship between the day-of-month and day-of-week conditions, overriding the default OR behavior.
  • EXPERIMENTAL Human-Readable Descriptions: Croner can now generate human-readable, English descriptions for any cron pattern using the new .describe() method. This feature is also extensible with internationalization support, demonstrated with an initial Swedish translation.

Enhancements

  • Common Trait Implementation: Cron and CronPattern now implement common traits including Eq, PartialEq, Ord, PartialOrd, and Hash. This allows Cron instances to be reliably compared, sorted, and used in hash-based collections like HashMap.
  • Robust Whitespace Parsing: The parser is now more robust and correctly handles leading, trailing, and mixed whitespace separators in cron patterns.
  • Improved DST Handling: Fixed an issue where fixed-time jobs scheduled within a Daylight Saving Time (DST) spring forward gap would incorrectly skip to the next day. These jobs now execute immediately at the first valid time following the gap on the same calendar day, aligning with the OCPS and Vixie-cron behavior.
  • Improved Specification Conformance: This release improves conformance with the draft Open Cron Pattern Specification (OCPS). This includes better handling of 5, 6, and 7-field patterns and special characters like L, #, and W. Validation logic has been refined to ensure that the ? wildcard is only permitted in the day-of-month and day-of-week fields, improving pattern integrity.

Bug Fixes

  • Constrained Closest Weekday (W): The W modifier is now correctly constrained within the given month. The search for the closest weekday will no longer incorrectly cross into a previous or subsequent month.

Migrating to the New Parser Configuration

From this version on, the initialization of Cron instances has been updated to use a flexible builder pattern, which is more idiomatic to Rust, and provides greater control and type safety.

Previous Method (Before v3.0)

Previously, Cron was typically initialized directly from a string, which used a default parser configuration:

    // Parse cron expression
    let cron_all = Cron::new("18 * * * 5")
      // <options>
      .parse()
      .expect("Couldn't parse cron string");

New Recommended Method (v3.0 and later)

For v3.0 and later, there are two primary ways to construct a Cron object, depending on your needs.

  1. Directly, using default settings: For simple cases that do not require special configuration, the Cron::from_str() method is the most convenient option.

... (truncated)

Commits
  • 6e7b30d Update README
  • cbf9ce4 Bump version
  • 602d877 Feature/separate interval vs fixed jobs (#33)
  • 05b94f7 Implement plus-modifier for full OCPS-conformance. (#32)
  • 5820e63 Fix year search (#31)
  • 0e78d79 Merge pull request #30 from Hexagon/fix/ensure-7-fields-years-required
  • 7fbd4d4 Ensure 7 fields when years are required
  • f2aec12 Merge pull request #27 from Hexagon/feature/ocps-1.4-compliance
  • caf7993 Add --all-features to development docs. Fix serde test.
  • f32a8e6 Merge pull request #28 from Hexagon/docs/readme
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jul 14, 2025
Copy link
Copy Markdown
Member

@notheotherben notheotherben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has been automatically approved because it was created by @dependabot.

@notheotherben notheotherben enabled auto-merge July 14, 2025 00:32
@dependabot dependabot Bot force-pushed the dependabot/cargo/croner-3.0.0 branch 2 times, most recently from 6250f0d to 8bb670d Compare August 4, 2025 17:04
@dependabot dependabot Bot force-pushed the dependabot/cargo/croner-3.0.0 branch from 8bb670d to 47d6e5e Compare August 8, 2025 00:45
Bumps [croner](https://github.com/hexagon/croner-rust) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/hexagon/croner-rust/releases)
- [Commits](Hexagon/croner-rust@v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: croner
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/cargo/croner-3.0.0 branch from 47d6e5e to 4f82868 Compare August 12, 2025 12:05
notheotherben and others added 2 commits August 20, 2025 09:55
- Replace Cron::new().parse() with Cron::from_str()
- Add std::str::FromStr import for new API
- Fixes compilation error with croner 3.0.0 upgrade
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.59%. Comparing base (724407b) to head (6e8232c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #306      +/-   ##
==========================================
- Coverage   66.61%   66.59%   -0.02%     
==========================================
  Files          24       24              
  Lines        1917     1916       -1     
==========================================
- Hits         1277     1276       -1     
  Misses        640      640              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@notheotherben notheotherben merged commit a6e7615 into main Aug 20, 2025
12 checks passed
@notheotherben notheotherben deleted the dependabot/cargo/croner-3.0.0 branch August 20, 2025 09:00
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 rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant