Skip to content

Commit 2a3fee1

Browse files
committed
Release v0.2.0: Add Testkit module, extended rewrite rules, migration diagnostics, high-performance APIs, and comprehensive documentation updates.
1 parent 53d33b1 commit 2a3fee1

2 files changed

Lines changed: 77 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,65 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
66

77
---
88

9+
## [0.2.0] - 2026-01-06
10+
11+
### Added
12+
13+
#### Testkit Module (`aether-datafixers-testkit`)
14+
- **TestData** — Fluent builders for creating test data (`TestData.gson().object()...`)
15+
- **AetherAssertions** — Custom AssertJ assertions for `Dynamic`, `DataResult`, `Typed`
16+
- **DataFixTester** — Test harness for isolated DataFix testing with fluent API
17+
- **MigrationTester** — Test harness for full migration chain testing
18+
- **SchemaTester** — Test harness for schema validation
19+
- **QuickFix** — Factory methods for common fix patterns (rename, add, remove, transform)
20+
- **MockSchemas** — Mock schema utilities for testing
21+
- **RecordingContext** — Context that records warnings for test verification
22+
23+
#### Migration Diagnostics
24+
- **DiagnosticContext** — Opt-in diagnostic context for capturing migration reports
25+
- **DiagnosticOptions** — Configurable options (snapshots, rule details, pretty print)
26+
- **MigrationReport** — Structured report with timing, applied fixes, and touched types
27+
- **FixExecution** — Per-fix execution details with before/after snapshots
28+
- **RuleApplication** — Per-rule application details
29+
30+
#### Extended Rewrite Rules
31+
- `Rules.renameFields(ops, map)` — Batch rename multiple fields
32+
- `Rules.removeFields(ops, fields...)` — Batch remove multiple fields
33+
- `Rules.groupFields(ops, target, fields...)` — Group flat fields into nested object
34+
- `Rules.flattenField(ops, field)` — Flatten nested object to root level
35+
- `Rules.moveField(ops, source, target)` — Move field between paths
36+
- `Rules.copyField(ops, source, target)` — Copy field to new location
37+
- `Rules.transformFieldAt(ops, path, fn)` — Transform at nested path
38+
- `Rules.renameFieldAt(ops, path, newName)` — Rename at nested path
39+
- `Rules.removeFieldAt(ops, path)` — Remove at nested path
40+
- `Rules.addFieldAt(ops, path, value)` — Add at nested path
41+
- `Rules.ifFieldExists(ops, field, rule)` — Conditional on field existence
42+
- `Rules.ifFieldMissing(ops, field, rule)` — Conditional on field absence
43+
- `Rules.ifFieldEquals(ops, field, value, rule)` — Conditional on field value
44+
45+
#### High-Performance APIs
46+
- **BatchTransform** — Builder for batching multiple field operations
47+
- `Rules.batch(ops, builder)` — Apply multiple operations in single encode/decode cycle
48+
- `Rules.conditionalTransform(ops, predicate, transform)` — Single-pass conditional transform
49+
- `Rules.ifFieldExists(ops, field, transform)` — Single-pass version (Function overload)
50+
- `Rules.ifFieldMissing(ops, field, transform)` — Single-pass version (Function overload)
51+
- `Rules.ifFieldEquals(ops, field, value, transform)` — Single-pass version (Function overload)
52+
53+
### Changed
54+
55+
#### Performance Optimizations
56+
- Path parsing now uses character-based parsing instead of regex with memoization cache
57+
- `DataFixRegistry.getFixes()` pre-allocates result list and avoids second copy
58+
- `DataFixerImpl` removes redundant validation in hot path (moved to registration time)
59+
- Fix version ordering validated once at registration instead of per-application
60+
61+
### Documentation
62+
- Added comprehensive how-to guides for all extended rules
63+
- Added migration diagnostics usage guide
64+
- Updated quick reference with new APIs (including Testkit module)
65+
66+
---
67+
968
## [0.1.0] - 2025-12-22
1069

1170
### 🎉 Initial Release

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![License](https://img.shields.io/badge/license-MIT-red)
22
![Maven Central](https://img.shields.io/maven-central/v/de.splatgames.aether/aether-datafixers)
3-
![Version](https://img.shields.io/badge/version-0.1.0-orange)
3+
![Version](https://img.shields.io/badge/version-0.2.0-orange)
44

55
# Aether Datafixers 🔧
66

@@ -10,14 +10,17 @@ inspired by Minecraft's DataFixer Upper (DFU), with a focus on **simplicity**, *
1010

1111
---
1212

13-
## ✨ Features (v0.1.0)
13+
## ✨ Features (v0.2.0)
1414

1515
-**Schema-Based Versioning** — Define data types per version with `Schema` and `TypeRegistry`
1616
-**Forward Patching** — Apply `DataFix` instances sequentially to migrate data across versions
1717
-**Format-Agnostic** — Work with any serialization format via `Dynamic<T>` and `DynamicOps<T>`
1818
-**Codec System** — Bidirectional transformation between typed Java objects and dynamic representations
1919
-**Type Safety** — Strong typing with `TypeReference` identifiers for data routing
2020
-**Testkit** — Fluent test data builders, custom assertions, and test harnesses for DataFix testing
21+
-**Migration Diagnostics** — Opt-in structured reports with timing, applied fixes, and snapshots
22+
-**Extended Rewrite Rules** — Batch operations, path-based transforms, conditional rules
23+
-**High-Performance APIs**`Rules.batch()` for single-pass multi-operation transforms
2124
-**JDK 17+** — Built and tested on modern LTS JVMs
2225

2326
---
@@ -79,23 +82,23 @@ Dynamic<?> updated = fixer.update(
7982
<dependency>
8083
<groupId>de.splatgames.aether</groupId>
8184
<artifactId>aether-datafixers-core</artifactId>
82-
<version>0.1.0</version>
85+
<version>0.2.0</version>
8386
</dependency>
8487
```
8588

8689
**Gradle (Groovy)**
8790

8891
```groovy
8992
dependencies {
90-
implementation 'de.splatgames.aether:aether-datafixers-core:0.1.0'
93+
implementation 'de.splatgames.aether:aether-datafixers-core:0.2.0'
9194
}
9295
```
9396

9497
**Gradle (Kotlin)**
9598

9699
```kotlin
97100
dependencies {
98-
implementation("de.splatgames.aether:aether-datafixers-core:0.1.0")
101+
implementation("de.splatgames.aether:aether-datafixers-core:0.2.0")
99102
}
100103
```
101104

@@ -115,7 +118,7 @@ The Bill of Materials (BOM) ensures consistent versions across all Aether Datafi
115118
<dependency>
116119
<groupId>de.splatgames.aether</groupId>
117120
<artifactId>aether-datafixers-bom</artifactId>
118-
<version>0.1.0</version>
121+
<version>0.2.0</version>
119122
<type>pom</type>
120123
<scope>import</scope>
121124
</dependency>
@@ -139,7 +142,7 @@ The Bill of Materials (BOM) ensures consistent versions across all Aether Datafi
139142

140143
```groovy
141144
dependencies {
142-
implementation platform('de.splatgames.aether:aether-datafixers-bom:0.1.0')
145+
implementation platform('de.splatgames.aether:aether-datafixers-bom:0.2.0')
143146
144147
// No version needed
145148
implementation 'de.splatgames.aether:aether-datafixers-core'
@@ -151,7 +154,7 @@ dependencies {
151154

152155
```kotlin
153156
dependencies {
154-
implementation(platform("de.splatgames.aether:aether-datafixers-bom:0.1.0"))
157+
implementation(platform("de.splatgames.aether:aether-datafixers-bom:0.2.0"))
155158

156159
// No version needed
157160
implementation("de.splatgames.aether:aether-datafixers-core")
@@ -400,20 +403,21 @@ mvn test
400403

401404
## 🗺️ Roadmap
402405

403-
- **v0.1.0** (current)
406+
- **v0.1.0**
404407
- Core API and default implementations
405408
- Schema-based versioning with TypeRegistry
406409
- DataFix forward patching system
407410
- Dynamic/DynamicOps format abstraction
408411
- Basic codec infrastructure
409412

410-
- **v0.2.0** (next)
413+
- **v0.2.0** (current)
411414
- **Testkit module** — Fluent test data builders, custom AssertJ assertions, test harnesses
412-
- **Migration diagnostics** — Optional structured report (applied fixes, touched types, timing)
413-
- **Extended rewrite rules** — Common operations like nested rename/move/copy helpers
414-
- **Performance optimizations** — Caching, lazy evaluation improvements (doesn't change API or determinism)
415+
- **Migration diagnostics** — Opt-in structured reports with timing, applied fixes, and snapshots
416+
- **Extended rewrite rules** — Batch operations, path-based transforms, conditional rules
417+
- **High-performance APIs**`Rules.batch()` and single-pass conditional transforms
418+
- **Performance optimizations** — Path caching, optimized fix registry, reduced allocations
415419

416-
- **v0.3.0**
420+
- **v0.3.0** (next)
417421
- **CLI module** — Migrate files and print/export a migration report (batch-friendly)
418422
- **Schema tooling** — Runtime schema validation + diff utilities between versions
419423

0 commit comments

Comments
 (0)