Files
Tree-Data-Structure/CHANGELOG.md
Adrian Kuta e1f01c4e2d feat: Kotlin 2.x/K2, version catalog, serialization & coroutines modules, docs
v3.4 modernization (continued):

- Migrate to Kotlin 2.x (K2); introduce gradle/libs.versions.toml version catalog;
  simplify the JS/Wasm/Node and iOS source-set wiring for the K2 hierarchy template.
- Apply binary-compatibility-validator and Kover plugins.
- New published module tree-structure-serialization: @Serializable TreeNodeDto with
  toDto()/toTreeNode() round-trip (kotlinx.serialization).
- New published module tree-structure-coroutines: asFlow()/pre/post/levelOrderFlow()
  (kotlinx.coroutines Flow traversal).
- Docs: README examples for Sequence/navigation/functional APIs, class-level KDoc
  (thread-safety/complexity), and a CHANGELOG.md.
- Ignore subproject build/ directories.
- Bump version to 3.4.0.

All JVM tests green (core + both modules).
2026-06-06 13:47:20 +02:00

2.3 KiB

Changelog

All notable changes to this project are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

3.4.0

Added

  • Lazy Sequence traversal: asSequence(order), preOrderSequence(), postOrderSequence(), levelOrderSequence() — composes with the Kotlin stdlib and short-circuits.
  • Navigation extensions: isLeaf, degree, root(), ancestors(), siblings(), leaves(), descendants().
  • Functional extensions: findNode, filterNodes, anyNode, allNodes, countNodes, foldNodes, mapValues, deepCopy, structurallyEquals (all stack-safe).
  • New optional modules published as separate artifacts:
    • tree-structure-serializationkotlinx.serialization support via a TreeNodeDto.
    • tree-structure-coroutinesFlow traversal (asFlow, preOrderFlow, …).
  • CHANGELOG.md, expanded README examples, and class-level KDoc (thread-safety / complexity).

Changed

  • nodeCount(), height(), clear() and the post-order iterator are now iterative — deep or degenerate (linear) trees no longer throw StackOverflowError.
  • Migrated to Kotlin 2.x (K2 compiler) and introduced a Gradle version catalog.
  • Build now uses binary-compatibility-validator (committed .api baselines) and Kover.

3.1.5

Fixed

  • Removed a stray println in TreeNode.removeChild() that printed to stdout on every removal.

Removed

  • Deleted the Example.ws.kts worksheet and the kotlin("script-runtime") dependency from the published JVM artifact, plus the leftover ExampleUnitTest template test.

Changed

  • Bumped actions/checkout v2 → v4 in CI workflows.

3.1.4

  • Updated Kotlin and JS dependencies; added the wasmJs target.

3.1.3

  • iOS targets and Maven Central (Sonatype Central Portal) publishing.