BREAKING CHANGE:
This removes the `test` export from `appium`. `import * from 'appium/test'` is no longer supported.
Use `@appium/test-support`, `@appium/driver-test-support` or `@appium/plugin-test-support` instead.
See #17398
BREAKING CHANGE:
This removes plugin/driver specific methods from `@appium/test-support`, and also removes the peer dep on `appium`.
The methods can now be found in `@appium/plugin-test-support` and `@appium/driver-test-support`.
Closes#17398
Some CLI args can be interpreted as filenames or JSON/CSV blobs. Appium first assumes the value is a file and attempts to open it. But if a blob is given and it is of some _problematic length_, the OS will throw an `ENAMETOOLONG` exception trying to open a filepath with a huge blob. If the JSON is reasonably small, an `ENOENT` will be thrown instead. Previous to this change, we were only looking for `ENOENT`; now we treat `ENAMETOOLONG` errors as JSON blobs. If the problem is that the filename _is_ actually too long, the user will get an "invalid JSON" error, which will probably be confusing, but is less likely to happen than the more-common error this addresses.
If someone complains about it in the future, we can take another look, but it's going to take more effort than it's worth atm to fix it (imo).
BREAKING CHANGE:
This change upgrades to ESLint v8 and removes `@babel/eslint-parser`, which is only necessary if we're using mid-stage TC39 proposals (which we aren't). I think `@babel/core` was a peer dep of `@babel/eslint-parser`, so I removed that too. And removed cruft from the main configuration.
ESLint rules _very likely_ had breaking changes, but I didn't experience any on our codebase. However, this version of ESLint seems to be incompatible with `gulp-eslint`, so `@appium/gulp-plugins` should be held back from upgrading.
In addition:
- Updated `README.md`
- Updated some fields in `package.json`
- Loosened `peerDependencies`, as they're supposed to be loose.
This package was missing `@appium/types`, which means packages consuming `@appium/support` which _don't_ also consume `appium` in some capacity will have types that won't compile, e.g., `teen_process`.
This PR passes a `cliArgs` parameter to the static method `updateServer` of drivers and plugins so they can take action on the server configuration based on the content of the arguments.
Note that `cliArgs` is a misnomer, because these args can also come from configuration files.
Closes#17304
I'm not sure _what_ happened here other than "the types weren't strict enough" otherwise I would have noticed this earlier. Anyway; the check to see if we should dig into the config object to normalize the keys was getting passed _something_ but that _something_ wasn't anything it expected.
As a result, I needed to update some tests which assumed `readConfigFile()` resolved w/ an identity w/r/t the config file itself. It doesn't give the config file back verbatim any longer; the result will be normalized to camel-case keys (or whatever the `appiumCliDest` property is, if it exists)