Since multiple packages will be using this file, it should probably just live here.
We will eventually be able to remove the `--require ../../test/setup-babel.js` from the testing scripts once we've gotten off of gulp entirely (it can be referenced in `.mocharc.js` instead)
- add `jsconfig.json` for the TS language server to understand the project
- update `.wallaby.js` to transpile fixtures if necessary; run on save to reduce lag
- update single-file Mocha debug launch config
- add `test` env in `babel.config.json` which is used by the former
- add some handy vscode tasks
- add a bunch of types
- remove unused `babel-eslint` (we use `@babel/eslint-parser`)
- bump `ecmaVersion` in `eslint-config-appium`
- remove cruft from babel configs (`shippedProposals: true` goes a long way)
- enable `sinon-chai` globally in tests
- add `rewiremock` for module-level mocking (sinon cannot do this itself, but they work in tandem)
This PR makes `chai` and `should()` _globals_ when using Mocha:
- `chai` is configured with `chai-as-promised`
- A `.mocharc.js` requires `./test/setup.js` _from the monorepo root_.
- Updated the ESLint config to recognize the globals.
- Updated Wallaby config
All instances of `import chai...` and the like have been removed from all test files.
This PR supersedes PR #14562.
This is my first attempt at making this repo a monorepo and moving appium-proper into `packages/appium`.
I had tried to make this work with npm's "workspaces", but it seems lifecycle scripts don't run as you'd expect them to upon install. Instead, I'm using Lerna, which provides more features for monorepos.
Changes include:
- The root `package.json` is now a package named `appium-monorepo`, which is `private`. The monorepo should not be published.
- All dev dependencies remain in the root `package.json`.
- `gulpfile.js` _moved_ into `packages/appium/gulpfile.js`, but this should be **temporary**--`appium-gulp-plugins` makes certain assumptions which a monorepo violates, and I was unable to get it working without patching `appium-gulp-plugins`.
- Most of the `package.json` `scripts` moved into `packages/appium/package.json` due to the above. This too should be considered **temporary**.
- Adds a root `postinstall` lifecycle script which calls `lerna bootstrap` to install/link packages. I don't see a `package-lock.json` in `packages/appium/`; this needs investigating.
- Adds a root `test` lifecycle script which executes `npm run test` in all packages. The tests do not pass, but I don't know if this is my fault.
- The `clean` script will purge all `node_modules` folders in each package, as well.
- I removed `scripts/release*.sh`, since it seems they would fail anyway--`lerna` should be used for releases instead
- The shrinkwrap-related stuff is untested.
- Renamed `tags` prop in `packages/appium/package.json` to `keywords`. I don't know if `tags` is supported.
fix: install and require driver modules from appium home dir instead of appium node package
refactor: use toPairs instead of Object.keys wherever possible
refactor: move driver data validation to a better
refactor: make a server-parser file to mirror driver-parser
feat: change install source arg to --source. Also add unit tests for driver parser
feat: use yaml for driver manifest format instead of json
feat: add schema version to yaml format
instead look for a reference to them in a drivers json file which will be
managed by the appium driver cli tool. this is a WIP and tests are not yet fixed
(breaking change)
feat: add driver CLI and subcommands; start to implement them beginning with list
feat: enable showing possible updates during 'driver list'
feat: enable installation of drivers via 'driver install'
feat: enable installation of drivers via local, git, and github specs
fix: lint and unit test updates to get everything passing
fix: make sure travis installs fakedriver
refactor: move cli helpers into own file and clean up driver json validation