bcomnes/npm-run-all2

Package config variables not available to npm-alternatives

TigersWay opened this issue · 6 comments

Hi,
Any idea on how to solve this mysticatea/npm-run-all#201, within your fork?

Thanks

What implements Package config variables? Is that an npm feature? My apologies, I've never seen that used before.

No need for apologies, it's a somehow under-utilized npm/package.json feature.
While running scripts, all the package's properties are available as variables ($npm_package_...), which gives you $npm_package_name, $npm_package_version, etc
And of course, potentially, $npm_package_config_foo as in the original issue.

But it seems when the original npm-run-all (or yours) is used with any npm alternatives (pnpm for sure, and yarn) these variables are lost.

Bummer. In general npm's config has historically had many errors that surface and disappear for who knows why.

If you are interested in tracking down the source of the problem, I'd be happy to land a fix if it doesn't have a ton of strings attached.

Well, I have to be honest, I just did a global search on GitHub and it seems we are not so many using or trying to use this feature.... Or maybe a lot gave up 😢
You seem to have an active working fork of npm-run-all, so I tried 😄

Next weeek, I'll see what I can do to track it down!

I definitely use npm-run-all everywhere so happy to fix issues people are running into. Though as you can see largely the work here has been maintenance, so I'm not intimately familiar with how everything works still. I dont currently have time to look into this issue but I can defiantly look at any findings or fixes you can come up with and will be happy to land them in some form.

Looks like npm itself disabled a fair bit of their config offerings. I'm going to close since I have no bandwidth to fix this. If someone else wants to take a look feel free and we can re-open.