Closed Gehbt closed 2 weeks ago
Thank you for the report, will investigate soon.
It looks like npm-run-all2 is parsing out the special config field defined in the package.json spec:
https://docs.npmjs.com/cli/v10/configuring-npm/package-json?v=true#config
and passing it as a flag in the form of:
{
execPath: '/opt/homebrew/Cellar/node/22.8.0/bin/node',
spawnArgs: [
'/opt/homebrew/Cellar/pnpm/9.9.0/libexec/lib/node_modules/pnpm/bin/pnpm.cjs',
'run',
'--nra2-bug-repo:commitizen_path=cz-conventional-changelog',
'lint.check'
],
...
}
To be perfectly honest, I'm super unfamiliar with the config field in package.json and the various ways it gets used. Npm doesn't seem to care about it (and maybe even uses it somehow, I'm not sure). pnpm OTOH doesn't like extra fields. It looks like yarn also doesn't like the extra fields? Anyway, I'll skip adding those for pnpm as well since it clearly doesn't work when they are passed, and we also skip passing them for yarn classic..
Try out https://github.com/bcomnes/npm-run-all2/releases/tag/v6.2.3 and please let me know if that works for you.
config define, as long as have it
script define
run
Reproduction
https://github.com/Gehbt/nra2-bug-repo
In yarn or npm, It is fine.