diff --git a/CHANGELOG.md b/CHANGELOG.md index c58e157..43ea3a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +Nothing yet. + +## [0.2.0] - 2026-07-05 + ### Changed - Merge the libyaml-port line into main. The ported engine is the sole parser; diff --git a/README.md b/README.md index bcfc392..7f60fca 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ flowchart TB ## Status -The current release is 0.1.2. It includes block mappings, block sequences, +The current release is 0.2.0. It includes block mappings, block sequences, ordered mappings, common scalars, quoted strings, comments, flow collections, literal and folded block scalars, anchors, aliases, YAML directives, document markers, explicit built-in scalar tags, merge-key expansion, complex mapping keys, diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 52aa326..2a7e6d4 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -1,16 +1,16 @@ # Release Process -PureYAML versioning is driven by Git tags. The current release is 0.1.2. +PureYAML versioning is driven by Git tags. The current release is 0.2.0. -## 0.1.2 Release +## 0.2.0 Release - Swift tools version: 6.1 -- Product: `PureYAML` +- Products: `PureYAML`, `PureYAMLJSON` - SwiftPM dependencies: none - Source targets: Swift only, no C targets and no generated parser targets - Hosted CI matrix: macOS build and test, Linux build and test, Windows build and test, WASM build -- Release notes file: `docs/releases/pureyaml-0-1-2.md` +- Release notes file: `docs/releases/pureyaml-0-2-0.md` ## Local Verification @@ -46,16 +46,13 @@ Push `main` and wait for the CI workflow to pass: ```sh git push origin main -gh run list --repo mihaelamj/PureYAML --branch main --limit 5 -gh run watch --repo mihaelamj/PureYAML --exit-status ``` -The passing run must include all CI jobs: - -- macOS -- Linux -- Windows -- WASM +Watch the run at . Until the +full platform matrix runs on Codeberg runners, the authoritative platform +gates are the local ones (`scripts/check-all.sh` covers macOS, the Linux +relay, and WASM); Windows verification is deferred and must be disclosed in +the release notes. ## Tag and Publish @@ -63,19 +60,18 @@ Only run these commands after the local gates pass and hosted CI passes. ```sh git status --short --branch -git tag -a 0.1.2 -m "PureYAML 0.1.2" -git push origin main 0.1.2 -gh release create 0.1.2 \ - --repo mihaelamj/PureYAML \ - --title "PureYAML 0.1.2" \ - --notes-file docs/releases/pureyaml-0-1-2.md +git tag -a 0.2.0 -m "PureYAML 0.2.0" +git push origin main 0.2.0 +tea releases create --login codeberg --repo Mihaela/PureYAML \ + --tag 0.2.0 --title "PureYAML 0.2.0" \ + --note "$(cat docs/releases/pureyaml-0-2-0.md)" ``` After publishing, verify the release exists: ```sh -git ls-remote --tags origin 0.1.2 -gh release view 0.1.2 --repo mihaelamj/PureYAML +git ls-remote --tags origin 0.2.0 +tea releases list --login codeberg --repo Mihaela/PureYAML | head ``` ## Do Not Tag If @@ -84,6 +80,7 @@ gh release view 0.1.2 --repo mihaelamj/PureYAML - `Sources/` contains C, JavaScript, WebAssembly blobs, or generated parser runtime files. - Any Swift source imports Foundation in the library target. -- The changelog does not have a dated 0.1.1 section. +- The changelog does not have a dated section for the version being tagged. - The release notes omit known deferred issues. -- macOS, Linux, Windows, or WASM CI is red or still running. +- Any locally runnable platform gate (macOS, Linux relay, WASM) is red, or a + skipped platform is not disclosed in the release notes. diff --git a/docs/releases/pureyaml-0-2-0.md b/docs/releases/pureyaml-0-2-0.md new file mode 100644 index 0000000..e250263 --- /dev/null +++ b/docs/releases/pureyaml-0-2-0.md @@ -0,0 +1,57 @@ +# PureYAML 0.2.0 + +The parser is now a faithful pure-Swift port of libyaml's scanner and parser +(`PureYAML.Parsing.LibYAML`), replacing the original hand-rolled engine +entirely. The port was verified against libyaml built from source and then +pushed past it: whole-suite conformance against the official YAML test suite +is **402 of 402 cases, zero gaps** (`Tests/Fixtures/yaml-test-suite-manifest.yaml` +is the machine-authoritative record), including six rejections libyaml itself +gets wrong (QB6E, DK95/01, Y79Y/003, S98Z, ZXT5, DK4H). Canonical event +conformance is 308 of 308 valid cases. Measured throughput is 1.6x to 2.15x +faster than Yams on real-world documents. + +## Added + +- `PureYAMLJSON`, a second library product: a standalone YAML to JSON and + JSON to YAML converter with a strict JSON-representability validator + (unique string keys, finite numbers), built on the Check algebra. +- Opt-in located parse: `PureYAML.parseLocated(_:)` and + `PureYAML.parseStreamLocated(_:)` return a `Model.LocatedValue` tree in + which every node carries its source span (1-based line and column), with + exact scalar end positions. The plain `Value` path is byte-identical to + before; a whole-suite test proves the located projection equals a plain + parse for every passing case. +- Type-directed validation: the `Validation.Check` algebra with combinators + and rule-identity configuration replaces the legacy `Rule` type. + `BuiltinCheck.mappingKeysAreUnique` ships in core; the JSON checks live in + `PureYAMLJSON`. + +## Changed + +- Undefined tag handles, tab indentation, under-indented quoted-scalar + continuations, and the other strictness gaps are now parse errors, matching + the official suite's error cases. `PureYAML.validationReport(_:)` carries + such failures as parse diagnostics. +- Diagnostics from the ported engine translate into + `PureYAML.Parsing.ParseError` with libyaml-style messages and 1-based + positions. + +## Verification + +- macOS: full gate (style, namespacing, forbidden patterns, changelog, + roadmap, swiftformat, swiftlint strict, debug and release build and test, + whole-suite conformance sweep). +- Linux: debug and release build and test, Swift 6.3.2 on aarch64 + (593 tests, 136 suites). +- WASM: debug and release library builds with the swift-6.3.2-RELEASE_wasm + SDK. + +## Known deferred issues + +- Windows build and test were NOT run for this release: the Windows CI + workflow was hosted on GitHub and has no Codeberg runner equivalent yet. + The tree is pure Swift with no platform-conditional code paths added since + 0.1.5, but Windows remains unverified until a runner exists. +- The `docs/RELEASE.md` hosted-verification section still assumes the full + four-platform CI matrix; Codeberg Actions currently runs the + rules-conformance workflow only.