Commit Graph

9080 Commits

Author SHA1 Message Date
Christopher Hiller e5b21b5674 chore(base-driver): enable type checks
and a bunch of associated fixes

# Conflicts:
#	packages/base-driver/lib/basedriver/core.js
#	packages/base-driver/lib/basedriver/desired-caps.js
#	packages/base-driver/lib/basedriver/helpers.js
#	packages/base-driver/lib/express/server.js
2022-05-12 12:32:57 -07:00
Christopher Hiller 5ba245c819 chore(appium,types): move DriverType, PluginType etc. into @appium/types
- Also split out types into more files, since they were getting hefty
- The `Plugin` type conflicts with the [Plugin API](https://developer.mozilla.org/en-US/docs/Web/API/Plugin), which is detailed in TypeScript's DOM library.  This changes makes `@appium/types` _avoid_ this library entirely, and only use the basic JS/Node.js types.

# Conflicts:
#	packages/appium/types/extension.ts
#	packages/types/lib/index.ts
2022-05-12 12:32:57 -07:00
Christopher Hiller 5e96a6d2a7 feat(base-plugin): prepare for use by plugins
This adds the requisite TS setup for base-plugin
2022-05-12 12:32:57 -07:00
Christopher Hiller 48f1d99087 feat(appium): appium now expects extensions to use peer dependencies
The peer dependency value is stored in the `extensions.yaml` manifest for each extension as `appiumVersion` (if present).

If the peer dependency is _not_ present, the user will be warned, but Appium will still try to load the extension (I have a feeling that most of the time, this will be fine).  When warned, the user will receive information about available extension upgrades, if any.

This required some refactors in the `lib/extension/` dir.  Extension validation was previously a synchronous process, but because we now (potentially) display information to the user about upgrades (which is async), validation must also be async.  This means that the `ExtensionConfig` constructor (and the constructors of its subclasses) cannot run validation.  Validation must happen after the config object is instantiated, which is handled in `loadExtensions()` of `lib/extension/index.js`.  The constructor signatures have changed accordingly.

While extensions now soft-require a `peerDependencies.appium` field, in the monorepo, the value of this dependency is `file:../appium`.  This is treated as a special case, and acts as if the dependency is just the current version of `appium` (as in its `package.json`).  This is handled in `Manifest#addExtension()`.

To further support this, `appium` now exports `@appium/base-driver` as `driver`, `@appium/base-plugin` as `plugin`, and `@appium/support` as `support`.  `tsconfig.json` files have changed in these affected packages.

In addition, a new reusable TS config file has been added for use with basic plugins.

# Conflicts:
#	.eslintrc
#	packages/appium/lib/extension/extension-config.js
#	packages/appium/lib/extension/index.js
#	packages/appium/lib/extension/manifest.js
#	packages/appium/test/unit/extension/manifest.spec.js
#	packages/appium/test/unit/extension/mocks.js
2022-05-12 12:32:57 -07:00
Renovate Bot 5835a8ab7e chore(appium): update dependency @sidvind/better-ajv-errors to v2 2022-05-10 17:56:16 -07:00
Renovate Bot a1dff640b1 chore(test-support): update dependency sinon to v14 2022-05-10 17:55:55 -07:00
Christopher Hiller 133db5355f chore: reformat everything
this reformats all `.js`, `.ts`, and `.d.ts` files.
2022-05-09 19:09:50 -07:00
renovate[bot] 68feafb5d3 chore(doctor): update dependency appium-adb to v9.2.3 (#16917)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-09 01:32:07 +09:00
renovate[bot] 3d2db4538e chore(images-plugin): update dependency lru-cache to v7.9.0 (#16780)
* chore(images-plugin): update dependency lru-cache to v7.9.0

* Update cache properties

* Only set max size

* Set max cache size

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2022-05-07 15:39:15 +02:00
Renovate Bot b0d5d3e4e7 chore(support): update dependency bplist-parser to v0.3.2 2022-05-05 15:20:14 -07:00
Christopher Hiller 4198253cf9 chore(appium): simplify types
`import` in jsdoc types previously using relative paths to reference the `types` folder can now be referenced via `appium/types`; e.g., `import('../types').Foo`, `import('./types').Foo`, `import('../../../types/bar').Foo` are now just `import('appium/types').Foo`

Also add some missing descriptions
2022-05-04 18:11:42 -07:00
Renovate Bot 7797a4f685 chore(support): update dependency bplist-creator to v0.1.1 2022-05-04 13:58:26 +00:00
Renovate Bot 8f926e9bc0 chore(execute-driver-plugin): update dependency webdriverio to v7.19.7 2022-05-04 11:52:40 +00:00
Christopher Hiller 5928026f9c Publish
- @appium/eslint-config-appium@6.0.0
 - @appium/gulp-plugins@7.0.0
@appium/eslint-config-appium@6.0.0 @appium/gulp-plugins@7.0.0
2022-05-03 15:02:23 -07:00
Christopher Hiller 878bb6a44f feat(eslint-config-appium,gulp-plugins): add prettier
BREAKING CHANGE:

`@appium/eslint-config-appium` now requires peer dependency `eslint-config-prettier`.  Because `@appium/gulp-plugins` always uses the latest development version of `@appium/eslint-config-appium`, the dependency needs to be added there, too.

In addition, this disables some rules, so _may_ cause code which previously passed lint checks _not_ to pass lint checks.
2022-05-03 14:57:14 -07:00
Jonathan Lipps 59dd30ba20 Publish
- appium@2.0.0-beta.35
 - @appium/doctor@1.16.19
 - @appium/eslint-config-appium@5.1.1
 - @appium/gulp-plugins@6.0.10
@appium/doctor@1.16.19 @appium/eslint-config-appium@5.1.1 @appium/gulp-plugins@6.0.10 appium@2.0.0-beta.35
2022-05-03 13:42:56 -07:00
Christopher Hiller 6480679bfb chore(appium): lint again 2022-05-03 13:34:10 -07:00
Christopher Hiller c2753107c6 test(appium): e2e helpers now log executed child process commands 2022-05-03 13:12:31 -07:00
Christopher Hiller a794ade7b0 chore(appium): lint 2022-05-03 13:09:17 -07:00
Christopher Hiller 5e24fbac5c chore(ci): add Node v18 to matrix; remove Node v17 2022-05-03 12:50:20 -07:00
Renovate Bot 8caf18f542 chore(gulp-plugins): update dependency mocha to v10 2022-05-03 12:21:06 -07:00
Christopher Hiller 93e05a8269 fix(eslint-config-appium): revert prettier-related change
This reverts commits b34b75a80e,  88a6655253 and d89203f96c which, as a whole, was breaking.

This will fix the publish of v5.1.0, which should have been a major release.

After v5.1.1 has been released, this PR should be reverted in prep for v6.
2022-05-03 12:19:13 -07:00
Christopher Hiller 5cc22325f2 chore(appium): refactor some variable/parameter names for clarity
renamed parameters named `ext` to `installSpec`, since these correspond to the values of `installSpec` in the manifest
2022-05-03 12:13:44 -07:00
Christopher Hiller a2b07f6150 test(appium): replace all occurrences of 'driver'/'plugin' literals w/ constants 2022-05-03 12:04:15 -07:00
Christopher Hiller 823014321a chore: do not use @babel/register w/ wallaby 2022-05-03 12:04:02 -07:00
Christopher Hiller d89203f96c fix(eslint-config-appium): remove custom indenting rules
these rules also conflict with prettier. prettier does something very similar, but not exactly.  w/o this, running `prettier` then `eslint` will cause an eslint error.
2022-05-03 11:42:30 -07:00
Jonathan Lipps 773d9d6c0d docs(appium): add drivers intro doc (resolves #16795) 2022-05-03 10:27:40 -07:00
Renovate Bot a686053f03 chore(doctor): update dependency appium-adb to v9.2.2 2022-05-03 11:19:47 +00:00
Christopher Hiller 5a3a0f7c14 chore(appium): remove unused appium-config.schema.json from vcs 2022-05-02 15:28:33 -07:00
Jonathan Lipps 5482c921bc Publish
- appium@2.0.0-beta.34
 - @appium/base-driver@8.5.3
 - @appium/base-plugin@1.8.5
 - @appium/doctor@1.16.18
 - @appium/docutils@0.0.4
 - @appium/eslint-config-appium@5.1.0
 - @appium/execute-driver-plugin@1.0.5
 - @appium/fake-driver@3.2.13
 - @appium/fake-plugin@1.3.4
 - @appium/gulp-plugins@6.0.9
 - @appium/images-plugin@1.1.10
 - @appium/relaxed-caps-plugin@1.0.0-beta.6
 - @appium/support@2.58.0
 - @appium/test-support@1.3.19
 - @appium/types@0.2.3
 - @appium/universal-xml-plugin@1.0.0-beta.8
@appium/base-driver@8.5.3 @appium/base-plugin@1.8.5 @appium/doctor@1.16.18 @appium/docutils@0.0.4 @appium/eslint-config-appium@5.1.0 @appium/execute-driver-plugin@1.0.5 @appium/fake-driver@3.2.13 @appium/fake-plugin@1.3.4 @appium/gulp-plugins@6.0.9 @appium/images-plugin@1.1.10 @appium/relaxed-caps-plugin@1.0.0-beta.6 @appium/support@2.58.0 @appium/test-support@1.3.19 @appium/types@0.2.3 @appium/universal-xml-plugin@1.0.0-beta.8 appium@2.0.0-beta.34
2022-05-02 14:47:10 -07:00
Christopher Hiller 88a6655253 fix(eslint-config-appium): disable space-before-function-paren
BREAKING CHANGE

This explicitly-set rule conflicts with prettier and needs to be disabled.
2022-05-02 14:23:52 -07:00
Renovate Bot 38b4fa2bad chore(): update dependency ws to v8.6.0 2022-05-02 15:21:36 +00:00
Renovate Bot 67dacd87cf chore(gulp-plugins): update dependency @types/node to v16.11.33 2022-05-02 12:44:16 +00:00
Renovate Bot f1b36cc7c5 chore(support): update dependency axios to v0.27.2 2022-04-30 18:00:05 +00:00
Renovate Bot ec1b95b96c chore(): update dependency chai-webdriverio-async to v2.7.0 2022-04-30 15:20:46 +00:00
Renovate Bot bbce027f34 chore(): update babel monorepo to v7.17.10 2022-04-30 13:07:26 +00:00
Renovate Bot 2e7c1bb46e chore(base-driver): update dependency express to v4.18.1 2022-04-30 11:05:43 +00:00
Renovate Bot 9df8c08b09 chore(gulp-plugins): update dependency @types/node to v16.11.32 2022-04-29 15:35:36 +00:00
Renovate Bot a67ba79dba chore(): update dependency typescript to v4.6.4 2022-04-29 12:39:18 +00:00
Renovate Bot de5a96fb08 chore(gulp-plugins): update dependency @types/node to v16.11.31 2022-04-28 16:45:19 +00:00
Renovate Bot 90918200e2 chore(doctor): update dependency inquirer to v8.2.4 2022-04-28 13:47:57 +00:00
Renovate Bot a725d052f8 chore(doctor): update dependency inquirer to v8.2.3 2022-04-27 16:29:37 +00:00
Renovate Bot e49ab6d343 chore(): update dependency lint-staged to v12.4.1 2022-04-27 13:49:29 +00:00
Renovate Bot fdee8701a6 chore(base-driver): update dependency express to v4.18.0 2022-04-26 14:27:32 +00:00
Renovate Bot 2e8e7a5d65 chore(gulp-plugins): update dependency @types/node to v16.11.29 2022-04-26 12:08:33 +00:00
Christopher Hiller 39aab21aef chore: "lerna link convert"; replace siblings with relative "file:" links
This is a "fix" but only for the dev environment.

Further:

- add install of `mjpeg-consumer` to CI, since it may have disappeared from the environment
- remove `overrides` from `@appium/support`'s `package.json` since it no longer seems needed
2022-04-25 14:37:28 -07:00
Renovate Bot b957123401 chore(gulp-plugins): update dependency @types/node to v16.11.28 2022-04-25 12:01:35 +00:00
Mykola Mokhnach a2b2ded1e4 feat(support): Add a helper to deep freeze objects (#16849) 2022-04-24 07:08:50 +02:00
Christopher Hiller b34b75a80e chore: add prettier
As a pre-commit hook, `.js` files will be run thru `eslint --fix` and rewritten using `prettier`.
Added `eslint-config-prettier` to disable rules incompatible with `prettier`.
2022-04-22 15:56:35 -07:00
Kazuaki Matsuo 4d91f76e4c docs(appium): add python.py (#16840)
* add python.py

* update the explanation

* remove duplicated import

* tweak, add en lang to make the find element stable

* update review

* make list
2022-04-22 09:42:39 -07:00