Skip to content

Releases: TenGosc007/t3core

Add better error handling

Choose a tag to compare

@TenGosc007 TenGosc007 released this 14 Aug 07:56

Release v1.6.0

Add better error handling


Changelog

1.6.0 - 2026-08-14

Added

  • Bounds validation (RangeError) in Board accessors and getLastArrayItem
  • @throws JSDoc on Game constructor, Board accessors, and getLastArrayItem
  • 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 — returns PlayerMoveStatus like savePlayerMove
  • Throwing listeners no longer abort subsequent event emissions; errors are re-thrown after all events fire

Changed

  • savePlayerSelection return type: void → PlayerMoveStatus
  • tsconfig.json lib set to ["ES2021"] for AggregateError

Design pattern refactor introducing a game variant system, strategy-based win detection, and safer public APIs.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 24 Jun 07:52
0dfa231

1.5.0 - 2026-06-24

Added

  • Game variant system with predefined variants selected via the variant option (GameVariant.CLASSIC_3X3)
  • Strategy pattern for game variants: resolveGameStrategy plus the classic3x3 strategy implementation
  • PlayerMoveStatus and BackToMoveStatus return values for savePlayerMove and backToMove
  • Object.freeze on 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

  • boardSize option deprecated; arbitrary board sizes are no longer supported in favor of predefined variant values
  • Type files moved to src/game/types/ and renamed to the .types.ts suffix for consistency
  • GameOptions type moved to src/game/types/Game.types.ts
  • tsup build split into separate CJS and ESM outputs
  • Project structure reorganized: Board.ts and Game.ts moved under src/game/
  • Winning combinations moved to strategy-specific constants

Removed

  • AUDIT.md (replaced by inline JSDoc documentation)

Brief description of the release.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 10 Jun 20:09

Changelog

1.4.4 - 2026-06-10

Fixed

  • fix linked packages

Reduce package size by switching to tsup bundler and limiting published files to `dist/`.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 10 Jun 19:06
d31e220

1.4.3 - 2026-06-10

Added

  • tsup bundler added to devDependencies for faster builds and smaller package size
  • build:tsup and build:tsup:watch scripts added to package.json
  • tsup.config.ts configuration file for bundling with ESM, CJS, and type declarations output

Changed

  • files in package.json now only includes dist/ (previously entire repo was packaged)
  • exports updated to use new tsup output: dist/index.js, dist/index.cjs, dist/index.d.ts
  • .gitignore updated to exclude tsup build artifacts

Add `devin-desktop` editor detection to `publish-release.sh` for proper Devin IDE integration.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 03 Jun 12:59

1.4.2 - 2026-06-03

Fixed

  • publish-release.sh now correctly detects and uses devin-desktop CLI when running from the Devin IDE — added devin-desktop check in the editor fallback chain before code

Fix `publish-release.sh` editor detection to correctly open release notes in Windsurf/Cascade.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 03 Jun 12:34
41b6491

1.4.1 - 2026-06-03

Fixed

  • publish-release.sh now correctly opens the release notes file in Windsurf when run from the Windsurf IDE — windsurf CLI check added before devin and code in the editor fallback chain

Bug fixes, test coverage improvements, and CI integration with fallow code health analysis.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 03 Jun 11:50
d12518e

1.4.0 - 2026-06-03

Added

  • GameEvent.PLAYER_MOVE is now emitted by savePlayerMove with correct index payload
  • GameEvent.RESET is now emitted exclusively by reset() — no longer fires on every state update
  • GameEvent.STATE_CHANGE is now also emitted by backToMove
  • CI workflow (.github/workflows/ci.yml) with test coverage and fallow health analysis on push to main and pull requests
  • test:coverage script in package.json — runs vitest with v8 coverage
  • fallow script in package.json — runs fallow health with coverage data
  • fallow added to devDependencies
  • @vitest/coverage-v8 added to devDependencies
  • Test suite expanded to 38 tests covering all event contracts, snapshot stability, _gameStatus reference preservation, custom board size, and all 8 winning combinations

Fixed

  • _updateGameState was incorrectly emitting GameEvent.RESET on every savePlayerMove and backToMove call
  • GameEvent.PLAYER_MOVE was never emitted (missing emit in _updateGameState)
  • _gameStatus reference was unnecessarily replaced with a new object on every move when the game remained in "running" state

Changed

  • Board._curretnFields renamed to Board._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`.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 18 May 20:14

1.3.0 - 2026-05-18

Added

  • New GameEvent.STATE_CHANGE event emitted by both savePlayerMove and reset — single subscription point for all state mutations
  • GameEventMap[STATE_CHANGE] typed with GameEventPayload

Changed

  • savePlayerMove now also emits GameEvent.STATE_CHANGE after GameEvent.PLAYER_MOVE
  • reset now also emits GameEvent.STATE_CHANGE after GameEvent.RESET
  • GameEvent.PLAYER_MOVE and GameEvent.RESET marked @deprecated — use STATE_CHANGE instead
  • Corresponding GameEventMap entries for PLAYER_MOVE and RESET marked @deprecated

Audit fixes: deprecated API cleanup, configurable board size, `RESET` event payload, and improved game status handling.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 18 May 19:41
bd7188d

1.2.1 - 2026-05-18

Added

  • Configurable board size via GameOptions (new Game({ boardSize: 16 })) — GameOptions exported from public API
  • getFieldByIndex and setFieldByIndex added to IBoard interface
  • Payload added to RESET event — GameEventMap[RESET] now uses optional GameEventPayload (no breaking change)
  • Getter board added to IGame

Fixed

  • savePlayerMove internally called deprecated isFieldSelected(index + 1) — now uses isFieldSelectedByIndex(index)
  • Both console.warn calls removed from savePlayerMove — PlayerMoveStatus return value is sufficient
  • _updateGameStatus failed to clear win/draw state on reset — removed if (isNotRunning) guard; reset() now calls _updateGameStatus() instead of setting status manually
  • EventEmit declared void return type — now generic EventEmit<T> used by IGame as EventEmit<this> for correct fluent API typing
  • Deprecated methods savePlayerSelection, isFieldSelected, getBoard marked @deprecated in IGame

Changed

  • Board accepts optional size parameter (defaults to 9)
  • Old IBoard methods marked @deprecated

CLI moved to a separate package, `BoardField` type exported, and codebase cleaned up.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 17 May 16:28
b913e4d

1.2.0 - 2026-05-17

Added

  • Exported BoardField and IBoard types from the public API (index.ts)
  • Added BoardField type alias (number | PlayerSymbol) to types/Board.ts

Changed

  • CLI (src/ui/) moved to a separate repository t3core-cli — npx t3core-cli
  • bin field removed from package.json — t3core is now a pure library
  • GameEventPayload uses BoardField[] instead of (number | PlayerSymbol)[]
  • GameEventMap[PLAYER_MOVE] payload simplified to { index: number } (full state available via game.snapshot)
  • IBoard and IGame use BoardField consistently
  • tsconfig.json cleaned up — removed unused path alias @/* and narrowed include
  • CI workflows (publish.yml, pull-request.yml) updated to use yarn test --run

Removed

  • CLI entry point index.ts and src/ui/ removed from this repository
  • ts-node, ts-node-dev, tsconfig-paths removed from devDependencies