Skip to content

Release notes

Eugene Lazutkin edited this page Mar 15, 2026 · 3 revisions

Release Notes

1.3.2

Bug fixes, improved TypeScript declarations, expanded test coverage, and documentation corrections.

Bug fixes

  • Scheduler: processTasks() now skips canceled tasks instead of executing them.
  • Scheduler: dequeue() guards against already-removed tasks.
  • Scheduler: repeat() stops re-enqueueing when task.isCanceled is set.
  • LimitedQueue: Constructor now validates the limit parameter (applies Math.max(1, limit)).
  • PageWatcher: pause() no longer calls dead super.pause() path; event listeners are removed correctly.
  • PageWatcher: clear() now cancels tasks like ListQueue does.
  • Retainer: release() wraps destroy() in try/catch to prevent unhandled rejections.

TypeScript declarations

  • LimitedQueue.d.ts: enqueue and schedule callbacks now correctly include {task, queue} argument.
  • Various .d.ts files refined for accuracy: Scheduler, FrameQueue, IdleQueue, ListQueue, MicroTask, MicroTaskQueue, PageWatcher, Throttler, Counter, index, random-dist, random-sleep.

Tests

  • Added CommonJS test (test-cjs.cjs).
  • Added many new unit tests for Counter, LimitedQueue, ListQueue, Retainer, Scheduler, Throttler, random-dist.
  • Added TypeScript typing tests for CancelTaskError, MicroTask, LimitedQueue, and browser types.

Documentation

  • Fixed ARCHITECTURE.md: corrected whenDomLoaded/whenLoaded export descriptions, fixed GitHub URLs.
  • Fixed wiki/whenLoaded().md: corrected description (page load, not DOM load).
  • Fixed wiki/Counter.md: removed incorrect LimitedQueue/Counter association.
  • Updated wiki/Scheduler.md: documented repeat() cancellation behavior.
  • Updated file layout in AGENTS.md and rule files to include .mjs/.cjs test patterns.

Clone this wiki locally