Recommended "--omit=dev" option not found for NPM 8
Description When using NPM version >= 8 the --omit=dev option is not passed through.
Running the command better-npm-audit audit -p results in a warning by NPM advising you to use --omit=dev instead.
$ better-npm-audit audit -p
npm
WARN config production Use `--omit=dev` instead.
However, when running said command better-npm-audit audit --omit=dev an error is spat out:
$ better-npm-audit audit --omit=dev
error: unknown option '--omit=dev'
Adding the option to better-npm-audit might be beneficial as currently it's producing warnings, but keeping the other option in for older NPM versions. Another solution could be to forward the -p option to execute --omit=dev for NPM 8.
Running npm audit --omit=dev works like a charm.
Context
NPM version: 8.13.2
Node version: v16.15.1
Better NPM Audit version (through NPM): 3.7.3
Architecture: Aarch64
I was on NPM 8.5.0 and did not receive this warning. Upgraded to 8.13.2 and now I get it as well. Seems to be a new warning (nowadays the --omit=dev flag is preferred over --production for the npm audit command)
The pull request for this has been open for over a year. Is this project still being developed? Can anyone recommend alternatives?