Q: Is it possible to change the the context in which npm runs scripts?
What I want to is the following:
npm allows only to do cd dir && command -args, which will also run on Windows.
npm
cd dir && command -args
A change to use node's spawn functionality has been made in PR https://github.com/npm/npm/pull/10958, but was rejected, due to the above solution.
node