Skip to content

Update dependency chess.js to v1#90

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/chess.js-1.x
Open

Update dependency chess.js to v1#90
renovate[bot] wants to merge 1 commit intomainfrom
renovate/chess.js-1.x

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented Jan 11, 2025

This PR contains the following updates:

Package Change Age Confidence
chess.js 0.12.01.4.0 age confidence

Release Notes

jhlywa/chess.js (chess.js)

v1.4.0

Compare Source

Enhancements

v1.3.1

Compare Source

Bug Fixes

v1.3.0

Compare Source

New Team Members!

Please welcome William Hoggarth (@​neofight78) and Autumn Green (@​axolotl-logic) as new chess.js team members! 🎉

Enhancements

Bug Fixes

v1.2.0

Compare Source

Enhancements

v1.1.0

Compare Source

Enhancements

v1.0.0

Compare Source

A big thank you to all the contributors that helped make this release possible! This is a major version update and there are many new features and breaking changes. Please read below for more info.

Typescript

chess.js has been rewritten in TypeScript. Exported types are as follows:

  • Chess class
  • Move class
  • Piece
  • Color
  • Square
  • PieceSymbol

New Methods

  • attackers(square, color) - returns a list of squares occupied by pieces of color that are attacking the given square
  • getCastlingRights(color) - returns { k: boolean, q: boolean } indicating castling rights for color
  • setCastlingRights(color, rights)
  • isAttacked(square, color) - returns true if square is attacked by color
  • isDrawByFiftyMoves()
  • moveNumber()
  • setHeader(key, value), removeHeader(key), getHeaders()
  • removeComment(), removeComments()

Breaking Changes

Exceptions instead of null

The following functions no longer return null when an error occurs. Instead, they now throw exceptions to provide the user with more detailed error information.

  • .load()
  • .loadPgn()
  • .move()
  • Chess() constructor
Function Names

The functions below have been converted to camel-case:

  • game_over -> isGameOver
  • in_check -> isCheck
  • in_checkmate -> isCheckmate
  • in_draw -> isDraw
  • is_stalemate -> isStalemate
  • in_threefold_repetition -> isThreefoldRepetition
  • insufficient_material -> isInsufficientMaterial
  • load_pgn -> loadPgn
  • set_comment -> setComment
  • get_comment -> getComment
  • get_comments -> getComments
  • delete_comment -> deleteComment
  • delete_comments -> deleteComments
  • validate_fen -> validateFen
Function Arguments and Return Values

The arguments and return values for the following functions have changed:

  • load_pgn(pgn, { sloppy: true }) becomes loadPgn(pgn) (strict defaults to false)
  • move('Nb7', { sloppy: true }) becomes moves('Nb7')
  • clear(true) should now be written as clear({ preserveHeader: true })
  • load(fen, true) should now be written as load(fen, { preserveHeader: true })
  • validateFen(fen) now returns { ok: boolean, error?: string }
Deprecations
  • The flags field in the Move object is deprecated. Use the new helper methods below to determine the move type:
    • .isCapture() - is the move a regular capture? NOTE: this is false for an en-passant
    • .isEnPassant() - is the move an en-passant capture?
    • .isBigPawn() - is the move a 2-rank pawn move?
    • .isPromotion() - is the move a pawn promotion?
    • .isKingsideCastle() - is the move a kingside castle?
    • .isQueensideCastle() - is the move a queenside castle?
  • The header function has been deprecated in favor of setHeader and getHeaders
  • The deleteComment and deleteComments functions have deprecated in favor of removeComment and removeComments

Improvements

Bug Fixes

v0.13.4

Compare Source

Bug Fixes

  • [PGN] Fix bug that omitted comments preceding the initial move of a setup position when black is the first to move.

v0.13.3

Compare Source

Bug Fixes

  • [FEN] Fix validate_fen when whitespace is found in place of move number (@​eleurent - b51b44e)

Changes

v0.13.2

Compare Source

Bug Fixes

v0.13.1

Compare Source

Bug Fixes

v0.13.0

Compare Source

Enhancements

v0.12.1

Compare Source

Bug Fixes

  • [PGN] Fix duplication of last move when loading PGN containing trailing comments without a game termination marker (@​jhlywa - 321a25e)
  • [PGN] Fix PGN export that included unnecessary move disambiguators (@​SyntaxBlitz - 1814427)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/chess.js-1.x branch from 2f337d4 to 4c9a8d1 Compare February 22, 2025 14:03
@renovate renovate Bot force-pushed the renovate/chess.js-1.x branch from 4c9a8d1 to 1c57be6 Compare April 6, 2025 13:37
@renovate renovate Bot force-pushed the renovate/chess.js-1.x branch 2 times, most recently from e6050e3 to 9d11fb7 Compare May 31, 2025 04:44
@renovate renovate Bot force-pushed the renovate/chess.js-1.x branch from 9d11fb7 to 8f18d9b Compare June 14, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants