Skip to content

Commit 462206e

Browse files
committed
bump: v2.0.0-beta.1
Tests have changed and there are breaking changes with 1.x, so it should be a major version bump.
1 parent 8a16f16 commit 462206e

File tree

7 files changed

+229
-174
lines changed

7 files changed

+229
-174
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,22 @@ heap vs array: push + top(50) of 100
3838

3939
You can run your own benchmarks with `npm run benchmarks`
4040

41-
## Recent changes
41+
## Changelog
4242

43-
_v1.5:_ Adds `Iterator` interface and `iterator()` method.
43+
### 2.0.x
44+
45+
The main breaking change is that now _`top(N)` does NOT sort the output_. It should not be part of the spec for a priority queue, the output should be the top N elements. It will be _partially ordered_ by definition, that is all.
46+
47+
- `top(N)` is unordered, only the first element is guaranteed to be the top priority element.
48+
- Fixes custom heap issue [#31](https://github.com/ignlg/heap-js/issues/31).
49+
- Performance improvements.
50+
- More tests, even for custom heaps.
51+
- Auxiliary experimental topN algorithms.
52+
- (wip) Benchmarks.
53+
54+
### v1.5.x
55+
56+
- Adds `Iterator` interface and `iterator()` method.
4457

4558
## Examples
4659

dist/docs/classes/_heap_.heap.html

+63-63
Large diffs are not rendered by default.

dist/docs/globals.html

+20-3
Original file line numberDiff line numberDiff line change
@@ -2758,10 +2758,27 @@ <h2>Is it faster than sorting an array?</h2>
27582758
heap vs <span class="hljs-built_in">array</span>: push + top(<span class="hljs-number">50</span>) of <span class="hljs-number">100</span>
27592759
heap x <span class="hljs-number">59</span>,<span class="hljs-number">210</span> ops/sec ±<span class="hljs-number">17.66</span>% (<span class="hljs-number">82</span> runs sampled)
27602760
<span class="hljs-built_in">array</span> x <span class="hljs-number">125</span> ops/sec ±<span class="hljs-number">78.79</span>% (<span class="hljs-number">5</span> runs sampled)</code></pre><p>You can run your own benchmarks with <code>npm run benchmarks</code></p>
2761-
<a href="#recent-changes" id="recent-changes" style="color: inherit; text-decoration: none;">
2762-
<h2>Recent changes</h2>
2761+
<a href="#changelog" id="changelog" style="color: inherit; text-decoration: none;">
2762+
<h2>Changelog</h2>
27632763
</a>
2764-
<p><em>v1.5:</em> Adds <code>Iterator</code> interface and <code>iterator()</code> method.</p>
2764+
<a href="#20x" id="20x" style="color: inherit; text-decoration: none;">
2765+
<h3>2.0.x</h3>
2766+
</a>
2767+
<p>The main breaking change is that now <em><code>top(N)</code> does NOT sort the output</em>. It should not be part of the spec for a priority queue, the output should be the top N elements. It will be <em>partially ordered</em> by definition, that is all.</p>
2768+
<ul>
2769+
<li><code>top(N)</code> is unordered, only the first element is guaranteed to be the top priority element.</li>
2770+
<li>Fixes custom heap issue <a href="https://github.com/ignlg/heap-js/issues/31">#31</a>.</li>
2771+
<li>Performance improvements.</li>
2772+
<li>More tests, even for custom heaps.</li>
2773+
<li>Auxiliary experimental topN algorithms.</li>
2774+
<li>(wip) Benchmarks.</li>
2775+
</ul>
2776+
<a href="#v15x" id="v15x" style="color: inherit; text-decoration: none;">
2777+
<h3>v1.5.x</h3>
2778+
</a>
2779+
<ul>
2780+
<li>Adds <code>Iterator</code> interface and <code>iterator()</code> method.</li>
2781+
</ul>
27652782
<a href="#examples" id="examples" style="color: inherit; text-decoration: none;">
27662783
<h2>Examples</h2>
27672784
</a>

dist/docs/index.html

+20-3
Original file line numberDiff line numberDiff line change
@@ -2758,10 +2758,27 @@ <h2>Is it faster than sorting an array?</h2>
27582758
heap vs <span class="hljs-built_in">array</span>: push + top(<span class="hljs-number">50</span>) of <span class="hljs-number">100</span>
27592759
heap x <span class="hljs-number">59</span>,<span class="hljs-number">210</span> ops/sec ±<span class="hljs-number">17.66</span>% (<span class="hljs-number">82</span> runs sampled)
27602760
<span class="hljs-built_in">array</span> x <span class="hljs-number">125</span> ops/sec ±<span class="hljs-number">78.79</span>% (<span class="hljs-number">5</span> runs sampled)</code></pre><p>You can run your own benchmarks with <code>npm run benchmarks</code></p>
2761-
<a href="#recent-changes" id="recent-changes" style="color: inherit; text-decoration: none;">
2762-
<h2>Recent changes</h2>
2761+
<a href="#changelog" id="changelog" style="color: inherit; text-decoration: none;">
2762+
<h2>Changelog</h2>
27632763
</a>
2764-
<p><em>v1.5:</em> Adds <code>Iterator</code> interface and <code>iterator()</code> method.</p>
2764+
<a href="#20x" id="20x" style="color: inherit; text-decoration: none;">
2765+
<h3>2.0.x</h3>
2766+
</a>
2767+
<p>The main breaking change is that now <em><code>top(N)</code> does NOT sort the output</em>. It should not be part of the spec for a priority queue, the output should be the top N elements. It will be <em>partially ordered</em> by definition, that is all.</p>
2768+
<ul>
2769+
<li><code>top(N)</code> is unordered, only the first element is guaranteed to be the top priority element.</li>
2770+
<li>Fixes custom heap issue <a href="https://github.com/ignlg/heap-js/issues/31">#31</a>.</li>
2771+
<li>Performance improvements.</li>
2772+
<li>More tests, even for custom heaps.</li>
2773+
<li>Auxiliary experimental topN algorithms.</li>
2774+
<li>(wip) Benchmarks.</li>
2775+
</ul>
2776+
<a href="#v15x" id="v15x" style="color: inherit; text-decoration: none;">
2777+
<h3>v1.5.x</h3>
2778+
</a>
2779+
<ul>
2780+
<li>Adds <code>Iterator</code> interface and <code>iterator()</code> method.</li>
2781+
</ul>
27652782
<a href="#examples" id="examples" style="color: inherit; text-decoration: none;">
27662783
<h2>Examples</h2>
27672784
</a>

dist/docs/modules/_heap_.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2763,7 +2763,7 @@ <h3>Comparator</h3>
27632763
<div class="tsd-signature tsd-kind-icon">Comparator&lt;T&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, b<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></div>
27642764
<aside class="tsd-sources">
27652765
<ul>
2766-
<li>Defined in <a href="https://github.com/ignlg/heap-js/blob/5e1416a/src/Heap.ts#L1">Heap.ts:1</a></li>
2766+
<li>Defined in <a href="https://github.com/ignlg/heap-js/blob/8a16f16/src/Heap.ts#L1">Heap.ts:1</a></li>
27672767
</ul>
27682768
</aside>
27692769
<h4 class="tsd-type-parameters-title">Type parameters</h4>
@@ -2803,7 +2803,7 @@ <h3>Is<wbr>Equal</h3>
28032803
<div class="tsd-signature tsd-kind-icon">Is<wbr>Equal&lt;T&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, o<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span></div>
28042804
<aside class="tsd-sources">
28052805
<ul>
2806-
<li>Defined in <a href="https://github.com/ignlg/heap-js/blob/5e1416a/src/Heap.ts#L2">Heap.ts:2</a></li>
2806+
<li>Defined in <a href="https://github.com/ignlg/heap-js/blob/8a16f16/src/Heap.ts#L2">Heap.ts:2</a></li>
28072807
</ul>
28082808
</aside>
28092809
<h4 class="tsd-type-parameters-title">Type parameters</h4>

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "heap-js",
3-
"version": "1.6.0-beta.0",
3+
"version": "2.0.0-beta.1",
44
"description": "Efficient Binary heap (priority queue, binary tree) data structure for JavaScript / TypeScript. Includes JavaScript methods, Python's heapq module methods, and Java's PriorityQueue methods.",
55
"keywords": [
66
"heap",
@@ -88,7 +88,7 @@
8888
"eslint-plugin-promise": "4",
8989
"eslint-plugin-standard": "4",
9090
"husky": "^4.2.5",
91-
"jest": "^25.5.0",
91+
"jest": "^25.5.1",
9292
"lint-staged": "^10.2.0",
9393
"lodash.camelcase": "^4.3.0",
9494
"prettier": "^2.0.5",

0 commit comments

Comments
 (0)