Skip to content

Releases: echecsjs/trf

v4.0.0

Choose a tag to compare

@github-actions github-actions released this 25 May 18:15
f57780e

Changed

  • BREAKING: parse() now returns TournamentData | null instead of
    Tournament | null. The Tournament type (extending TournamentData with
    TRF-specific fields) is removed.
  • BREAKING: stringify() now accepts (data: TournamentData, options?).
    TRF-specific fields (version, abnormalPoints, colourSequence, team tags,
    etc.) moved to StringifyOptions.
  • Tag 299 (abnormal points) converted to PointAdjustment[] at parse time.
  • Tag XXZ (absent players) mapped to TournamentData.withdrawnPlayers.
  • Tag 172 (starting rank method) mapped to
    TournamentMetadata.startingRankMethod.
  • Derivable values (numberOfPlayers, byes, forfeitedMatches) computed by
    stringify() internally.

Removed

  • Tournament type export.
  • ResultCode type export (internal).

v3.4.0

Choose a tag to compare

@github-actions github-actions released this 18 Apr 14:16
7e83d2f

Added

  • Tags 801 and 802 — informative team round-by-round results. Tag 802
    parsed into structured fields (opponent, color, game points, forfeit
    indicator, bye types). Tag 801 stores raw per-round strings (board-level
    detail is undocumented in the spec). New Tournament.teamRoundResults field.
  • New exported types: TeamRoundResult, TeamRoundResult801,
    TeamRoundResult802.

v3.3.0

Choose a tag to compare

@github-actions github-actions released this 30 Mar 18:05
3891bf9

Added

  • Tag 162 — Scoring point system for individuals. New ScoringSystem
    interface with fields: win, draw, loss, absence,
    pairingAllocatedBye, unknown. Stored in Tournament.scoringSystem.
  • Tag 192 — Encoded tournament type. New Tournament.encodedTournamentType
    field (separate from the free-form 092 tournamentType).
  • Tags 172, 222, 352, 362 — Raw string passthrough. New fields:
    startingRankMethod, encodedTimeControl, colourSequence,
    teamScoringSystem. Values preserved on round-trip.
  • Full TRFx support — JaVaFo extension tags (XXC, XXZ, XXP, XXA, XXS)
    are now parsed and stringified.
  • XXC — Configuration: Tournament.useRankingId for rank mode,
    white1/black1 mapped to existing initialColour.
  • XXZ — Absent players: new Tournament.absentPlayers field.
  • XXP — Forbidden pairs: stored as prohibitedPairings with round 0/0
    sentinel (coexists with tag 260 entries).
  • XXA — Per-player accelerations: new PlayerAcceleration type and
    Tournament.playerAccelerations field.
  • XXS — Extended scoring system: 11 new colour-specific fields on
    ScoringSystem (whiteWin, blackWin, whiteDraw, blackDraw,
    whiteLoss, blackLoss, forfeitWin, forfeitLoss, fullPointBye,
    halfPointBye, zeroPointBye). Supports shortcut expansion (W, D) and
    last-value-wins semantics.
  • New exported types: PlayerAcceleration, ScoringSystem.

v3.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Mar 19:47
5aba290

Added

  • Parsed and stringified tiebreak tags 202 and 212 (TRF26). New
    Tournament.tiebreaks and Tournament.standingsTiebreaks fields store the
    comma-separated FIDE tiebreak codes.

v3.1.1

Choose a tag to compare

@github-actions github-actions released this 21 Mar 18:42
d21c20c

Fixed

  • eslint-config-prettier moved to end of ESLint config array, preventing
    ESLint auto-fix from re-introducing formatting that Prettier rejects.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 10:38

First stable release. All known issues resolved:

  • Accurate line/column/offset positions in ParseError and ParseWarning
  • Full optional player field coverage: sex, title, fideId, birthDate,
    federation
  • Real-world fixture tests from JaVaFo (TRFXSample2) and FIDE TEC
    (GrandMommysCup TRF25 sample)
  • JaVaFo backward-compatible title codes (gGM, mIM, fFM,
    wWIM)
  • Correct Sex type: 'm' | 'w' per TRF16 spec
  • Rating 0 treated as unrated, not a warning
  • README with full usage examples and type reference
  • 92 tests across 4 fixture files (bbpPairings, JaVaFo, FIDE TEC)

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 17 Mar 10:36
  • Treat rating 0 as unrated (undefined) rather than a warning — 0 is the
    JaVaFo convention for unrated players

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 10:32

Breaking change: Sex type changed from 'f' | 'm' to 'm' | 'w' to match
the TRF16 spec (w = woman, not f). Any code checking sex === 'f' must be
updated to sex === 'w'.

  • Fix Sex type: 'f''w' (TRF16 spec uses m/w, not m/f)
  • Map JaVaFo single-letter title codes: gGM, mIM, fFM, wWIM
  • Add real-world fixture tests:
    • JaVaFo TRFXSample2 (52 players, Spanish open 2010, freely distributed)
    • FIDE TEC GrandMommysCup TRF25 sample (249 players, 50 teams, 14 rounds)
  • 29 new tests — 92 total

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 10:21
  • Add tests for all optional player fields: sex, title, fideId,
    birthDate, federation
  • Verify correct column offsets for all fields with a fully-populated test line
  • Test blank field → undefined and invalid values → undefined for sex/title

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 09:58
  • ParseError and ParseWarning now report accurate line, column, and
    offset positions instead of stubs
  • Added named column constants for all 001 player line fields
  • Added position-accuracy tests for errors and warnings