You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: heap corruption in remove(), clone() capacity, and stability index bugs (v1.0.3)
- Fix remove() in PriorityQueue, TypedPriorityQueue, and StableTypedPriorityQueue:
up/down heap restoration directions were swapped, causing silent heap corruption
when removing internal elements in queues with >4 elements.
- Fix clone() in TypedPriorityQueue and StableTypedPriorityQueue: used _defaultSize
instead of actual backing array length, causing RangeError after array growth.
- Fix StablePriorityQueue copy constructor: _index (FIFO stability counter) was not
copied, breaking insertion order stability in cloned queues.
- Fix StableTypedPriorityQueue.heap getter: missing sindex property on returned nodes.
- Remove duplicate _indices.set() call in StableTypedPriorityQueue.from().
- Fix incorrect JSDoc on peek() in IPriorityQueueLike (said 'Removes all elements').
- Add regression tests for all fixes.
- Add package-lock.json to .gitignore (project uses bun.lockb).
- Bump version to 1.0.3.
0 commit comments