### What does this PR do? This PR removes any special treatment of Windows from `superspawn` and instead delegates this work to `cross-spawn`. The interface of `superspawn` is not changed. The goal behind this change is to reduce maintenance and improve cross-platform operability.
This PR depends on https://github.com/apache/cordova-lib/pull/622 (thanks @AlmirKadric) and closes https://github.com/apache/cordova-lib/pull/688. ### What testing has been done on this change? - [x] Existing test suite passes - [x] New, very basic test for escaping on Windows passes - [ ] All test suites of all Apache Cordova packages depending on `cordova-common` pass - [ ] Tests pass on Linux ([Travis CI run for tooling and `cordova-browser`](https://travis-ci.org/raphinesse/cordova-cross-spawn-test/builds/429277812)) - [x] `cordova-cli` tests pass - [x] `cordova-plugman` tests pass - [x] `cordova-create` tests pass - [x] `cordova-fetch` tests pass - [x] `cordova-lib` tests pass - [x] `cordova-browser` tests pass - [ ] `cordova-android` tests pass - [ ] `cordova-ios` tests pass - [ ] `cordova-osx` tests pass - [ ] `cordova-windows` tests pass - [ ] Tests pass on Windows ([AppVeyor run for tooling and `cordova-browser`](https://ci.appveyor.com/project/raphinesse/cordova-cross-spawn-test/build/1.0.6)) - [x] `cordova-cli` tests pass - [x] `cordova-plugman` tests pass - [x] `cordova-create` tests pass - [x] `cordova-fetch` tests pass - [x] `cordova-lib` tests pass - [x] `cordova-browser` tests pass - [x] `cordova-android` tests pass - [ ] `cordova-ios` tests pass - [ ] `cordova-osx` tests pass - [ ] `cordova-windows` tests pass - [ ] Tests pass on macOS - [ ] `cordova-cli` tests pass - [ ] `cordova-plugman` tests pass - [ ] `cordova-create` tests pass - [ ] `cordova-fetch` tests pass - [ ] `cordova-lib` tests pass - [ ] `cordova-browser` tests pass - [ ] `cordova-android` tests pass - [ ] `cordova-ios` tests pass - [ ] `cordova-osx` tests pass - [ ] `cordova-windows` tests pass As you might have noticed, I still need some help to tick off all those boxes. Especially for all platforms that require an SDK to be set-up. So I'd like to ask anyone who has one of the missing combinations at hand: please check out the [test repository][cordova-cross-spawn-test] I prepared, follow the instructions in the README and share your results here. Running the tests is easy as pie, I promise :smile:. Please run as much of the tests as you can, even if some of the boxes are already ticked off. This is especially true if you are on Windows and even more so if you are affected by the original issue ([CB-14166](https://issues.apache.org/jira/browse/CB-14166)). As we have seen during the excellent debugging of this issue (thanks @knight9999 and @janpio), tiny differences in your setup can make a big difference in the end result. So it's important to get as much coverage as possible here. Special thanks to @oliversalzburg for mentioning his handy tool [`spodr`] to me in https://github.com/raphinesse/cordova-common/pull/1. It made building the above test suite way easier. Check it out if you want to easily setup and manage a bunch of linked npm packages (like Cordova tooling) without having to go full-mono-repo as is required by other tools like `lerna`. Finally, the commit that is prefixed with `TMP` is a temporary work-around for a weird issue that I encountered locally (#49). I have no idea what's happening there, but it has absolutely nothing to do with this change. So I took it out of the equation, so please ignore for now. [`spodr`]: https://github.com/fairmanager/spodr [cordova-cross-spawn-test]: https://github.com/raphinesse/cordova-cross-spawn-test [ Full content available at: https://github.com/apache/cordova-common/pull/50 ] This message was relayed via gitbox.apache.org for [email protected]
