diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc0eb0..499c933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,15 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - `AnsiCss.Fixed` in `MarkupString.Ansi` — the stylesheet for the `ms-*` classes. Every one of those classes is written by this package's HTML emitter, so a consumer rendering HTML with - `MarkupString` + `MarkupString.Ansi` alone can now reach the rules; previously they existed only - in `MarkupString.Html`, a package such a consumer has no reason to take. + `MarkupString` + `MarkupString.Ansi` alone can now reach the rules; in 1.0.0 they existed only in + `MarkupString.Html`, a package such a consumer has no reason to take. -### Deprecated +### Removed -- `HtmlCss.Fixed` in `MarkupString.Html`. It returns `AnsiCss.Fixed` unchanged; move to that. +- **Breaking:** `HtmlCss` in `MarkupString.Html`. Use `AnsiCss.Fixed`; the rules are identical. + Nothing else in that package writes an `ms-*` class, so the type had no business being there. + A removal in a minor is a semver break; 1.0.0 is unlisted, having been published the same day + and consumed by nothing, so there is no one to break. ## 1.0.0 — 2026-09-07 diff --git a/MarkupString.Ansi/MarkupString.Ansi.csproj b/MarkupString.Ansi/MarkupString.Ansi.csproj index a762244..604ac0e 100644 --- a/MarkupString.Ansi/MarkupString.Ansi.csproj +++ b/MarkupString.Ansi/MarkupString.Ansi.csproj @@ -9,9 +9,9 @@ CS1591 + each time one goes out; drop it for a release that removes public API on purpose, and put + it back straight after. --> true - 1.0.0 Terminal styling for MarkupString: colours (16, 256 and truecolor), text attributes and links, an ansi() code parser, and emitters that fold a run's layers into one SGR sequence, HTML span, Pueblo/MXP tag or BBCode tag. diff --git a/MarkupString.Html/HtmlCss.cs b/MarkupString.Html/HtmlCss.cs deleted file mode 100644 index 29a3462..0000000 --- a/MarkupString.Html/HtmlCss.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MarkupString.Ansi; - -namespace MarkupString.Html; - -/// -/// The stylesheet for the ms-* classes written when rendering to HTML. -/// -public static class HtmlCss -{ - /// - /// The rules from , which is where they live: every ms-* - /// class is written by the Ansi package's HTML emitter, and this package writes none of its - /// own. Reach for instead — it is available to a consumer that - /// renders HTML without taking this package at all. - /// - [Obsolete("Use AnsiCss.Fixed. Every ms-* class is written by MarkupString.Ansi, so the stylesheet belongs there; a consumer rendering HTML with only MarkupString.Ansi cannot reach it here.")] - public static readonly string Fixed = AnsiCss.Fixed; -} diff --git a/MarkupString.Html/MarkupString.Html.csproj b/MarkupString.Html/MarkupString.Html.csproj index d2e2908..d7f434a 100644 --- a/MarkupString.Html/MarkupString.Html.csproj +++ b/MarkupString.Html/MarkupString.Html.csproj @@ -9,9 +9,9 @@ CS1591 + each time one goes out; drop it for a release that removes public API on purpose, and put + it back straight after. --> true - 1.0.0 Raw HTML tag markup for MarkupString — an MXP <send>, an anchor, a span — rendered as itself in the HTML, Pueblo and MXP formats, folded into terminal styling elsewhere, with the stylesheet for the ms-* classes the emitters write. diff --git a/MarkupString.Html/PublicAPI.Shipped.txt b/MarkupString.Html/PublicAPI.Shipped.txt index 9bd8bc9..ed3d6db 100644 --- a/MarkupString.Html/PublicAPI.Shipped.txt +++ b/MarkupString.Html/PublicAPI.Shipped.txt @@ -1,5 +1,4 @@ #nullable enable -MarkupString.Html.HtmlCss MarkupString.Html.HtmlMarkup MarkupString.Html.HtmlMarkup.$() -> MarkupString.Html.HtmlMarkup! MarkupString.Html.HtmlMarkup.Attributes.get -> string? @@ -29,4 +28,3 @@ static MarkupString.Html.HtmlMarkup.Create(string! tagName, string? attributes = static MarkupString.Html.HtmlMarkup.operator !=(MarkupString.Html.HtmlMarkup? left, MarkupString.Html.HtmlMarkup? right) -> bool static MarkupString.Html.HtmlMarkup.operator ==(MarkupString.Html.HtmlMarkup? left, MarkupString.Html.HtmlMarkup? right) -> bool static MarkupString.Html.HtmlRegistration.WithHtml(this MarkupString.MarkupRegistry! registry) -> MarkupString.MarkupRegistry! -static readonly MarkupString.Html.HtmlCss.Fixed -> string! diff --git a/MarkupString.Html/PublicAPI.Unshipped.txt b/MarkupString.Html/PublicAPI.Unshipped.txt index 7dc5c58..e29b153 100644 --- a/MarkupString.Html/PublicAPI.Unshipped.txt +++ b/MarkupString.Html/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +*REMOVED*MarkupString.Html.HtmlCss +*REMOVED*static readonly MarkupString.Html.HtmlCss.Fixed -> string! diff --git a/MarkupString/MarkupString.csproj b/MarkupString/MarkupString.csproj index bdc22e4..278ed49 100644 --- a/MarkupString/MarkupString.csproj +++ b/MarkupString/MarkupString.csproj @@ -9,9 +9,9 @@ CS1591 + each time one goes out; drop it for a release that removes public API on purpose, and put + it back straight after. --> true - 1.0.0 Immutable styled text: a string plus layered markup runs, rendered to ANSI, HTML, Pueblo, MXP, BBCode or plain text through a registry of emitters, and round-tripped through JSON. diff --git a/docs/releasing.md b/docs/releasing.md index f816258..43325e1 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -33,9 +33,14 @@ build if the two ever disagree. The tag triggers `.github/workflows/release.yml`. `workflow_dispatch` with the tag name as input does the same thing by hand. -4. After the **first** ever release, set `PackageValidationBaselineVersion` to it in each of the - three package files. Package validation then diffs every later build against the published - baseline and fails on a break. +4. After the release lands on nuget.org, set `PackageValidationBaselineVersion` to it in each of + the three package files. Package validation then diffs every later build against that published + surface and fails on a break — including one you did not mean to make. + + A release that *does* remove or re-signature public API is the exception: drop the property for + that build, release, then set it to the new version. `PublicAPI.Unshipped.txt` still records each + removal as a `*REMOVED*` line, so the removal is reviewed rather than merely permitted — and + unlist the version being broken away from, so nobody resolves to a surface that no longer holds. ## What the release workflow does @@ -81,4 +86,4 @@ repository was set up; the first successful push claims them. - [ ] `PublicAPI.Unshipped.txt` promoted to `PublicAPI.Shipped.txt` in all three packages - [ ] Trusted publishing policy exists on nuget.org for `SharpMUSH/MarkupString` (first release only) - [ ] Tag pushed, `Release` workflow green -- [ ] `PackageValidationBaselineVersion` set (after the first release only) +- [ ] `PackageValidationBaselineVersion` raised to the version just published