lirantal / lockfile-lint

Lint an npm or yarn lockfile to analyze and detect security issues
Apache License 2.0
776 stars 35 forks source link

--version results in error in 4.12.0 #184

Closed candrews closed 10 months ago

candrews commented 10 months ago

Expected Behavior

lockfile-lint --version should work.

Current Behavior

npx lockfile-lint@4.12.0 --version
4.12.0
/home/candrews/.npm/_npx/c7165d0cf08e91c5/node_modules/fast-glob/out/index.js:99
        throw new TypeError('Patterns must be a string (non empty) or an array of strings');
        ^

TypeError: Patterns must be a string (non empty) or an array of strings
    at assertPatternsInput (/home/candrews/.npm/_npx/c7165d0cf08e91c5/node_modules/fast-glob/out/index.js:99:15)
    at AsyncFunction.sync (/home/candrews/.npm/_npx/c7165d0cf08e91c5/node_modules/fast-glob/out/index.js:22:9)
    at Object.<anonymous> (/home/candrews/.npm/_npx/c7165d0cf08e91c5/node_modules/lockfile-lint/bin/lockfile-lint.js:52:28)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.17.1

Possible Solution

Steps to Reproduce (for bugs)

  1. Install lockfile-lint version 4.12.0 (earlier versions work fine)
  2. Run lockfile-lint --version

Context

Trying to use --version as documented in the help :-)

Your Environment

lirantal commented 10 months ago

Oh no! You're right. I'm looking into it now.

lirantal commented 10 months ago

Fixed in https://github.com/lirantal/lockfile-lint/commit/a45ff60db49370167252be38f8ec8f39a9cf4f64 and preparing a release now

lirantal commented 10 months ago

Fix released in 4.12.1

Thanks for reporting @candrews ❤️