mysticatea / npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.
MIT License
5.72k stars 240 forks source link

Package config variables not available to npm-alternatives #201

Open ryansalerno opened 3 years ago

ryansalerno commented 3 years ago

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.

TigersWay commented 3 years ago

Just felt in the same issue! +1

agileago commented 2 years ago

+1

rickstaa commented 2 years ago

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.

josh-hemphill commented 1 year ago

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

franklsf95 commented 1 year ago

Bump, is there a fix?

recallwei commented 1 year ago

+1