Releases: fleeksoft/ksoup
Releases · fleeksoft/ksoup
0.2.6
- 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
- @peacefulprogram made their first contribution in #124
Full Changelog: 0.2.5...0.2.6
0.2.5
🛠️ Build & Dependencies
- Kotlin
2.2.0, Ktor3.2.2, Okio3.16.0, kotlinx-io0.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
childNodescache - 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→ useElement#selectNodes
0.2.4
✨ 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
SimpleStreamReaderfor fast flat tokenised reads.QuietAppenderto silence noisy logs during tests.
DOM & selector APIs
Selector.evaluatorOf(css)– obtain anEvaluatorwithout building a fullSelector.- 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
HttpClientafter 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.
- Scripts inside
- Miscellaneous – fixed typo in parser messages and other small logic/test issues.
🔋 Performance
TokenQueuenow reuses itsCharacterReaderbuffer, reducing allocations under heavy tokenisation.
📈 Tests & Coverage
- Added coverage for Tag and TokenData.
- New
ksoup-network-testmodule with mocks. - Coverage for calculate-position logic.
🗑️ Deprecations & Removals
- Removed legacy deprecated code and TODO placeholders.
Ktor2APIs now deprecated – migrate to the Ktor 3 variant.
0.2.3
🚀 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
nofollowattributes. - Element API: Added Stream-based element selection for enhanced usability.
🔨 Major Refactoring
- Aligned HTML parsing with the latest specification.
- Introduced
TagSetto simplify and optimize parsing logic. - Improved internals of
NodeandDocumentAPIs. - Deprecated
ChangeNotifyingArrayList. - Revamped
QueryParserfor 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
What's Changed
- Fixes #102 Add support for Android native targets
- Fixes #101 Android minkSdk 21
- Add
Ksoup.parse(reader: Reader)for parsing from aReaderinstance - 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
Dependency Updates
- Kotlin: Updated to
2.1.0. View Commit - Ktor2: Updated to
2.3.13. View Commit - kotlinx-io: Updated to
0.6.0. View Commit - Android Gradle Plugin (AGP): Updated to
8.7.2. View Commit - jsoup: Updated to
1.18.3. View Commit
Functional and Structural Changes
- Library Renaming:
com.fleeksoft.ksoup:ksoup-litehas been renamed tocom.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
ControllableInputStreamfor enhanced control over input streams. - Dependency Cleanup: Removed Ktor dependency from the
coremodule. View Commit - Module Renaming: Renamed
fleeksoft-kotlinx-iotofleeksoft-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.
- Core Modules:
0.2.0
What's Changed
- Fixes #96 Android Empty document Error with network library by @itboy87
- Fixes #90 Add
Watchossupport 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
0.1.8
What's Changed
- Add
ksoup-litevariant 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
SourceReaderoperating with ByteArray #76
0.1.7
- Fix ktor2 #69
- Bump ktor3 to
3.0.0-rc-1 - Change Stately dep and Bump its version to
2.1.0 - Parse in quirksmode if no doctype html
- Use a SoftPool of ElementIterators vs a single ThreadLocal