feat(data-structures): stabilize IndexedHeap - #7245
Conversation
|
The mechanics here are right — this mirrors the My hesitation is that stabilization makes a few choices permanent, and I'd like them settled before this lands rather than after. None of these are defects — they're all defensible as-is — but they're the ones we can't take back:
I'd be happy with 1 and 2 staying as they are if that's the considered call — I mainly want them to be a decision. 3 seems worth doing regardless, since it costs nothing today. Nit, non-blocking: the NaN error-message change (naming the operation) is a behavior change riding along in a rename PR. The new wording matches the style guide and I'm not asking you to split it out — just noting it for the reviewer's benefit. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7245 +/- ##
==========================================
- Coverage 95.03% 95.03% -0.01%
==========================================
Files 618 618
Lines 51596 51849 +253
Branches 9340 9389 +49
==========================================
+ Hits 49035 49275 +240
- Misses 2021 2030 +9
- Partials 540 544 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…td into stabilize-indexed-heap
|
Thanks for making these decisions instead of letting them ship by accident. In order:
|
Promotes IndexedHeap from unstable to stable. The API design was already accepted during the unstable period, so this is the mechanical part:
unstable_indexed_heap.tstoindexed_heap.ts(test file too)./indexed-heap, andmod.tsre-exports the module@experimentaltags and pointed all 29 JSDoc example imports at the new pathOne small change beyond the rename: the NaN rejection error now names the operation that was attempted.
push()and the constructor throwCannot push into IndexedHeap: priority is NaN,set()throwsCannot set priority in IndexedHeap: priority is NaN. Before, all paths said "Cannot set priority".