Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .changeset/fix-open-ceiling.md

This file was deleted.

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# @theyoungwolf/lexorank

## 0.1.3

### Patch Changes

- 649fc48: Fix `rankBetween` producing a rank outside its bounds when the two majors are
adjacent and the upper bound carries a minor.

`minorSpaceRanks` only substituted an absolute ceiling when `high.minor` was
exactly `":"`. Otherwise it compared the lower bound's fraction against a
fraction belonging to a _different_ major, which can run descending and yields a
value below `prev`. `assertWithinBounds` caught it, so the symptom was a
`RankInvariantError` rather than silent corruption, but the call still failed.

The shape is reachable from ranks this library produced: grow a fraction at the
top of one major and another at the bottom of the next, then delete the item
between them. Their neighbours are now the failing pair.

The minor's ceiling is now treated as open whenever the bounds do not share a
major, when the upper bound is absent, or when a bucket boundary was spoofed —
and the low-side pivot marks it open too, since borrowing the lower bound's
character puts every extension below the original ceiling.

Ranks already written are unaffected: 40,000 random insertions driven entirely
by library calls produce byte-identical output to the previous release, as do
`rebalance`, `rankAfter` and `rankBefore`. Only inputs that previously threw
change.

## 0.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theyoungwolf/lexorank",
"version": "0.1.2",
"version": "0.1.3",
"description": "A feature-rich TypeScript implementation of the LexoRank ordered-ranking algorithm: bucket overflow, major/minor fractional precision, and batch insertion.",
"keywords": [
"lexorank",
Expand Down
Loading