Releases: lsndr/rrule-rust
Releases · lsndr/rrule-rust
v3.1.0-next.1
v3.0.1-next.1
v3.0.0
The library now runs in browsers via WebAssembly, making it a truly universal solution for handling recurrence rules across all JavaScript environments.
The API has been completely redesigned with dedicated classes for all core concepts — DtStart, ExDate, RDate, and an enhanced DateTime — providing better type safety and a more intuitive developer experience. You can now work with date-only recurrence rules for all-day events, and take advantage of built-in results caching to speed up repeated queries.
Every public API is now documented with comprehensive JSDoc comments, giving you inline documentation and better autocomplete in your IDE.
✨ New Features
WASM Support
- Browser compatibility via WebAssembly - The library now supports browsers through WASM! Install with:
Date-Only RRules
- Date-only support -
DateTimenow supports date-only values (without time component)
Results Cache
- Results caching - New caching mechanism for improved performance on repeated queries
Enhanced API
- New
DtStartobject - Dedicated class for representing recurrence start dates with timezone support - New
ExDateobject - First-class support for exclusion dates with proper encapsulation - New
RDateobject - First-class support for additional recurrence dates toTimestamp()andtoDate()methods - ConvertDateTimeinstances to Unix timestamps or JavaScriptDateobjects- Flexible type definitions - More permissive types for RRule configuration
Documentation
- Comprehensive JSDoc documentation - All public APIs now include detailed JSDoc comments for better IDE support and developer experience
💥 Breaking Changes
Constructor Changes
- Plain objects are no longer accepted directly in constructors - use the new dedicated classes (
DtStart,ExDate,RDate,DateTime) - Improved plain object handling with explicit
toPlain()/fromPlain()methods
Method Renames
- Several method names have been adjusted for consistency
- Field names in
DtStartnow align with method names
Minimum Requirements
- Node.js 20+ is now required (previously Node.js 10+)
- npm 10+ is now required
📚 Examples
// Before (v2.x)
const set = new RRuleSet({
dtstart: DateTime.local(2024, 1, 1, 9, 0, 0),
tzid: 'US/Eastern',
rrules: [rrule],
});
// After (v3.x)
import { RRuleSet, RRule, DateTime, DtStart } from 'rrule-rust';
const set = new RRuleSet({
dtstart: new DtStart(DateTime.local(2024, 1, 1, 9, 0, 0), 'US/Eastern'),
rrules: [rrule],
});
// New: Get results as timestamps or Date objects
const dates = set.all();
dates[0].toTimestamp(); // Unix timestamp
dates[0].toDate(); // JavaScript Datev3.0.0-next.9
v3.0.0-next.15
3.0.0-next.15 (2025-11-28)
- build: bump version (5f50aba)
v3.0.0-next.14
3.0.0-next.14 (2025-11-28)
- build: actualize subpackages info (36d5698)