Commit Graph
812 Commits
Author SHA1 Message Date
Renovate Bot 1a73ac0b75 chore(): update dependency finalhandler to v1.2.0 2022-03-23 10:34:34 +00:00
Renovate Bot 9fb03950d6 chore(gulp-plugins): update dependency mocha to v9.2.2 2022-03-22 14:08:48 +00:00
Renovate Bot c8ee934718 chore(): update dependency type-fest to v2.12.1 2022-03-19 15:24:03 +00:00
Renovate Bot 0b4dad2f4c chore(): update dependency eslint-find-rules to v4.1.0 2022-03-19 14:06:16 +00:00
Renovate Bot 799fb87be3 chore(gulp-plugins): update babel monorepo to v7.17.8 2022-03-19 11:13:48 +00:00
Renovate Bot 43d36bb60c chore(): update dependency lint-staged to v12.3.7 2022-03-18 15:17:24 +00:00
Renovate Bot ad0814532b chore(): update dependency @types/json-schema to v7.0.10 2022-03-17 12:35:15 +00:00
Renovate Bot 3add8c0906 chore(gulp-plugins): update dependency eslint-plugin-import to v2.25.4 2022-03-16 18:14:37 +00:00
Renovate Bot 3648ed017b chore(gulp-plugins): update dependency @types/node to v16.11.26 2022-03-16 16:43:48 +00:00
Renovate Bot 11fb7c1a2e chore(): update dependency lint-staged to v12.3.6 2022-03-16 13:29:50 +00:00
Renovate Bot 297a307725 chore(gulp-plugins): update babel monorepo to v7.17.7 2022-03-16 10:55:01 +00:00
Renovate Bot 84eb71fb0f chore(): update dependency serve-static to v1.14.2 2022-03-14 14:26:50 +00:00
Renovate Bot d1e0043e37 chore(): update dependency lint-staged to v12.3.5 2022-03-14 11:13:28 +00:00
Renovate Bot b57115b2f0 chore(): update dependency chai to v4.3.6 2022-03-13 16:37:42 +00:00
Renovate Bot 3a6b3c7788 chore(): update dependency appium-base-driver to v7.11.3 2022-03-13 14:34:57 +00:00
Renovate Bot 92d7359763 chore(): update dependency @types/sinon-chai to v3.2.8 2022-03-13 12:23:56 +00:00
Renovate Bot 9fc213aa7d chore(): update dependency @types/sinon to v10.0.11 2022-03-13 11:06:12 +00:00
Renovate Bot c5560ab238 chore(): update dependency @types/chai-as-promised to v7.1.5 2022-03-12 18:37:49 +00:00
Renovate Bot adcc2a28e9 chore(): update dependency @appium/fake-plugin to v1.3.1 2022-03-12 16:57:57 +00:00
Renovate Bot 94fe0f2ef8 chore(): update babel monorepo 2022-03-12 14:36:43 +00:00
Christopher Hiller 4b9bfb35aa chore: add directory prop to repository prop of package.json
I think npm uses this to link to the correct path of the package in a monorepo.
2022-03-10 11:10:35 -08:00
Christopher Hiller c653d2cf3b chore: lint the code once per build action
Previously, every version of Node.js would run eslint, which is redundant
2022-03-10 10:52:02 -08:00
Christopher Hiller a80e4b85a4 chore: use proper version of typescript 2022-03-09 14:50:45 -08:00
Christopher Hiller 868517b6f4 chore: remove gulp from appium package (#16459)
This change removes `gulp` and replaces it with plain ol' `babel` and `mocha`.

## `appium`

- No gulp.
- `test/` has been re-organized.  All test files now end in the extension `.spec.js`, which is a recognized convention and understood by editors/IDEs.  The tests are further split into `unit` and `e2e` subdirs.  This makes working with both `babel` and `mocha` easier.
- The tests are _not_ run against the transpiled code; code is now transpiled on-the-fly via `@babel/register`. This only affects `appium`.
- `commands-yml/validator.js` moved to `scripts/parse-yml-commands.js`. It has been rewritten as a CJS module.  `commands-yml/` should not contain `.js` files.
- `test/setup.js` is a new test harness specific to Appium, which loads & configures `@babel/register`.  Eventually, the contents of this file can be moved into the root monorepo's `test/setup.js`, but the rest of the packages do not need `@babel/register`, so we avoid the overhead.

## `@appium/gulp-plugins`

- Unfortunately, due to the new `npm test` strategy (see below), we cannot use the `nyan` reporter.  Or rather, we _can_, but will not see the animation.  So the reporter is now set to default to `spec`.
- Modified tests so they didn't overwrite the actual `build` dir with transpiled fixtures, which is what was happening. This was causing failures depending on the transpile/test order.

## All Packages

- All packages now have their own `build`, `test`, `test:e2e` and `dev` (just build + watch mode) npm scripts. This makes running a complete build easier, since each package can now provide its own appropriate command.  This is _mostly_ just `gulp once` (where `gulp` was used before), except for `appium`, where `@babel/cli` is used directly.
- This is what happens when `npm test` is run from the monorepo (in order):
    1. All packages are built (in parallel) by running `npm run build` in each folder (via `lerna`). See `pretest`
    2. All code is linted directly via `eslint`.
    3. All _unit tests_ are run w/ `npm test` in each folder, having assumed transpilation already occurred (if necessary).
- `npm run e2e-test` runs the `npm run test:e2e` in each folder. No transpilation occurs! Careful.
- All scripts are expected to live in `packages/*/scripts`, and this directory enforces CJS via ESLint.  `postinstall.js` moved, as well as `check-npm-pack-files.js`. `generate-schema-declarations.mjs` moved from the root `scripts/` dir into `packages/appium/scripts/`; it's now CJS instead of ESM.
- I had profiled running various things with `lerna run --parallel`, but it turns out this is not faster.  I'm not sure why, but I think it may have something to do with streaming STDOUT/STDERR, or potentially the overhead of running child processes outweighs the time it takes to actually run tests and builds.
- The behavior of `lerna run` now mimicks `lerna exec`, which was "run stuff in serial, streaming the output". The default behavior of `lerna run` is "run stuff in parallel, buffering the output".  Buffered output sucks, and streaming the output from all tasks at once creates chaos.  To override this behavior, you'll see `--parallel --concurrency=8 --prefix` for tasks that can truly be parallelized, like transpilation.  The number 8 is the "maximum", and CI usually won't have more than 2 cores available anyway.
- When run in CI, Mocha runs with `--forbid-only`, which will fail if there's an `.only()` somewhere in the tests. Further, it forces color output.

## Etc.

- Updated Wallaby config, `.gitignore`, `.eslintignore`.
- Sorted `package.json` files
- Removed `watch` and `coverage` scripts which were broken anyway.

chore(appium): fix schema json path issues

- the path to the JSON schema is now correct: `lib/appium-config-schema.json`
- add `log-symbols` to devdeps for niceness. this is already a transitive dep
2022-03-09 14:50:45 -08:00
Christopher Hiller 1954021af9 chore: typescript updates
- Upgrade TS to `next` tag.  It's "safe" to use using bleeding-edge TS here since we don't actually use it to compile anything
- Add a bunch of missing types: `find-root`, `klaw`, `lockfile`, `mv`, `ncp`, `rimraf`
2022-03-09 14:50:45 -08:00
Mykola Mokhnach 16b2e8f14b chore: Switch @dabh/colors to @colors/colors (#16539) 2022-03-09 18:51:24 +01:00
Renovate Bot 2ed1fa8abc chore(): update dependency lint-staged to v12 2022-02-24 14:28:30 -08:00
Jonathan Lipps 555b93bf55 refactor!(support): move opencv related functionality into its own package 2022-01-21 08:52:36 -08:00
Mykola Mokhnach 40a6f054dc fix: Switch colors package to a non-compomised repository (#16317) 2022-01-11 06:45:13 +01:00
Renovate Bot bc86e2800e chore(): update dependency @types/chai to v4.3.0 2021-12-08 10:48:48 +00:00
Renovate Bot 25087c3ee0 chore(gulp-plugins): update dependency @types/node to v16.11.12 2021-12-07 11:30:18 +00:00
Renovate Bot 86e5dc304e chore(): update dependency type-fest to v2.8.0 2021-12-02 10:50:37 +00:00
Renovate Bot 62f1894838 chore(gulp-plugins): update dependency eslint-plugin-promise to v5.2.0 2021-12-01 14:01:28 +00:00
Renovate Bot eafd06fa5a chore(): update dependency type-fest to v2.7.0 2021-12-01 12:27:28 +00:00
Renovate Bot 1e4c3e6f6d chore(gulp-plugins): update dependency @types/node to v16.11.11 2021-11-30 10:23:02 +00:00
Mykola Mokhnach 07887b7c18 refactor(base-driver): Always assume the returned responses are in W3C format (#16175) 2021-11-29 22:55:48 +01:00
Renovate Bot 58d408550f chore(): update dependency @types/sinon-chai to v3.2.6 2021-11-25 10:53:49 +00:00
Renovate Bot c03d98b4ee chore(gulp-plugins): update dependency @types/node to v16.11.10 2021-11-24 11:08:59 +00:00
Christopher Hiller 74a5911515 fix(appium): make object dumps less weird
The `inspectObject()` function in `utils` was doing... stuff... to display both the default caps and non-default arguments.  Arrays, in particular, wound up looking like objects.  I found this objectionable; I hope there isn't a good reason it's this way.

- Remove `utils.inspectObject()` and replace it with `inspect()`, which delegates to Node.js' built-in `util.inspect()` function (which does a bang-up job of dumping objects, including color!)
- Remove the `parser` argument (and return value!) from various functions where it was used.  e.g., `init()` in `main.js` was returning the `parser` instance, but now we don't need it, since it was only needed for `getNonDefaultServerArgs()`, which doesn't need it.  `parser` was being passed through several functions this way.
- Add a dumb test for `utils.inspect()`
- Add another dumb test for `getNonDefaultServerArgs()`
- Add `@types/express` since it was missing.
- More types in various associated places; fix other types
- Consistent naming in impl of `getNonDefaultServerArgs()`
2021-11-23 13:54:59 -08:00
Renovate Bot 5df02abe0a chore(): update dependency type-fest to v2.6.0 2021-11-23 13:56:18 +00:00
Renovate Bot 3e61d93769 chore(): update dependency appium-base-driver to v7.11.2 2021-11-23 10:56:53 +00:00
Christopher Hiller 5a2b981fb7 chore: update 'clean' script to remove any stray package lockfiles
`packages/*/package-lock.json` _should not exist_, but if it does, it will prevent proper versioning.  This fixes that problem.
2021-11-22 12:07:32 -08:00
Christopher Hiller cfa7f003b8 chore(appium): print npm output upon error
This change causes additional output if/when `npm` fails when run in a subprocess.
2021-11-22 12:04:10 -08:00
Renovate Bot 9e75670035 chore(): update dependency appium-base-driver to v7.11.1 2021-11-20 10:33:27 +00:00
Renovate Bot 4aa28b0635 chore(gulp-plugins): update dependency @types/node to v16.11.9 2021-11-19 11:43:03 +00:00
Christopher Hiller 91c3ff7f19 chore: attempt to get install-fake-driver working again in CI 2021-11-18 12:08:50 -08:00
Christopher Hiller d201d64b49 fix: use relative package references
This should (hopefully) fix the Lerna issues we've been encountering.  With this change, the root monorepo lists all packages as dependencies and uses relative `file:` URLs to do so.  This means `lerna bootstrap` is no longer necessary.

In addition, defaults to `--save-exact` in `npm install` and `lerna add`.  Also installs peer dependencies of `@appium/eslint-config-appium`.
2021-11-18 12:08:50 -08:00
Renovate Bot a237dff45c chore(): update dependency type-fest to v2.5.4 2021-11-17 14:05:19 +00:00
Renovate Bot c17a9e4ede chore(gulp-plugins): update babel monorepo to v7.16.4 2021-11-17 11:48:28 +00:00
Christopher Hiller a56cba0b03 fix(appium): ensure correct paths for schema declaration generation
- also convert script to ESM for fun
- transpiles appium just to be sure -- this generates the base schema `.json` file
2021-11-15 11:52:22 -08:00