Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 19 Sep 09:58
· 328 commits to main since this release

Added

  • morg is distributed on npm as @remigius42/morg — the bare morg
    name is squatted — so npx @remigius42/morg runs the CLI without an
    install. It ships as a single ESM build carrying its own type
    declarations, with dependencies declared rather than bundled: the
    production tree is 89 packages and 13 MB, which npx fetches once and
    then caches, whereas inlining it would hand library consumers a frozen
    private copy of unified and remark that they could neither deduplicate
    nor upgrade. exports now names its types so node16 and bundler
    resolution find the declarations outright instead of falling back to
    finding them beside the JavaScript. No compiled binaries: anyone with
    Node is already covered, and a bun build --compile matrix would add
    a second runtime and macOS notarization for the rest.

  • @types/mdast is a runtime dependency rather than a dev dependency:
    the declarations for the exported transformMdastToUniorgAst and
    transformUniorgAstToMdast name mdast's Root, so a consumer whose
    package manager does not hoist it — pnpm's strict layout, Yarn PnP —
    could not resolve mdast and lost the types for the whole module.

  • Published versions carry a provenance attestation, so what is on the
    registry can be traced back to the commit and the workflow run that
    built it, and each has a GitHub Release whose notes are this file's
    section for that version.

  • Opt-in recordStyle (--record-style, [markdownToOrg], Web UI
    checkbox) records the Markdown style a source was written in — bullet,
    emphasis, strong, fence and thematic-break markers, and the rule's
    length where it is longer than remark's own --- — as a leading
    #+MORG_MARKDOWN_STYLE: keyword, and org → md restores it. A file
    whose markers are used consistently now survives the round trip
    untouched instead of being reformatted once. This does not weaken
    convergence: the recorded output is still a fixed point in both
    directions, and what grows is the set of inputs the round trip
    already leaves alone.

    Recording is document-wide, so a marker used two ways is skipped and
    reported via onWarning rather than guessed at, and per-node style
    (mixed bullets on sibling lists, reference vs. inline links) stays out
    of scope — an inline node has no anchor to hang a record on, and a
    positional side-table would desynchronize the first time the org file
    is edited by hand. Opt-in because the keyword is a morg-specific line
    in the format the user keeps and reads. morg normalize drops the
    keyword, since canonical form is the whole point of normalizing —
    unless it is itself given --record-style, which re-records the
    canonical form's own markers.
    See ADR 0004.

  • The embed page reports its content height to the page that frames it,
    as a { type: "morg:height", height } message, so a host can size the
    iframe to the converter instead of guessing at it. Every guess is
    wrong in one of two ways — too short leaves a scrollbar inside the
    frame, right next to the textareas' own, and too tall leaves dead
    space — and no host can guess better, because the height is the
    converter's to know: expanding Options or Config roughly doubles it,
    and the input and output stack below 768px. The message carries a
    number describing the page's own layout, never the document being
    converted.

Changed

  • The converter page now follows that message with its own frame, which
    had been fixed at 75% of the window: the converter no longer scrolls
    inside a page that scrolls, and opening Options no longer has to be
    read through a slot two thirds the size of what it opened. The 75%
    stays as the height a browser that never delivers the message is
    left with.

  • Narrow enough that the input and output stack, Copy and Download now
    follow the input box and lead the output, instead of staying in a row
    of buttons above both — where they sat next to the input and two
    boxes away from the output they act on. Side by side nothing moves:
    the buttons still share a row above the boxes.

  • The build version in the Web UI's page chrome is now linked: the tag
    (v0.3.0) opens the changelog on main — not the tag's own copy,
    which is missing everything a deploy ahead of the tag has added under
    Unreleased — and the commit part (g0a1b2c3) opens that commit on
    GitHub. The commit count and a -dirty marker stay plain text, and a
    string that is not a version (the unknown fallback) is not linked at
    all. The links open in a new tab, since the embed page runs inside its
    host's iframe.