diff --git a/demo/movegeneration.js b/demo/movegeneration.js index 6cd1720..053bc59 100644 --- a/demo/movegeneration.js +++ b/demo/movegeneration.js @@ -23,7 +23,7 @@ const { Position } = require('../dist/lib/index'); -const program = require('commander'); +const { program } = require('commander'); function align(data, width) { diff --git a/demo/pgnparsing.js b/demo/pgnparsing.js index 45df696..76c83e9 100644 --- a/demo/pgnparsing.js +++ b/demo/pgnparsing.js @@ -24,7 +24,7 @@ const { exception, pgnRead } = require('../dist/lib/index'); const fs = require('fs'); -const program = require('commander'); +const { program } = require('commander'); function alignLeft(data, width) { @@ -128,10 +128,8 @@ function run(paths, pathAlignment) { // ----------------------------------------------------------------------------- program - .arguments('') - .description('Analyze some PGN files', { - 'pgn-files': 'path to the PGN files to analyse' - }) + .argument('', 'path to the PGN files to analyse') + .description('Analyze some PGN files') .parse(process.argv); const pathAlignment = program.args.map(path => path.length).reduce((l1, l2) => Math.max(l1, l2));