pgn-parser
Advanced tools
+8
-8
| { | ||
| "name": "pgn-parser", | ||
| "version": "2.0.0", | ||
| "version": "2.1.0", | ||
| "description": "pgn parser", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
| "test": "mocha", | ||
| "dist": "webpack -p" | ||
| "dist": "NODE_ENV=production webpack" | ||
| }, | ||
@@ -28,11 +28,11 @@ "main": "dist/pgn-parser.js", | ||
| "devDependencies": { | ||
| "pegjs": "^0.10.0", | ||
| "chai": "^4.2.0", | ||
| "clean-webpack-plugin": "^3.0.0", | ||
| "mocha": "^7.1.1", | ||
| "raw-loader": "^4.0.1", | ||
| "terser-webpack-plugin": "^3.0.1", | ||
| "webpack": "^4.43.0", | ||
| "webpack-cli": "^3.3.11" | ||
| "mocha": "^8.2.1", | ||
| "pegjs": "^0.10.0", | ||
| "raw-loader": "^4.0.2", | ||
| "terser-webpack-plugin": "^5.0.3", | ||
| "webpack": "^5.11.1", | ||
| "webpack-cli": "^4.3.0" | ||
| } | ||
| } |
+21
-0
@@ -97,3 +97,18 @@ const chai = require('chai'), | ||
| }); | ||
| it('should allow move after RAV without whitespace', () => { | ||
| const [result] = parser.parse('1. e4 (1. d4 d5)e5 2. d4 exd4 *'); | ||
| result.moves.should.have.lengthOf(4); | ||
| }); | ||
| it('should allow RAV after RAV without whitespace', () => { | ||
| const [result] = parser.parse('1. e4 (1. d4 d5)(1. f4 e5)e5 2. d4 exd4 *'); | ||
| result.moves.should.have.lengthOf(4); | ||
| }); | ||
| it('should allow promotion without equal sign', () => { | ||
| const [result] = parser.parse('1. e4 f5 2. exf5 g6 3. fxg6 h6 4. g7 Rh7 5. gxf8Q+ *'); | ||
| result.moves.should.have.lengthOf(9); | ||
| }); | ||
| it('should allow multiple RAV for same move', () => { | ||
@@ -159,2 +174,8 @@ const [result] = parser.parse('1. e4 (1. d4 d5) (1. c4 e5) e5 *'); | ||
| }); | ||
| it('should parse accented characters', () => { | ||
| const results = parser.parse('1.e4 {A à E é I î O ô U ù Y} *'); | ||
| results[0].moves[0].comments.should.have.lengthOf(1); | ||
| results[0].moves[0].comments[0].text.should.be.eql('A à E é I î O ô U ù Y'); | ||
| }); | ||
| }); |
@@ -40,5 +40,6 @@ const path = require('path'), | ||
| new TerserWebpackPlugin({ | ||
| cache: true, | ||
| parallel: true, | ||
| sourceMap: true | ||
| terserOptions: { | ||
| sourceMap: true | ||
| } | ||
| }) | ||
@@ -45,0 +46,0 @@ ] |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
503538
0.01%603
3.08%