Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 20, 2025

Bumps @flatten-js/interval-tree from 1.1.3 to 2.0.0.

Release notes

Sourced from @​flatten-js/interval-tree's releases.

Release v2.0.0

Release Notes: 2.0.0

Date: 2025-10-14

This document summarizes the changes included in the v2.0.0 release. It highlights breaking changes, new features, improvements, documentation updates, and migration guidance.

TL;DR

  • Breaking: Keys with identical intervals are now bucketed into one node; value equality is by identity (or custom equal_to).
  • Refactor: New IntervalBase abstraction; comparisons moved to instance methods; augmentation uses merge() (no static helpers).
  • Features: Additional interval types (Interval2D), iterator enhancements, better typings, BigInt support path.
  • DX/Docs: TypeScript-first build, TypeDoc docs with a custom theme and live RunKit examples.

Feedback and testing

Please try the alpha build and share your feedback in GitHub Discussions: https://github.com/alexbol99/flatten-interval-tree/discussions


Breaking Changes

  1. Bucketed values per key (commit: cef6055)

    • Identical interval keys now share a single tree node that contains a bucket (array) of values.
    • exist(key) checks the presence of a node by key.
    • exist(key, value) checks if the specific value exists in the bucket by strict equality (===) unless the value implements equal_to(other).
    • remove(key) removes the entire node (all values in the bucket).
    • remove(key, value) removes only that value; if the bucket becomes empty the node is removed.
    • Impact: If your code depends on having separate nodes for equal keys or on value comparator semantics, adjust accordingly.
  2. Interval comparison and augmentation semantics

    • Removed static comparison helpers from the interval classes. Comparison is now delegated to instance-level methods on IntervalBase and its subclasses.
    • The augmented max field in nodes is computed using instance merge() rather than static helpers.
    • Impact: Custom interval types should extend IntervalBase and may override less_than, equal_to, not_intersect, merge, and comparable_less_than if needed.

New Features

  1. Multiple interval types (commits: 246bb11, docs updates)

    • Interval (default 1D comparable endpoints: number, bigint, string, Date)
    • Interval2D (lexicographic 2D intervals with endpoints as [x, y])
    • The tree accepts either an IntervalBase instance or a numeric tuple [low, high] which is normalized and converted to Interval.
  2. Iterator enhancements

    • iterate() with no arguments yields all values in ascending key order.
    • iterate(interval) finds the lowest intersecting or forward key and iterates forward.
    • Optional mapper (value, key) => output for both search and iterate.
  3. BigInt compatibility

    • Default Interval supports BigInt endpoints; tests demonstrate mixed usage with numbers when explicitly typed/cast.

Refactors & Internal Changes

  1. Introduced IntervalBase and moved comparisons to instances (commit: 246bb11)
    • Interval2D overrides comparison and intersection logic.

... (truncated)

Changelog

Sourced from @​flatten-js/interval-tree's changelog.

Release Notes: 2.0.0

Date: 2025-10-14

This document summarizes the changes included in the v2.0.0 release. It highlights breaking changes, new features, improvements, documentation updates, and migration guidance.

TL;DR

  • Breaking: Keys with identical intervals are now bucketed into one node; value equality is by identity (or custom equal_to).
  • Refactor: New IntervalBase abstraction; comparisons moved to instance methods; augmentation uses merge() (no static helpers).
  • Features: Additional interval types (Interval2D), iterator enhancements, better typings, BigInt support path.
  • DX/Docs: TypeScript-first build, TypeDoc docs with a custom theme and live RunKit examples.

Feedback and testing

Please try the alpha build and share your feedback in GitHub Discussions: https://github.com/alexbol99/flatten-interval-tree/discussions


Breaking Changes

  1. Bucketed values per key (commit: cef6055)

    • Identical interval keys now share a single tree node that contains a bucket (array) of values.
    • exist(key) checks the presence of a node by key.
    • exist(key, value) checks if the specific value exists in the bucket by strict equality (===) unless the value implements equal_to(other).
    • remove(key) removes the entire node (all values in the bucket).
    • remove(key, value) removes only that value; if the bucket becomes empty the node is removed.
    • Impact: If your code depends on having separate nodes for equal keys or on value comparator semantics, adjust accordingly.
  2. Interval comparison and augmentation semantics

    • Removed static comparison helpers from the interval classes. Comparison is now delegated to instance-level methods on IntervalBase and its subclasses.
    • The augmented max field in nodes is computed using instance merge() rather than static helpers.
    • Impact: Custom interval types should extend IntervalBase and may override less_than, equal_to, not_intersect, merge, and comparable_less_than if needed.

New Features

  1. Multiple interval types (commits: 246bb11, docs updates)

    • Interval (default 1D comparable endpoints: number, bigint, string, Date)
    • Interval2D (lexicographic 2D intervals with endpoints as [x, y])
    • The tree accepts either an IntervalBase instance or a numeric tuple [low, high] which is normalized and converted to Interval.
  2. Iterator enhancements

    • iterate() with no arguments yields all values in ascending key order.
    • iterate(interval) finds the lowest intersecting or forward key and iterates forward.
    • Optional mapper (value, key) => output for both search and iterate.
  3. BigInt compatibility

    • Default Interval supports BigInt endpoints; tests demonstrate mixed usage with numbers when explicitly typed/cast.

Refactors & Internal Changes

  1. Introduced IntervalBase and moved comparisons to instances (commit: 246bb11)
    • Interval2D overrides comparison and intersection logic.
    • Node and tree logic rely on interval instance methods for ordering and intersection, and on merge() for augmented max.

... (truncated)

Commits
  • 2e9a7cc Release v2.0.0
  • e0d17a3 docs: update README for master; regenerate docs; finalize RELEASE_NOTES for v...
  • d8d4c31 Merge pull request #57 from alexbol99/2.0.0-alpha
  • cba73d1 chore(node,tree): strengthen typing and nil handling; align left/right subtre...
  • 616271a Rename alpha-testing.md to alpha-testing.yml
  • 8b68ef9 Create alpha-testing.md
  • 9b8a7cb Create alpha-testing.md
  • ff6a7b5 docs(discussions): add alpha testing discussion template; link Discussions fr...
  • e4d38de chore(release): bump version to 2.0.0-alpha.1 for npm publish
  • 8ca2005 docs: regenerate TypeDoc; remove TimeInterval references; reflect comparable_...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 20, 2025
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 20, 2025
@github-actions
Copy link

github-actions bot commented Oct 20, 2025

View Deployment

📑 Demo (React@19) Demo (React@16) 📚 Storybook
🔗 Preview link 🔗 Preview link 🔗 Preview link

Bumps [@flatten-js/interval-tree](https://github.com/alexbol99/flatten-interval-tree) from 1.1.3 to 2.0.0.
- [Release notes](https://github.com/alexbol99/flatten-interval-tree/releases)
- [Changelog](https://github.com/alexbol99/flatten-interval-tree/blob/master/RELEASE_NOTES.md)
- [Commits](alexbol99/flatten-interval-tree@v1.1.3...v2.0.0)

---
updated-dependencies:
- dependency-name: "@flatten-js/interval-tree"
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/flatten-js/interval-tree-2.0.0 branch from 5cbea2c to 1bb22fa Compare October 24, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants