prantlf / jsonlint

JSON/CJSON/JSON5 parser, syntax & schema validator and pretty-printer with a command-line client, written in pure JavaScript.
http://prantlf.github.io/jsonlint/
MIT License
38 stars 9 forks source link

Error running the new version #17

Closed simonweil closed 1 year ago

simonweil commented 1 year ago

When running as I did in the past I get the following error

$ jsonlint --diff --check
PATH/.nvm/versions/node/v19.6.0/lib/node_modules/@prantlf/jsonlint/lib/cli.js:503
    args = params.patterns || []
         ^

TypeError: Assignment to constant variable.
    at main (PATH/.nvm/versions/node/v19.6.0/lib/node_modules/@prantlf/jsonlint/lib/cli.js:503:10)
    at Object.<anonymous> (PATH/.nvm/versions/node/v19.6.0/lib/node_modules/@prantlf/jsonlint/lib/cli.js:543:1)
    at Module._compile (node:internal/modules/cjs/loader:1246:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
    at Module.load (node:internal/modules/cjs/loader:1103:32)
    at Module._load (node:internal/modules/cjs/loader:942:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47
prantlf commented 1 year ago

Oh, I'm sorry. You probably sent the input using the pipe. There was a remnant of old code, which looked like as if there was an argument --pattern in the old code, but it has never worked, at least not in the fork. I removed the code in 14.0.1. I'm sorry for the trouble.

simonweil commented 1 year ago

Awesome, thanks for the fast turnaround @prantlf!