Skip to content

Releases: fleeksoft/ksoup

0.2.6

19 Feb 13:23
1285e3a

Choose a tag to compare

  • Updated build + CI (Gradle 9.3.1, workflow refresh, cleaner build scripts)
  • Dependency upgrades: Kotlin 2.3.10, AGP 8.13.2, Ktor 3.4.0, plus kotlinx/Okio/Dokka updates
  • Improved KMP/JS exports (moved to platform-agnostic @KmpJsExport)
  • Aligned code with jsoup 1.22.1
  • Better HTML/XML parsing reliability + expanded fuzz/integration test coverage

New Contributors

Full Changelog: 0.2.5...0.2.6

0.2.5

03 Aug 02:31
a5f0049

Choose a tag to compare

🛠️ Build & Dependencies

  • Kotlin 2.2.0, Ktor 3.2.2, Okio 3.16.0, kotlinx-io 0.8.0
  • Gradle Wrapper updated to 8.14.3
  • Removed deprecated: kotlin.native.ignoreIncorrectDependencies

🔬 CI & Compatibility

  • GitHub Actions matrix: Java 17, 21, 24
  • Expanded test coverage: unit, concurrency, edge cases

⚙️ Enhancements

  • Improved DOM performance with childNodes cache
  • Refactored iterators, attribute, and parser logic
  • Build cleanup and code simplification

🐛 Bug Fixes

  • Base URI resolution, text node whitespace, stream reader edge cases
  • Maven publish ordering
  • ✅ Resolved Bug #122

📚 Documentation

  • Deprecated PseudoTextElement → use Element#selectNodes

0.2.4

28 May 18:55
55f2a87

Choose a tag to compare

✨ Highlights

Area What’s new
Core API SimpleStreamReader for lightweight streaming.
Selector.evaluatorOf(css) for direct evaluator creation.
• Traversal helpers: NodeVisitor#traverse & NodeFilter#traverse.
TagSet#onNewTag(Consumer<Tag>) hook to customise tag handling.
Parser accuracy • Scripts inside <svg> now parsed with ScriptData mode.
• Inline-element whitespace preserved correctly.
TokenQueue reuses its CharacterReader buffer for lower allocations.
Networking • New ksoup-network-test module with mock-based test suite.
HttpClient always closed; inject a custom client if you need full control.
Tooling & CI GitHub Actions matrix simplified; macOS target added.
runTests.sh auto-expands default task list and supports space-delimited args.
• Mocha timeout bumped to 15 s for wasm tests.
Dependencies Kotlin 2.1.21, Ktor 3.1.3, Okio 3.11.0, jsoup 1.20.1, Gradle 8.14.1, maven-publish plugin 0.32.0.

🆕 Features

Streaming / IO

  • SimpleStreamReader for fast flat tokenised reads.
  • QuietAppender to silence noisy logs during tests.

DOM & selector APIs

  • Selector.evaluatorOf(css) – obtain an Evaluator without building a full Selector.
  • Traversal helpers: NodeVisitor#traverse, NodeFilter#traverse.

Tag System

  • TagSet#onNewTag(Consumer<Tag> customizer) lets libraries register extra behaviour on-the-fly.

🐛 Bug Fixes

  • Networking – always close HttpClient after each request.
    If you need a long-lived client, inject it with the new engine-factory hook.
  • HTML parsing
    • Scripts inside <svg> now handled in ScriptData state.
    • No whitespace trimming when the previous element was inline.
  • Miscellaneous – fixed typo in parser messages and other small logic/test issues.

🔋 Performance

  • TokenQueue now reuses its CharacterReader buffer, reducing allocations under heavy tokenisation.

📈 Tests & Coverage

  • Added coverage for Tag and TokenData.
  • New ksoup-network-test module with mocks.
  • Coverage for calculate-position logic.

🗑️ Deprecations & Removals

  • Removed legacy deprecated code and TODO placeholders.
  • Ktor2 APIs now deprecated – migrate to the Ktor 3 variant.

0.2.3

29 Apr 17:43
60b3bf8

Choose a tag to compare

🚀 Key Highlights

📝 Licensing Updates

  • Migrated from Apache-2.0 to MIT License.

🔄 Dependency and Versioning

  • Upgraded dependencies to the latest stable versions.

✨ New Features

  • XML Parsing: Implemented scoped namespace support and improved XML handling.
  • HTML Cleaner: Enhanced handling of relative links and nofollow attributes.
  • Element API: Added Stream-based element selection for enhanced usability.

🔨 Major Refactoring

  • Aligned HTML parsing with the latest specification.
  • Introduced TagSet to simplify and optimize parsing logic.
  • Improved internals of Node and Document APIs.
  • Deprecated ChangeNotifyingArrayList.
  • Revamped QueryParser for improved robustness and usability.
  • Normalized XML tag naming convention.
  • Simplified and enhanced logic in TreeBuilder.

🛠️ Stability and Testing

  • Hardened IO streamer with robust exception handling.
  • Added comprehensive integration tests for evaluators, selectors, and printers.
  • Conducted null-safety enhancements and code-style cleanups across test suites and APIs.
  • Updated test resources and related GitHub resource links.

0.2.2

05 Feb 13:50
1666cb8

Choose a tag to compare

What's Changed

  • Fixes #102 Add support for Android native targets
  • Fixes #101 Android minkSdk 21
  • Add Ksoup.parse(reader: Reader) for parsing from a Reader instance
  • Upgrade Gradle to 8.11.1
  • Upgrade Kotlin to 2.1.10
  • Upgrade fleeksoft-io to 0.0.3
  • Upgrade Ktor to 3.0.3
  • Update Ksoup to use the core version of fleeksoft-io

0.2.1

30 Nov 20:10
a836e6c

Choose a tag to compare

Dependency Updates


Functional and Structural Changes

  • Library Renaming: com.fleeksoft.ksoup:ksoup-lite has been renamed to com.fleeksoft.ksoup:ksoup.
  • Charset Support: Introduced support for com.fleeksoft.charset for robust encoding and decoding operations.
  • I/O Refactoring:
    • Leveraged JVM-specific actual classes for streaming functionality.
    • Replaced I/O classes with fleeksoft-io for improved modularity and performance.
  • New Feature: Added ControllableInputStream for enhanced control over input streams.
  • Dependency Cleanup: Removed Ktor dependency from the core module. View Commit
  • Module Renaming: Renamed fleeksoft-kotlinx-io to fleeksoft-io-kotlinx. View Commit

Platform and Module Updates

  • Platform Support: Added support for watchOS, extending ksoup's compatibility to more platforms.
  • Module Updates: The library has been restructured for better modularity:
    • Core Modules: ksoup
    • I/O Modules: ksoup-kotlinx, ksoup-okio, ksoup-korlibs.
    • Network Modules: ksoup-network, ksoup-network-ktor2, ksoup-network-korlibs.

0.2.0

31 Oct 23:36

Choose a tag to compare

What's Changed

  • Fixes #96 Android Empty document Error with network library by @itboy87
  • Fixes #90 Add Watchos support by @itboy87
  • Fixes #89 Add shortcut icon in metadata parse by @itboy87
  • Upgrade Kotlin to version 2.0.21
  • Upgraded Ktor to version 3.0.1
  • Upgrade Gradle to version 10.7.2
  • Added JS unpacking by @DatL4g in #86
  • Fix byte array read size by @itboy87 in #91
  • [Android]: Updated compileSdk to 35
  • [Android]: target SDK 35 and compatible code for older Android versions
  • [Android]: Upgrade AGP to 8.7.1

New Contributors

0.1.9

23 Sep 16:06

Choose a tag to compare

  • Performance improved 3x, faster parsing. (Fixes #80)
  • Added Ksoup.parseMetaData for fetching HTML page metadata. (Closes #61, #64)
  • Upgraded kotlinx-io to version 0.5.4.
  • Added kotlinx benchmarks for performance evaluation and comparison.

0.1.8

18 Sep 07:10

Choose a tag to compare

What's Changed

  • Add ksoup-lite variant without any external IO or Network Dependencies #77
  • Remove charset dependency from ksoup-core #66
  • Remove ktor-http dep from ksoup-core #73
  • Pure Kotlin implementation for CodePoint & remove the external dependency for CodePoint #74
  • Create SourceReader operating with ByteArray #76

0.1.7

11 Sep 13:26
880852a

Choose a tag to compare