Open
Conversation
2f337d4 to
4c9a8d1
Compare
4c9a8d1 to
1c57be6
Compare
e6050e3 to
9d11fb7
Compare
9d11fb7 to
8f18d9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.12.0→1.4.0Release Notes
jhlywa/chess.js (chess.js)
v1.4.0Compare Source
Enhancements
33b19b3)3482911)86d8a0e)v1.3.1Compare Source
Bug Fixes
a48cfed)v1.3.0Compare Source
New Team Members!
Please welcome William Hoggarth (@neofight78) and Autumn Green (@axolotl-logic) as new chess.js team members! 🎉
Enhancements
b9a14ea)6564242)0-0and0-0-0(@neofight78 -8e0c7a6)883196d)1cc3fde)545a043)9290c64)Bug Fixes
2987218)8eb708c)v1.2.0Compare Source
Enhancements
.findPiecemethod (@FilippoPaganelli -e9b19ef)0e81801)f30a6ff)v1.1.0Compare Source
Enhancements
skipValidationboolean to constructor (@jhlywa -1d2a910)v1.0.0Compare 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:
ChessclassMoveclassPieceColorSquarePieceSymbolNew Methods
attackers(square, color)- returns a list of squares occupied by pieces ofcolorthat are attacking the givensquaregetCastlingRights(color)- returns{ k: boolean, q: boolean }indicating castling rights forcolorsetCastlingRights(color, rights)isAttacked(square, color)- returns true ifsquareis attacked bycolorisDrawByFiftyMoves()moveNumber()setHeader(key, value),removeHeader(key),getHeaders()removeComment(),removeComments()Breaking Changes
Exceptions instead of
nullThe following functions no longer return
nullwhen an error occurs. Instead, they now throw exceptions to provide the user with more detailed error information..load().loadPgn().move()Chess()constructorFunction Names
The functions below have been converted to camel-case:
game_over->isGameOverin_check->isCheckin_checkmate->isCheckmatein_draw->isDrawis_stalemate->isStalematein_threefold_repetition->isThreefoldRepetitioninsufficient_material->isInsufficientMaterialload_pgn->loadPgnset_comment->setCommentget_comment->getCommentget_comments->getCommentsdelete_comment->deleteCommentdelete_comments->deleteCommentsvalidate_fen->validateFenFunction Arguments and Return Values
The arguments and return values for the following functions have changed:
load_pgn(pgn, { sloppy: true })becomesloadPgn(pgn)(strictdefaults tofalse)move('Nb7', { sloppy: true })becomesmoves('Nb7')clear(true)should now be written asclear({ preserveHeader: true })load(fen, true)should now be written asload(fen, { preserveHeader: true })validateFen(fen)now returns{ ok: boolean, error?: string }Deprecations
flagsfield 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 isfalsefor 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?headerfunction has been deprecated in favor ofsetHeaderandgetHeadersdeleteCommentanddeleteCommentsfunctions have deprecated in favor ofremoveCommentandremoveCommentsImprovements
.loadto throw an exception when loading invalid FEN (@jhlywa -ac977ed).moveto throw an exception on illegal move (@jhlywa -8523db8).loadPgnto throw an exception when encountered error (@jhlywa - #TODO).load(@jhlywa -8523db8)isAttackedto determine attackers of a specific square (@jhlywa -9b49454)validateFen(@jhlywa -a137478)5f48a68)8e71084)beforeandafterFEN to Move object (@jhlywa - d42b0)getCastlingRights,setCastlingRights) (@neofight78 -7cb2d34)moveNumberaccessible (@neofight78 - #399).put()(@gavin-lb -55181a9)skipValidationoption to.load(@jhlywa -e2ff91c)isDrawByFiftyMoves(@HarshilPatel007 - #477)Bug Fixes
loadPgn()to handle PGN without any moves (@jhlywa -d12f78f)pgn()export when comment precedes black to move (@jhlywa -4fd6069)postinstallscript (@jhlywa - 495d37)"types": "dist/chess.d.ts"entry to package.json (@jhlywa -495d37f)put()(@Manukyanq #426)be03fe0)c1909fe)v0.13.4Compare Source
Bug Fixes
v0.13.3Compare Source
Bug Fixes
b51b44e)Changes
v0.13.2Compare Source
Bug Fixes
24d1c86)35e3fbf)v0.13.1Compare Source
Bug Fixes
62914d6).ascii()function (@jhlywa -450c7f1)v0.13.0Compare Source
Enhancements
.board()(@fitztrev - #312)v0.12.1Compare Source
Bug Fixes
321a25e)1814427)Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.