Repository navigation
Commit 13285c0
committed
Issue #168 port jtd-esm-codegen onto the incubator main
Port the jtd-esm-codegen module from the jdt-to-esm branch onto current
main (parent 2026.08.31, jdk.incubator.java.util.json API). The module
generates standalone ES2020 ESM validator modules from a flat JTD
(RFC 8927) subset for browser consumers; its test suite retains 359
tests (316 official validation.json conformance via GraalJS, 31 unit,
2 jqwik property, 10 junit-js) with 316/316 conformance preserved.
Mechanical adaptations applied:
- Module pom parent version 0.1.9 -> 2026.08.31.
- Package move jdk.sandbox.java.util.json -> jdk.incubator.java.util.json
(JtdParser, JtdEsmConformanceTest, JtdEsmPropertyTest); the three
unused JSON imports in JtdToEsmCodegenTest were deleted.
- API renames: members() -> asMap(), bool() -> asBoolean(),
string() -> asString(), elements() -> asList(), element(i) -> get(i),
Json.toDisplayString(x, 0) -> (x, "").
- Root pom: jtd-esm-codegen registered as an unconditional reactor
module (release target 21; GraalJS is test-scoped only).
- .gitignore: removed the jtd-esm-codegen/ ignore entry.
- ci.yml exp_tests: 1679 -> 2038, measured empirically from
surefire/failsafe XML totals after a full-reactor verify
(matches Agent 1's estimate of 1679 + 359).
- README: module-table row + "JTD to ESM Validator Codegen
(Experimental)" section; AGENTS: module registry entry.
The nightly release workflow (jtd-esm-codegen-release.yml) is
deliberately deferred to a follow-up.
Verify with:
mvn -pl jtd-esm-codegen -am clean test -Djava.util.logging.ConsoleHandler.level=INFO
(359 tests, 0 failures/errors)
mvn clean verify -Djava.util.logging.ConsoleHandler.level=INFO
(BUILD SUCCESS; reactor XML total 2038 tests, 0 failures/errors)1 parent 6aaa7b9 commit 13285c0
24 files changed
Lines changed: 3577 additions & 2 deletions
File tree
- .github/workflows
- jtd-esm-codegen
- src
- main/java/io/github/simbo1905/json/jtd/codegen
- test
- java/io/github/simbo1905/json/jtd/codegen
- resources
- expected
- jtd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
416 | 451 | | |
417 | 452 | | |
418 | 453 | | |
| |||
0 commit comments