mysticatea/npm-run-all

Package config variables not available to npm-alternatives

ryansalerno opened this issue · 6 comments

A quick repro case:

"config": {
	"foo": "bar"
},
"scripts": {
	"vars": "echo $npm_package_config_foo",
	"fails": "run-s vars",
	"works": "npm run vars"
}

npm run ___ can run any of the three scripts successfully (as you'd expect).

pnpm can run vars directly or works, but fails on fails with:

 ERROR   ERROR  Unknown options: '<pkgname>:foo'

I suspect this is very related to #193, but the description there sounded like it was coming at this error from a different direction, so I didn't want to hijack Jakob's issue.

I haven't tested yarn, though #196 sounds like a similar fix could potentially address issues there as well? Especially since a script of yall -s vars runs successfully with pnpm.

Just felt in the same issue!
+1

+1

Also encountering this issue when using commitizen. A workaround that works for commitizen is to use a .czrc config file. This, however, has to be fixed since other packages that use the package.json config field might not provide stand-alone config files.

This is kinda important, and this repo hasn't had a release since 2018, anyone know if there's a popular fork yet?

Bump, is there a fix?