cm-chess 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cm-chess
2
2
 
3
- A chess engine wrapper inspired by [chess.js](https://github.com/jhlywa/chess.js), with first-class support for:
3
+ A chess validation library inspired by [chess.js](https://github.com/jhlywa/chess.js), with first-class support for:
4
4
 
5
5
  - **Variations** — full tree-structured move history (not just a linear list)
6
6
  - **PGN import/export** — header tags, NAGs, annotations and comments
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "cm-chess",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "It's like chess.js, but in ES6 and can handle variations (tree-structured move history)",
5
5
  "main": "./src/Chess.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "test": "echo request test/index.html in a browser for testing"
8
+ "test": "teevi"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "homepage": "https://github.com/shaack/cm-chess#readme",
26
26
  "dependencies": {
27
- "chess.mjs": "^2.3.2",
28
- "cm-pgn": "^5.0.0"
27
+ "chess.mjs": "^2.5.1",
28
+ "cm-pgn": "^5.0.1"
29
29
  },
30
30
  "devDependencies": {
31
- "teevi": "^2.4.1"
31
+ "teevi": "^2.7.1"
32
32
  }
33
33
  }
package/test/TestChess.js CHANGED
@@ -67,7 +67,9 @@ describe("Chess", function () {
67
67
  assert.equal(firstMove.color, "w")
68
68
  assert.equal(firstMove.san, "e4")
69
69
  assert.equal(firstMove.fen, "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1")
70
- assert.equal(chess.history()[19].commentAfter, "Kasparov schüttelt kurz den Kopf")
70
+ // cm-pgn 5: comments after a move are an array in `comments`
71
+ assert.equal(chess.history()[19].comments.length, 1)
72
+ assert.equal(chess.history()[19].comments[0], "Kasparov schüttelt kurz den Kopf")
71
73
  })
72
74
 
73
75
  it("should load a pgn with SetUp", () => {