Commit Graph
100 Commits
Author SHA1 Message Date
Adrian Kuta f1e9a7bb54 chore: gitignore local superpowers working docs (docs/superpowers/) 2026-06-08 08:55:04 +02:00
Adrian Kuta a7d5de1bba docs: remove design spec accidentally committed in v4.1.1 release 2026-06-08 08:53:12 +02:00
Adrian Kuta 160d7c8059 Release 4.1.1: publish on macOS to restore Apple/iOS artifacts 2026-06-08 08:37:35 +02:00
Adrian Kuta f60a5c4a86 Release 4.1.0: structural mutations, query algorithms, customizable prettyString, immutable module
Test / JVM / JS / Wasm / Native + API check (push) Has been cancelled
Test / iOS (push) Has been cancelled
2026-06-07 23:31:15 +02:00
Adrian Kuta 0b8429c859 ci: cache Gradle, harden permissions, fix test triggers (#45)
- Add gradle/actions/setup-gradle caching to all three workflows
- test.yml: trigger on pull_request + push to master (was branches-ignore: master), so PRs from forks are covered and master is verified after merge; add least-privilege permissions and PR-only concurrency
- publishRelease.yml: drop unused 'secrets: inherit' and the dead SNAPSHOT env var (Gradle reads the snapshot project property, not a plain env var); add contents: read permissions; fix the misleading Maven Central comment (upload only stages on Central Portal, the final Publish is manual)
- docs.yml: add Gradle caching
2026-06-07 23:25:55 +02:00
Adrian Kuta f47fb091ec feat: add tree-structure-immutable module (persistent ImmutableTreeNode) (#33) (#44) 2026-06-07 22:40:41 +02:00
Adrian Kuta 6758a68522 feat: add customizable prettyString with renderer and connector styles (#36) (#43) 2026-06-07 22:38:30 +02:00
Adrian Kuta 30b2709803 feat: add tree query algorithms (lowestCommonAncestor/distance/pathBetween/contains) (#35) (#42) 2026-06-07 22:36:48 +02:00
Adrian Kuta 06eae4841e feat: add structural mutation helpers (insert/move/replace/sort children) (#34) (#41) 2026-06-07 22:35:04 +02:00
Adrian Kuta 1f60b854de Publish API reference (Dokka HTML) to GitHub Pages (#32) (#40)
* docs: design spec for Dokka HTML API reference on GitHub Pages (#32)

* docs: implementation plan for Dokka API reference on GitHub Pages (#32)

* build: migrate Dokka 1.9.20 -> 2.2.0 (DGP v2) (#32)

* docs: aggregate all modules into one Dokka HTML site with source links (#32)

* docs: add Dokka source links to serialization/coroutines/compose modules (#32)

* ci: add docs workflow to deploy Dokka HTML to GitHub Pages (#32)

* docs: link the published API reference from the README (#32)
2026-06-07 21:48:58 +02:00
Adrian Kuta 100054585f chore: ignore the Kotlin 2.x .kotlin/ build cache directory 2026-06-07 19:53:08 +02:00
Adrian Kuta a7018b8c61 docs: rewrite README for clarity and usefulness
- One consistent example tree throughout; fixed prettyString output mismatch.
- Task-oriented sections (building/traversal/navigation/functional/utilities/mutating).
- Per-module usage for serialization, coroutines, and compose.
- Condensed the maintainer publishing section; added a thread-safety note and CHANGELOG link.
2026-06-07 19:50:02 +02:00
Adrian Kuta bec1fe02a7 feat: tree-structure-compose (LazyTree) + O(n) addChild cycle check
- New published module tree-structure-compose: a LazyTree composable for Compose
  Multiplatform (JVM/desktop, iOS, Wasm) with lazy rendering and expand/collapse.
- Fix an O(n^2) regression in addChild(): only walk ancestors for cycle detection
  when the child already has a subtree (a fresh leaf can never form a cycle), so
  building deep trees is O(n) again. Caught by the deep-chain stack-safety test on JS.
- README: Compose usage section; align all install snippets to 4.0.0.
- Version catalog: Compose Multiplatform + compose-compiler plugins.

Verified locally: JVM, JS(node), Wasm(node), iOS-simulator tests + apiCheck all green;
Compose module compiles for JVM, Wasm and iOS.
2026-06-07 18:55:07 +02:00
Adrian Kuta 69d19f89e3 feat!: v4.0 breaking API cleanup + explicitApi
BREAKING changes to the core:
- treeIterator is now a read-only `val`; added `iterator(order)` and use `asSequence(order)`.
- removeChild() only removes a direct child of the receiver; added `detach()` to unhook a node.
- addChild() rejects re-parenting and cycles (throws TreeNodeException); detach() first to move.
- clear() no longer nulls the receiver's own parent; only removes descendants.
- path() returns List<TreeNode<T>>? (null) instead of throwing.

Also:
- Enable strict explicitApi() across core + both modules; add explicit `public` modifiers.
- Update tests for the new contracts + add TreeNodeV4Test; refresh .api baselines.
- README + CHANGELOG (with migration notes); bump version to 4.0.0.

47 JVM tests green.
2026-06-07 18:47:40 +02:00
Adrian Kuta c9bbea59b0 ci: binary-compat API baselines, multiplatform matrix CI, module docs
- Commit binary-compatibility-validator .api baselines for core + both modules.
- Replace JVM-only CI with a matrix: Ubuntu runs JVM/JS(node)/Wasm(node)/Native
  + apiCheck; macOS runs the iOS simulator tests.
- README: install + usage for tree-structure-serialization and -coroutines.
- Update kotlin-js-store/yarn.lock for the new modules' JS test deps.

Verified locally: JVM, JS(node), Wasm(node) and iOS-simulator tests pass for
core + both modules; native compiles & links (exec runs on the Linux CI runner).
2026-06-06 13:51:22 +02:00
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
Adrian Kuta c45c5b7afa feat: stack-safe traversal + lazy Sequence + navigation/functional extensions
Core additive work for v3.4 (non-breaking):

- Rewrite nodeCount(), height(), clear() and the post-order iterator iteratively
  so deep/degenerate trees no longer throw StackOverflowError (verified to 50k deep).
- Add lazy Sequence traversal: asSequence(order), pre/post/levelOrderSequence().
- Add navigation extensions: isLeaf, degree, root(), ancestors(), siblings(),
  leaves(), descendants().
- Add functional extensions: findNode, filterNodes, anyNode, allNodes, countNodes,
  foldNodes, mapValues, deepCopy, structurallyEquals (all stack-safe).
- Add tests for stack-safety, the new APIs, and previously-uncovered
  height/depth/nodeCount/path (incl. exception paths). 40 tests green on JVM.
2026-06-06 13:35:39 +02:00
Adrian Kuta 6de95f7976 Release 3.1.5: remove debug println, drop worksheet leftover, modernize CI
- Remove stray println(child.value) from TreeNode.removeChild()
- Add regression test for removeChild() return value
- Delete leftover ExampleUnitTest.kt template test
- Remove Example.ws.kts worksheet and kotlin("script-runtime") from jvmMain
- Bump actions/checkout v2 -> v4 in CI workflows
- Update README install snippets to 3.1.5
- Bump version to 3.1.5
2026-06-06 13:03:00 +02:00
Adrian Kuta ea0b4fa95c Bump version to 3.1.4 2025-12-25 22:53:43 +01:00
Adrian Kuta 9d52b152bd Merge pull request #31 from AdrianKuta/develop
Develop
2025-12-25 22:46:09 +01:00
Adrian Kuta 0fc7b16664 feat: Update Kotlin and JS dependencies and add Wasm target (#30)
- Upgraded Kotlin from `1.9.20` to `1.9.24`.
- Added a new Kotlin/Wasm target (`wasmJs`) for both browser and Node.js environments.
- Updated numerous JavaScript dependencies in `yarn.lock`, including major upgrades for `webpack`, `terser`, and various `@webpack-cli`, `@jridgewell`, and `@webassemblyjs` packages.
- Configured the Node.js version to `22.0.0` for JS and Wasm targets.
2025-12-25 22:43:29 +01:00
Adrian Kuta d3086a5ced chore: Remove Dependabot configuration
Removes the `.github/dependabot.yml` file, disabling the Dependabot version update checks for the project.
2025-12-25 22:43:17 +01:00
Adrian Kuta 2071084964 Bump version to 3.1.3 2025-12-25 22:41:48 +01:00
Adrian Kuta f51964831a feat: Ignore .idea directory
- Adds the entire `.idea/` directory to `.gitignore` to prevent IDE-specific files from being committed.
2025-12-25 22:29:06 +01:00
Adrian Kuta 60c50f078d Bump version to 3.1.2 2025-10-14 18:47:18 +02:00
Adrian Kuta 54f5074483 26-add-ios-target (#28)
* Refactor: Modernize build and publishing workflow

- Upgraded Kotlin from 1.7.20 to 1.9.20.
- Upgraded JDK from 11 to 21 across all GitHub Actions workflows.
- Replaced the legacy `maven-publish` plugin with `com.vanniktech.maven.publish` for simplified publishing to Maven Central.
- Removed the `publishSnapshot.yml` workflow, as snapshot publishing is now managed by the new plugin.
- Updated `publishRelease.yml` to use the `publishToMavenCentral` task and new secrets (`MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD`).
- Simplified `build.gradle.kts` by removing manual publishing and signing logic.
- Set the JVM target to "21".
- Bumped the project version to `3.1.1`.
- Removed `js` targets and related configurations.
- Added a new code style configuration file for the project (`.idea/codeStyles/Project.xml`).

* fix: Add JavaScript targets

- Added JS (IR) targets (`browser` and `nodejs`) to the Kotlin Multiplatform configuration for publishing.

* Improve README and document new publishing workflow

- Expanded the project description to highlight key features like Kotlin Multiplatform support, traversal iterators, DSL, and utility functions.
- Added a new "Installation" section with instructions for Gradle (Kotlin/Groovy) and Maven.
- Added a "Traversal and utilities" section to demonstrate usage of iterators and helper functions.
- Replaced the old publishing documentation with updated instructions for publishing to Maven Central via the Central Portal.
- Detailed the two publishing methods: automatically via GitHub Actions on release and manually via local Gradle commands.
- Clarified required secrets and environment variables for the new publishing process.
2025-10-14 18:46:05 +02:00
Adrian Kuta 772eeb0465 Migrate publishing to Sonatype s01 and Central Portal
Publish Snapshot / test (push) Has been cancelled
Publish Snapshot / Publish Snapshot (push) Has been cancelled
- Updated build script to support publishing to Sonatype's s01.oss.sonatype.org, which is compatible with the new Maven Central Portal.
- Prioritized Central Portal credentials (CENTRAL_USERNAME, CENTRAL_PASSWORD) over legacy OSSRH credentials.
- Updated repository URLs for releases and snapshots to point to s01.oss.sonatype.org.
- Added documentation in README.md explaining the new publishing setup, environment variables, and Gradle tasks.
2025-09-09 09:12:20 +02:00
Adrian Kuta 456f889b9c Upgrade Gradle and add iOS targets (#27)
Publish Snapshot / test (push) Has been cancelled
Publish Snapshot / Publish Snapshot (push) Has been cancelled
- Upgraded Gradle wrapper to version 8.5.
- Updated Gradle build scripts and configurations.
- Added iOS targets (iosX64, iosArm64, iosSimulatorArm64) to the Kotlin Multiplatform setup.
- Configured shared iOS source sets.
- Bumped project version to 3.1.0.
- Updated JDK version to 21 in project settings.
- Removed kotlinScripting.xml.
- Added runConfigurations.xml and AndroidProjectSystem.xml.

(cherry picked from commit 06dc507590)
2025-09-05 11:17:54 +02:00
Adrian Kuta c3a4ca5925 Revert "Upgrade Gradle and add iOS targets"
This reverts commit 06dc507590.
2025-09-05 11:14:44 +02:00
Adrian Kuta 06dc507590 Upgrade Gradle and add iOS targets
- Upgraded Gradle wrapper to version 8.5.
- Updated Gradle build scripts and configurations.
- Added iOS targets (iosX64, iosArm64, iosSimulatorArm64) to the Kotlin Multiplatform setup.
- Configured shared iOS source sets.
- Bumped project version to 3.1.0.
- Updated JDK version to 21 in project settings.
- Removed kotlinScripting.xml.
- Added runConfigurations.xml and AndroidProjectSystem.xml.
2025-09-05 11:14:05 +02:00
Adrian Kuta 5eaf027dba Create dependabot.yml
Publish Snapshot / test (push) Has been cancelled
Publish Snapshot / Publish Snapshot (push) Has been cancelled
2025-08-19 21:36:09 +02:00
Adrian Kuta 04c3728fcd 24: Add iterator param to TreeNode's constructor. (#25) 2023-07-24 18:50:46 +02:00
Adrian Kuta d34050e9af Merge pull request #23 from AdrianKuta/develop
Relese 3.0.1
2023-02-22 14:32:58 +01:00
Adrian Kuta 2c8381deac Bump version to v3.0.1 2023-02-22 14:30:18 +01:00
Adrian Kuta 4aacbc9dbc 21: Added path function to TreeNode (#22)
Path refers to the sequence of nodes along the edges of a tree.
2023-02-22 14:29:22 +01:00
Adrian Kuta 8a4e677ebf Merge remote-tracking branch 'origin/master' into develop 2023-02-22 12:45:16 +01:00
Adrian Kuta 84e85f3240 Add javaDoc to release library (#20) 2022-12-16 22:26:14 +01:00
Adrian Kuta e34a85ac39 Add javaDoc to release library 2022-12-16 22:22:29 +01:00
Adrian Kuta c306088ea3 Merge pull request #19 from AdrianKuta/develop
Improvements
2022-12-16 19:26:50 +01:00
Adrian Kuta 308c37720d Fix snapshot CI 2022-12-16 19:24:35 +01:00
Adrian Kuta 90af315222 Fix release CI 2022-12-16 19:23:23 +01:00
Adrian Kuta bd5e4f07ae Fix README.md 2022-12-16 19:22:52 +01:00
Adrian Kuta ae4757fb9d Set the correct file structure to maintain backward compatibility. (#18) 2022-12-16 19:05:59 +01:00
Adrian Kuta 5dd586f9af 4: Implement Level-order traversal algorithm (#17) 2022-12-16 19:00:25 +01:00
Adrian Kuta b69e838a8a 5: Implement post-order traversal algorithm (#16) 2022-12-16 18:57:34 +01:00
Adrian Kuta 8a2710339a 14 improve GitHub actions (#15)
* 14: Test CI

* 14: Test CI

* 14: Test CI

* 14: Test CI

* 14: Test CI

* 14: Test CI

* 14: Test CI
2022-12-15 16:28:33 +01:00
Adrian Kuta dd773e3b16 10 Convert into multiplatform library (#13)
* 10: Convert library into Kotlin Multiplatform library

* 10: Setup CI

* 10: Setup CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI
2022-12-15 15:34:36 +01:00
Adrian Kuta 72c94f280d Merge pull request #12 from AdrianKuta/release/v.2.1.0
Release 2.1.0
2022-11-24 23:06:48 +01:00
Adrian Kuta 809914274a Update dependencies (#11) 2022-11-24 23:06:09 +01:00
Adrian Kuta 6f16f1cb85 Update README.md 2022-11-23 09:49:48 +01:00
Adrian Kuta cad5b2dd95 Iterator class refactor 2021-09-03 13:35:18 +02:00
Adrian Kuta 74a6a65434 Merge pull request #9 from AdrianKuta/pr_test
Set up GitHub Actions
2021-09-03 13:23:25 +02:00
Adrian Kuta b0a6c701ae Update README.md 2021-09-03 13:23:15 +02:00
Adrian Kuta 1bd47fcb21 Set up GitHub Actions 2021-09-03 13:19:09 +02:00
Adrian Kuta 20bd96918c Set up GitHub Actions 2021-09-03 13:17:27 +02:00
Adrian Kuta 60805b7187 Set up GitHub Actions 2021-09-03 13:14:25 +02:00
Adrian Kuta 12b1df764c Set up GitHub Actions 2021-09-03 13:12:09 +02:00
Adrian Kuta 43b8982b88 Update README.md 2021-09-03 13:02:32 +02:00
Adrian Kuta 7be868648b Set up GitHub Actions 2021-09-03 12:45:31 +02:00
Adrian Kuta 1702d8dfb5 Set up GitHub Actions 2021-09-03 12:39:38 +02:00
Adrian Kuta 8ac2901e23 Set up GitHub Actions 2021-09-03 12:37:28 +02:00
Adrian Kuta e47c8593da Set up GitHub Actions 2021-09-03 12:31:31 +02:00
Adrian Kuta 060f557752 fixed github actions 2021-09-03 12:16:19 +02:00
Adrian Kuta 224e4d8a29 Merge pull request #8 from AdrianKuta/feat/GitHub_Actions
feat: set up GitHub Actions
2021-09-03 11:52:41 +02:00
Adrian Kuta 4c8c8ecb05 feat: set up GitHub Actions 2021-09-03 11:42:37 +02:00
Adrian Kuta 1199ae2d14 Merge pull request #7 from AdrianKuta/feat/6-upgrade_build_gradle_to_7.0.2
feat: Upgrade build gradle to 7.0.2
2021-09-03 11:42:00 +02:00
Adrian Kuta 784ab07442 feat: Upgrade build gradle to 7.0.2 2021-09-03 11:17:36 +02:00
Adrian Kuta 0e53380420 Update README.md 2020-01-28 18:24:30 +01:00
Adrian Kuta c2ebd5dfe4 child function is now returning TreeNode 2020-01-21 15:39:44 +01:00
Adrian Kuta c320411a40 child function is now returning TreeNode 2020-01-21 15:38:44 +01:00
Adrian Kuta 3c3d418aa2 v1.2.2 2020-01-21 15:11:32 +01:00
Adrian Kuta f00ab975dc Fixed tree initialization in Kotlin 2020-01-21 15:11:04 +01:00
Adrian Kuta eb2d5f07be Extracted prettyString from toString() method to new method prettyString() 2020-01-20 15:42:15 +01:00
Adrian Kuta 3f166aced0 Renamed functions. 2020-01-19 22:55:32 +01:00
Adrian Kuta 8dbbd3b2f8 Update _config.yml 2020-01-17 22:51:13 +01:00
Adrian Kuta f8206013c2 Update _config.yml 2020-01-17 22:50:46 +01:00
Adrian Kuta cf3e5e2c6a Update _config.yml 2020-01-17 22:49:42 +01:00
Adrian Kuta 5cdf1a9cbc Update _config.yml 2020-01-17 22:48:19 +01:00
Adrian Kuta c30d516bd2 Set theme jekyll-theme-minimal 2020-01-16 15:08:45 +01:00
Adrian Kuta dc0317daba Delete CNAME 2020-01-12 23:11:27 +01:00
Adrian Kuta 9834cbf07c Create CNAME 2020-01-12 23:11:01 +01:00
Adrian Kuta 1b08504ab9 Set theme jekyll-theme-slate 2020-01-12 20:40:50 +01:00
Adrian Kuta d49d813ab5 Update README.md 2020-01-12 16:30:22 +01:00
Adrian Kuta 5dd80035e4 Update README.md 2020-01-11 18:52:42 +01:00
Adrian Kuta 3e5401bd9d Updated README 2020-01-11 00:55:15 +01:00
Adrian Kuta 38c3c268c0 Removed unnecessary method 2020-01-11 00:43:41 +01:00
Adrian Kuta 497aa61154 Merge pull request #3 from AdrianKuta/develop
Develop
2020-01-11 00:42:10 +01:00
Adrian Kuta 0ece34daf2 Implemented iterator. Kotlin extensions. 2020-01-11 00:41:36 +01:00
Adrian Kuta 0a04ecd532 Implemented iterator. Kotlin extensions. 2020-01-11 00:20:39 +01:00
Adrian Kuta 567e134b97 TreeNode is now not final. 2020-01-10 11:19:38 +01:00
Adrian Kuta 5adaec9c92 Removed unspecified dependencies from library 2020-01-10 10:00:32 +01:00
Adrian Kuta 541249c84b Fixed library dependencies 2020-01-10 00:41:00 +01:00
Adrian Kuta 9bf01704ee Fix CI 2020-01-10 00:15:50 +01:00
Adrian Kuta 44acda139c Fix CI 2020-01-10 00:11:48 +01:00
Adrian Kuta 6b57541b03 Remove BuildConfig from library. 2020-01-10 00:09:07 +01:00
Adrian Kuta 8bf10927c0 Remove BuildConfig from library. 2020-01-10 00:07:08 +01:00
Adrian Kuta 976d40e0ce Remove BuildConfig from library. 2020-01-10 00:01:20 +01:00
Adrian Kuta 940ae46d2d Update CI 2020-01-09 20:19:39 +01:00
Adrian Kuta a627b22ed1 Update CI 2020-01-09 20:12:25 +01:00
Adrian Kuta c87f712d90 Update README.md 2020-01-09 20:07:06 +01:00