Repository navigation
Releases: TenGosc007/t3core
Releases · TenGosc007/t3core
Release list
Add better error handling
Release v1.6.0
Add better error handling
Changelog
1.6.0 - 2026-08-14
Added
- Bounds validation (
RangeError) inBoardaccessors andgetLastArrayItem @throwsJSDoc onGameconstructor,Boardaccessors, andgetLastArrayItem- Invariant docs for
getWinnerFromFields/GameStrategy.getWinner - Tests for all new validation and listener error isolation paths
Fixed
savePlayerSelection(deprecated) no longer silently corrupts the board on invalid input — returnsPlayerMoveStatuslikesavePlayerMove- Throwing listeners no longer abort subsequent event emissions; errors are re-thrown after all events fire
Changed
savePlayerSelectionreturn type:void→PlayerMoveStatustsconfig.jsonlibset to["ES2021"]forAggregateError
Design pattern refactor introducing a game variant system, strategy-based win detection, and safer public APIs.
1.5.0 - 2026-06-24
Added
- Game variant system with predefined variants selected via the
variantoption (GameVariant.CLASSIC_3X3) - Strategy pattern for game variants:
resolveGameStrategyplus theclassic3x3strategy implementation PlayerMoveStatusandBackToMoveStatusreturn values forsavePlayerMoveandbackToMoveObject.freezeon board snapshots to prevent external mutations- JSDoc comments across core classes and public APIs
- Test coverage for game strategy resolution,
Board, constants, types, and public API
Changed
boardSizeoption deprecated; arbitrary board sizes are no longer supported in favor of predefinedvariantvalues- Type files moved to
src/game/types/and renamed to the.types.tssuffix for consistency GameOptionstype moved tosrc/game/types/Game.types.tstsupbuild split into separate CJS and ESM outputs- Project structure reorganized:
Board.tsandGame.tsmoved undersrc/game/ - Winning combinations moved to strategy-specific constants
Removed
AUDIT.md(replaced by inline JSDoc documentation)
Brief description of the release.
Reduce package size by switching to tsup bundler and limiting published files to `dist/`.
1.4.3 - 2026-06-10
Added
tsupbundler added todevDependenciesfor faster builds and smaller package sizebuild:tsupandbuild:tsup:watchscripts added topackage.jsontsup.config.tsconfiguration file for bundling with ESM, CJS, and type declarations output
Changed
filesinpackage.jsonnow only includesdist/(previously entire repo was packaged)exportsupdated to use new tsup output:dist/index.js,dist/index.cjs,dist/index.d.ts.gitignoreupdated to exclude tsup build artifacts
Add `devin-desktop` editor detection to `publish-release.sh` for proper Devin IDE integration.
1.4.2 - 2026-06-03
Fixed
publish-release.shnow correctly detects and usesdevin-desktopCLI when running from the Devin IDE — addeddevin-desktopcheck in the editor fallback chain beforecode
Fix `publish-release.sh` editor detection to correctly open release notes in Windsurf/Cascade.
1.4.1 - 2026-06-03
Fixed
publish-release.shnow correctly opens the release notes file in Windsurf when run from the Windsurf IDE —windsurfCLI check added beforedevinandcodein the editor fallback chain
Bug fixes, test coverage improvements, and CI integration with fallow code health analysis.
1.4.0 - 2026-06-03
Added
GameEvent.PLAYER_MOVEis now emitted bysavePlayerMovewith correctindexpayloadGameEvent.RESETis now emitted exclusively byreset()— no longer fires on every state updateGameEvent.STATE_CHANGEis now also emitted bybackToMove- CI workflow (
.github/workflows/ci.yml) with test coverage and fallow health analysis on push tomainand pull requests test:coveragescript inpackage.json— runs vitest with v8 coveragefallowscript inpackage.json— runsfallow healthwith coverage datafallowadded todevDependencies@vitest/coverage-v8added todevDependencies- Test suite expanded to 38 tests covering all event contracts, snapshot stability,
_gameStatusreference preservation, custom board size, and all 8 winning combinations
Fixed
_updateGameStatewas incorrectly emittingGameEvent.RESETon everysavePlayerMoveandbackToMovecallGameEvent.PLAYER_MOVEwas never emitted (missing emit in_updateGameState)_gameStatusreference was unnecessarily replaced with a new object on every move when the game remained in"running"state
Changed
Board._curretnFieldsrenamed toBoard._currentFields(typo fix)coverage/added to.gitignore
Unified game events: introduces `STATE_CHANGE` as a single event for all state mutations, deprecating `PLAYER_MOVE` and `RESET`.
1.3.0 - 2026-05-18
Added
- New
GameEvent.STATE_CHANGEevent emitted by bothsavePlayerMoveandreset— single subscription point for all state mutations GameEventMap[STATE_CHANGE]typed withGameEventPayload
Changed
savePlayerMovenow also emitsGameEvent.STATE_CHANGEafterGameEvent.PLAYER_MOVEresetnow also emitsGameEvent.STATE_CHANGEafterGameEvent.RESETGameEvent.PLAYER_MOVEandGameEvent.RESETmarked@deprecated— useSTATE_CHANGEinstead- Corresponding
GameEventMapentries forPLAYER_MOVEandRESETmarked@deprecated
Audit fixes: deprecated API cleanup, configurable board size, `RESET` event payload, and improved game status handling.
1.2.1 - 2026-05-18
Added
- Configurable board size via
GameOptions(new Game({ boardSize: 16 })) —GameOptionsexported from public API getFieldByIndexandsetFieldByIndexadded toIBoardinterface- Payload added to
RESETevent —GameEventMap[RESET]now uses optionalGameEventPayload(no breaking change) - Getter
boardadded toIGame
Fixed
savePlayerMoveinternally called deprecatedisFieldSelected(index + 1)— now usesisFieldSelectedByIndex(index)- Both
console.warncalls removed fromsavePlayerMove—PlayerMoveStatusreturn value is sufficient _updateGameStatusfailed to clear win/draw state on reset — removedif (isNotRunning)guard;reset()now calls_updateGameStatus()instead of setting status manuallyEventEmitdeclaredvoidreturn type — now genericEventEmit<T>used byIGameasEventEmit<this>for correct fluent API typing- Deprecated methods
savePlayerSelection,isFieldSelected,getBoardmarked@deprecatedinIGame
Changed
Boardaccepts optionalsizeparameter (defaults to9)- Old
IBoardmethods marked@deprecated
CLI moved to a separate package, `BoardField` type exported, and codebase cleaned up.
1.2.0 - 2026-05-17
Added
- Exported
BoardFieldandIBoardtypes from the public API (index.ts) - Added
BoardFieldtype alias (number | PlayerSymbol) totypes/Board.ts
Changed
- CLI (
src/ui/) moved to a separate repository t3core-cli —npx t3core-cli binfield removed frompackage.json—t3coreis now a pure libraryGameEventPayloadusesBoardField[]instead of(number | PlayerSymbol)[]GameEventMap[PLAYER_MOVE]payload simplified to{ index: number }(full state available viagame.snapshot)IBoardandIGameuseBoardFieldconsistentlytsconfig.jsoncleaned up — removed unused path alias@/*and narrowedinclude- CI workflows (
publish.yml,pull-request.yml) updated to useyarn test --run
Removed
- CLI entry point
index.tsandsrc/ui/removed from this repository ts-node,ts-node-dev,tsconfig-pathsremoved fromdevDependencies