Skip to content

v3.10.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 11:59
· 270 commits to main since this release
c2e888a

Added

  • stringify(input: PGN | PGN[], options?: StringifyOptions): string — converts
    parsed PGN objects back to valid PGN strings (semantic round-trip fidelity).
    Accepts a single game or an array of games. Reconstructs SAN from Move
    fields, re-serializes annotation commands ([%cal], [%csl], [%clk],
    [%eval]) back into comment blocks, and preserves RAVs and NAGs. Fires
    onWarning for recoverable issues (invalid castling destination, negative
    clock).

Changed

  • src/index.ts refactored into focused internal modules (src/types.ts,
    src/parse.ts, src/stream.ts, src/stringify.ts). Public API unchanged.

Fixed

  • Tagless games with no moves (e.g. [Result "*"]\n\n*) now parse correctly.
    Previously the grammar required at least one move in the movetext.