deps: bump JsonSchema.Net 7→9 and ReverseMarkdown 5→6 (with the source fixes)#18
Merged
Conversation
… 6.1.0 Both are major bumps with real breaking changes; supersedes dependabot #15, which only moved the version pins and does not compile. JsonSchema.Net 9: - Evaluate() takes a JsonElement, not a JsonNode. - EvaluationResults.HasErrors is gone; check Errors directly. - FromText() now registers each schema by $id in a process-wide registry that refuses to re-register an $id, so a second LoadFrom() in one process throws. Build into a registry owned by the validator instead. ReverseMarkdown 6 reorganizes Config into grouped options; the flat properties still work but are [Obsolete]. Moved to Tags/Formatting/Links. Kept GithubFlavored: it is NOT an alias for Flavor = MarkdownFlavor.GitHub, which selects the new round-trip-faithful writer that preserves raw HTML (it emits <strong>x</strong> rather than **x**). Adds SchemaValidatorTests covering the schema-rejection path, which had no coverage — the publish fixture only exercised documents that validate. Verified: build -warnaserror is clean, 826/826 tests pass, and the publisher runs end-to-end over the real data/ (12,799 products, 7,349 paints, 76 files schema-validated). Diffing v5 vs v6 markdown through the full HtmlCleaner pipeline, the only output change is that link URLs no longer leak & — v5 double-escaped ampersands in hrefs, so a future scrape may show & -> & in descriptions whose links carry query params. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #15. Dependabot moved the two version pins and nothing else — that branch does not compile. This does the same bump and the migration work.
JsonSchema.Net 7.3.4 → 9.2.2
Three breaking changes, two of which the compiler catches:
Evaluate()takes aJsonElement, not aJsonNode.EvaluationResults.HasErrorsis gone — checkErrorsdirectly.FromText()now registers each schema by$idinto a process-wide registry that refuses to re-register an$id. A secondLoadFrom()in the same process throws"Overwriting registered schemas is not permitted". The publisher calls it once so it would have shipped fine — and then exploded the first time anything constructed two validators. Now each validator builds into a registry it owns.ReverseMarkdown 5.4.0 → 6.1.0
v6 reorganizes
Configinto grouped options (Tags/Formatting/Links); the flat properties still work but are[Obsolete], so with-warnaserrorthey must be migrated. Done.The trap:
GithubFlavoredlooks like it should becomeFlavor = MarkdownFlavor.GitHub. It must not. They're independent in v6 (set one, the other reads back unchanged), andFlavor = GitHubselects the new round-trip-faithful writer that deliberately preserves raw HTML — it emits<strong>x</strong>instead of**x**, i.e. it stops converting. I made this mistake first; 6 tests caught it. There's now a comment on the config so nobody "cleans it up" later.Tests
SchemaValidatorTestsis new. The publish fixture only ever fed the validator documents that pass, so the rejection path — exactly the code the JsonSchema.Net 9 migration rewrote — had zero coverage. The new tests assert a violation actually names its instance location (/files/0/sha256), not just that it throws.Verification
dotnet build -c Release -warnaserror→ 0 warnings, 0 errorsdotnet test -c Release→ 826/826 pass (822 existing + 4 new)data/: 12,799 products, 7,349 paints, 76 files all schema-validated, exit 0.One behavioral change to expect downstream. I diffed v5 vs v6 markdown output through the full
HtmlCleanerpipeline on realistic product HTML. Everything normalizes away except one line — v5 leaked&into link URLs:v5 was emitting broken hrefs; v6 fixes it. So a future product scrape may show
&→&diffs in descriptions whose links carry query params. That's a correction, not a regression — flagging it so it isn't mistaken for churn.Once this lands, #15 can be closed.
🤖 Generated with Claude Code