Releases: echecsjs/trf
Releases · echecsjs/trf
Release list
v4.0.0
Changed
- BREAKING:
parse()now returnsTournamentData | nullinstead of
Tournament | null. TheTournamenttype (extendingTournamentDatawith
TRF-specific fields) is removed. - BREAKING:
stringify()now accepts(data: TournamentData, options?).
TRF-specific fields (version,abnormalPoints,colourSequence, team tags,
etc.) moved toStringifyOptions. - 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
Tournamenttype export.ResultCodetype export (internal).
v3.4.0
Added
- Tags
801and802— informative team round-by-round results. Tag802
parsed into structured fields (opponent, color, game points, forfeit
indicator, bye types). Tag801stores raw per-round strings (board-level
detail is undocumented in the spec). NewTournament.teamRoundResultsfield. - New exported types:
TeamRoundResult,TeamRoundResult801,
TeamRoundResult802.
v3.3.0
Added
- Tag
162— Scoring point system for individuals. NewScoringSystem
interface with fields:win,draw,loss,absence,
pairingAllocatedBye,unknown. Stored inTournament.scoringSystem. - Tag
192— Encoded tournament type. NewTournament.encodedTournamentType
field (separate from the free-form092tournamentType). - 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.useRankingIdfor rank mode,
white1/black1mapped to existinginitialColour.XXZ— Absent players: newTournament.absentPlayersfield.XXP— Forbidden pairs: stored asprohibitedPairingswith round 0/0
sentinel (coexists with tag260entries).XXA— Per-player accelerations: newPlayerAccelerationtype and
Tournament.playerAccelerationsfield.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
Added
- Parsed and stringified tiebreak tags
202and212(TRF26). New
Tournament.tiebreaksandTournament.standingsTiebreaksfields store the
comma-separated FIDE tiebreak codes.
v3.1.1
Fixed
eslint-config-prettiermoved to end of ESLint config array, preventing
ESLint auto-fix from re-introducing formatting that Prettier rejects.
v1.0.0
First stable release. All known issues resolved:
- Accurate
line/column/offsetpositions inParseErrorandParseWarning - 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 (
g→GM,m→IM,f→FM,
w→WIM) - Correct
Sextype:'m' | 'w'per TRF16 spec - Rating
0treated 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
- Treat rating
0as unrated (undefined) rather than a warning —0is the
JaVaFo convention for unrated players
v0.5.0
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
Sextype:'f'→'w'(TRF16 spec usesm/w, notm/f) - Map JaVaFo single-letter title codes:
g→GM,m→IM,f→FM,w→WIM - 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
- 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 →
undefinedand invalid values →undefinedfor sex/title
v0.3.0
ParseErrorandParseWarningnow report accurateline,column, and
offsetpositions instead of stubs- Added named column constants for all
001player line fields - Added position-accuracy tests for errors and warnings