rrule-temporal 2.2.7 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -318,109 +318,13 @@ Notes
318
318
 
319
319
  ## Benchmarks
320
320
 
321
- ### Queries without COUNT and sub-daily rules (v2.2.7)
322
-
323
- Measured September 23, 2026 on an Apple M2 Max with Node 25.2.1 and the
324
- bundled Temporal polyfill, comparing builds of `v2.2.6` and v2.2.7. Every
325
- scenario returned identical results from both builds before timing. Query rows
326
- are warm medians per call, generation rows are uncached `all()` calls with the
327
- builds alternating each sample, and the last row is the first `all()` in a
328
- fresh process (median of 15).
329
-
330
- | Scenario | v2.2.6 | v2.2.7 | Speedup |
331
- | --- | ---: | ---: | ---: |
332
- | WEEKLY M/W/F `next()`, no end, UTC | 61.25 us | 0.69 us | 88.77x |
333
- | WEEKLY M/W/F `next()`, 40 EXDATEs, no end, Chicago | 157.5 us | 1.33 us | 118x |
334
- | WEEKLY M/W/F `between()` one month, no end, UTC | 36.22 us | 6.40 us | 5.66x |
335
- | MONTHLY last Friday `next()`, no end, Chicago | 68.79 us | 1.39 us | 49.49x |
336
- | YEARLY `previous()`, no end, Chicago | 79.11 us | 2.23 us | 35.48x |
337
- | UTC WEEKLY M/W/F with RDATE/EXDATE, `all()`, COUNT 1,000 | 12.555 ms | 0.697 ms | 18.02x |
338
- | HOURLY quarter hours, `all()`, COUNT 1,000, UTC | 3.967 ms | 1.073 ms | 3.70x |
339
- | MINUTELY 9:00-16:45 quarter hours, `all()`, COUNT 1,000, Chicago | 4.516 ms | 2.034 ms | 2.22x |
340
- | Chicago weekdays, first `all()` in a fresh process | 23.282 ms | 4.593 ms | 5.07x |
341
-
342
- Queries on unbounded and UNTIL-bound rules, the usual calendar case, now visit
343
- only the recurrence periods around the target instead of replaying the rule
344
- through Temporal. Sub-daily rules with BYxxx parts run on a new integer engine,
345
- which also fixes their INTERVAL cadence, and timezone tables are built from
346
- Temporal's own transitions. In the same runs, the 13 COUNT-bound query
347
- scenarios measured 0.93-2.81x and the 29 existing generation scenarios
348
- 0.93-1.18x; isolated re-runs of the lowest cases were within 2% of v2.2.6.
349
-
350
- See [`benchmarks/README.md`](benchmarks/README.md) for every scenario, raw
351
- measurements, and the reproduction commands.
352
-
353
- ### UTC generation improvements (v2.2.4)
354
-
355
- Measured September 5, 2026 on an Apple M2 Max with Node 25.2.1 and the
356
- bundled Temporal polyfill, comparing a build of `v2.2.3` (`474c88c`) with the
357
- v2.2.4 implementation after the DST fix (`0274381`). These are uncached
358
- `all()` calls: seven samples of at least 300 ms after a 200 ms warmup,
359
- alternating baseline/candidate order each sample. Rule construction is outside
360
- the timings. Every scenario's complete result was compared against the baseline
361
- before timing. These are local medians; sample ranges are recorded with the raw
362
- results, and timings vary with machine load.
363
-
364
- | UTC scenario | v2.2.3 | v2.2.4 | Speedup |
365
- | --- | ---: | ---: | ---: |
366
- | YEARLY last weekday, COUNT 1,000 | 1,866.627 ms | 27.755 ms | 67.25x |
367
- | YEARLY quarterly months / two month days, COUNT 1,000 | 22.255 ms | 2.046 ms | 10.88x |
368
- | MONTHLY weekdays / four time slots, COUNT 1,000 | 6.402 ms | 1.192 ms | 5.37x |
369
- | MONTHLY first/last weekday time slots, COUNT 240 | 20.788 ms | 0.825 ms | 25.20x |
370
- | DAILY RDATE/EXDATE, COUNT 1,000 | 3.645 ms | 0.720 ms | 5.06x |
371
-
372
- UTC monthly/yearly generation now selects calendar days and BYSETPOS ranks
373
- using integers, then constructs only the Temporal candidates that the visitor
374
- consumes. Simple UTC DAILY/HOURLY/MINUTELY/SECONDLY rules retain their fast
375
- generators when RDATE/EXDATE are present; exceptions are applied afterward in
376
- recurrence-set order. Unsupported shapes retain the general engine, including
377
- expanded exception rules whose iteration limits differ.
378
-
379
- The release passed all 1,167 tests on both Temporal backends, plus CI on
380
- Node 20, 24, and 26. The timings above use the polyfill only. The general
381
- calendar engine now restores DTSTART's time after DST gaps; this has a cost
382
- in fallback cases. The Chicago DAILY exception control measured 3.960 ms
383
- for v2.2.3 and 4.840 ms for v2.2.4, about 22% slower in this run.
384
-
385
- See [`benchmarks/README.md`](benchmarks/README.md) for all scenarios, raw
386
- measurements, and the reproduction command.
387
-
388
- ### COUNT-bound queries
389
-
390
- Measured September 24, 2026 on an Apple M2 Max with Node 25.2.1, comparing
391
- the exact `v2.2.2` tag (`6be2251`) with v2.2.7. The table reports warmed median
392
- time per call from seven 300 ms samples after a 250 ms warmup; lower is better.
393
- Each build ran three times in alternating processes, and the table shows the
394
- median run. Both builds returned identical results, and v2.2.7 uses the
395
- production-minified bundle described below.
396
-
397
- | Scenario | v2.2.2 | v2.2.7 | Speedup |
398
- | --- | ---: | ---: | ---: |
399
- | SECONDLY next, COUNT 128, rank 63 | 9.44 us | 0.49 us | 19.27x |
400
- | SECONDLY next, COUNT 250k, rank 200k | 9.38 us | 0.52 us | 18.04x |
401
- | DAILY next, COUNT 9k, rank 8.5k, UTC | 9.80 us | 1.11 us | 8.83x |
402
- | DAILY previous, COUNT 9k, rank 8.5k, Chicago | 12.64 us | 2.39 us | 5.29x |
403
- | DAILY weekdays next, COUNT 9k, distant, UTC | 10.00 us | 1.22 us | 8.20x |
404
- | DAILY slots narrow between, COUNT 9k, UTC | 32.88 us | 5.86 us | 5.61x |
405
- | WEEKLY M/W/F slots next, COUNT 9k, UTC | 10.58 us | 1.27 us | 8.33x |
406
- | MONTHLY last weekday next, COUNT 9k, UTC | 31.55 us | 21.28 us | 1.48x |
407
- | MONTHLY last weekday next, COUNT 128, rank 63 | 21.99 us | 11.70 us | 1.88x |
408
- | SECONDLY `occursOn()`, COUNT 100k | 254.7 ms | 9.35 us | 27,241x |
409
- | DAILY RDATE/EXDATE next, COUNT 9k, rank 8.5k | 53.0 ms | 1.61 us | 32,919x |
410
- | YEARLY BYMONTH/BYMONTHDAY next, COUNT 9k, rank 8.5k | 388.9 ms | 7.41 us | 52,483x |
411
- | SECONDLY `all()`, COUNT 3.6k, explicit Temporal output | 42.9 ms | 18.7 ms | 2.29x |
412
-
413
- The named-zone cold call still includes lazy transition-table construction;
414
- the query harness prints cold timings and each sample's warm range.
415
-
416
- ### Full recurrence generation
417
-
418
- Uncached median ops/s for v2.2.7, measured September 23, 2026 on the same
419
- Apple M2 Max with Node 25.2.1 using the polyfill backend and `rrule` 2.8.1.
420
- Each result is the median of five 200 ms samples after a 200 ms warmup. The
421
- production bundle is minified, which disables `temporal-polyfill`'s
422
- development-only per-instance debug strings. The three-library comparison,
423
- query methodology, and cached-mode summary live in
321
+ Full recurrence generation with uncached `all()` calls, in median ops/s
322
+ (higher is better). Measured September 23, 2026 with v2.2.7 on an Apple M2 Max
323
+ with Node 25.2.1, using the polyfill backend and `rrule` 2.8.1. Each result is
324
+ the median of five 200 ms samples after a 200 ms warmup. The production bundle
325
+ is minified, which disables `temporal-polyfill`'s development-only
326
+ per-instance debug strings. The three-library comparison, query benchmarks,
327
+ release-to-release comparisons, and cached-mode summary live in
424
328
  [`benchmarks/README.md`](benchmarks/README.md).
425
329
 
426
330
  | Scenario | TZ | rrule-temporal median ops/s | rrule median ops/s | vs rrule |
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-Dm68fCwO.cjs`);exports.RRuleTemporal=e.t,exports.allowedFreq=e.n,exports.allowedWeekdays=e.r,exports.weekdayToIsoDay=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-DcoDqR4A.cjs`);exports.RRuleTemporal=e.t,exports.allowedFreq=e.n,exports.allowedWeekdays=e.r,exports.weekdayToIsoDay=e.i;
package/dist/index.d.cts CHANGED
@@ -135,6 +135,7 @@ declare class RRuleTemporal<TOutput extends TemporalZonedDateTimeInput = Tempora
135
135
  private emitAnchorZdt?;
136
136
  private numericQueryPlanCache;
137
137
  private periodQueryPlanCache;
138
+ private dtstartIsOccurrenceCache?;
138
139
  private static readonly rscaleCalendarSupport;
139
140
  /**
140
141
  * Normalize a ZonedDateTime to the polyfill implementation.
@@ -245,6 +246,14 @@ declare class RRuleTemporal<TOutput extends TemporalZonedDateTimeInput = Tempora
245
246
  * ```
246
247
  */
247
248
  with(updates: Partial<ManualOptions<TOutput>>): RRuleTemporal<TOutput>;
249
+ /**
250
+ * Whether the rule itself generates DTSTART, so includeDtstart must not add
251
+ * it again. The BYxxx filters decide this unless BYSETPOS is present: it can
252
+ * skip a DTSTART that every filter accepts, as a last-Friday rule skips any
253
+ * other Friday. Then the rule, generated without includeDtstart, must start
254
+ * at DTSTART.
255
+ */
256
+ private dtstartIsOccurrence;
248
257
  private addDtstartIfNeeded;
249
258
  private canUseUtcLinearFastPath;
250
259
  private canUseUtcWeeklyFastPath;
package/dist/index.d.ts CHANGED
@@ -135,6 +135,7 @@ declare class RRuleTemporal<TOutput extends TemporalZonedDateTimeInput = Tempora
135
135
  private emitAnchorZdt?;
136
136
  private numericQueryPlanCache;
137
137
  private periodQueryPlanCache;
138
+ private dtstartIsOccurrenceCache?;
138
139
  private static readonly rscaleCalendarSupport;
139
140
  /**
140
141
  * Normalize a ZonedDateTime to the polyfill implementation.
@@ -245,6 +246,14 @@ declare class RRuleTemporal<TOutput extends TemporalZonedDateTimeInput = Tempora
245
246
  * ```
246
247
  */
247
248
  with(updates: Partial<ManualOptions<TOutput>>): RRuleTemporal<TOutput>;
249
+ /**
250
+ * Whether the rule itself generates DTSTART, so includeDtstart must not add
251
+ * it again. The BYxxx filters decide this unless BYSETPOS is present: it can
252
+ * skip a DTSTART that every filter accepts, as a last-Friday rule skips any
253
+ * other Friday. Then the rule, generated without includeDtstart, must start
254
+ * at DTSTART.
255
+ */
256
+ private dtstartIsOccurrence;
248
257
  private addDtstartIfNeeded;
249
258
  private canUseUtcLinearFastPath;
250
259
  private canUseUtcWeeklyFastPath;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{i as e,n as t,r as n,t as r}from"./src-C8UqcHkR.js";export{r as RRuleTemporal,t as allowedFreq,n as allowedWeekdays,e as weekdayToIsoDay};
1
+ import{i as e,n as t,r as n,t as r}from"./src-vjCiI_-u.js";export{r as RRuleTemporal,t as allowedFreq,n as allowedWeekdays,e as weekdayToIsoDay};