I put some console.log inside ./node_modules/np/source/cli-implementation.js and here are the outputs. First is my local config flags and second is the default CLI ones. Then the third is the final merged options result.
Expected behavior
It should have no default CLI flags if not using it in terminal script.
Environment
np - 10.0.7
Node.js - 20.11.0
npm - 10.8.2
Git - 2.34.1
OS - Linux Mint 21.3
When using local config flags, some of them are overridden by the default CLI flags
Description
I have a local config file with a tests flag set to
false
, but it gets set totrue
when running np CLI without any flags.This is where it happened
https://github.com/sindresorhus/np/blob/main/source/cli-implementation.js#L113-L117
and with here, there is no way to set
tests
flag tofalse
https://github.com/sindresorhus/np/blob/main/source/cli-implementation.js#L63-L65
I put some
console.log
inside./node_modules/np/source/cli-implementation.js
and here are the outputs. First is my local config flags and second is the default CLI ones. Then the third is the final merged options result.Expected behavior
It should have no default CLI flags if not using it in terminal script.
Environment
np - 10.0.7 Node.js - 20.11.0 npm - 10.8.2 Git - 2.34.1 OS - Linux Mint 21.3