Commit Graph

9145 Commits

Author SHA1 Message Date
Jonathan Lipps f545a6cde5 Publish
- appium@2.0.0-beta.45
 - @appium/base-driver@8.7.2
 - @appium/base-plugin@1.10.4
 - @appium/doctor@1.16.27
 - @appium/docutils@0.0.12
 - @appium/driver-test-support@0.2.1
 - @appium/execute-driver-plugin@2.0.6
 - @appium/fake-driver@4.2.2
 - @appium/fake-plugin@2.1.2
 - @appium/gulp-plugins@7.0.7
 - @appium/images-plugin@1.3.7
 - @appium/opencv@1.0.13
 - @appium/plugin-test-support@0.2.1
 - @appium/relaxed-caps-plugin@1.0.0-beta.13
 - @appium/support@2.61.0
 - @appium/test-support@2.0.1
 - @appium/types@0.5.0
 - @appium/universal-xml-plugin@1.0.0-beta.15
@appium/base-driver@8.7.2 @appium/base-plugin@1.10.4 @appium/doctor@1.16.27 @appium/docutils@0.0.12 @appium/driver-test-support@0.2.1 @appium/execute-driver-plugin@2.0.6 @appium/fake-driver@4.2.2 @appium/fake-plugin@2.1.2 @appium/gulp-plugins@7.0.7 @appium/images-plugin@1.3.7 @appium/opencv@1.0.13 @appium/plugin-test-support@0.2.1 @appium/relaxed-caps-plugin@1.0.0-beta.13 @appium/support@2.61.0 @appium/test-support@2.0.1 @appium/types@0.5.0 @appium/universal-xml-plugin@1.0.0-beta.15 appium@2.0.0-beta.45
2022-10-13 16:25:16 -07:00
renovate[bot] c7072027d6 chore(workflows): update actions/checkout digest to 93ea575 2022-10-11 19:04:38 +00:00
renovate[bot] ed8b65ce72 chore(gulp-plugins): update dependency @babel/preset-env to v7.19.4 2022-10-11 18:43:03 +00:00
Mykola Mokhnach 9399654c8a docs: Delete the absolute requirements section 2022-10-11 15:19:21 +02:00
Mykola Mokhnach 1547c7535e docs: Update Appium 2 installation tutorial (#17590) 2022-10-11 15:15:32 +02:00
renovate[bot] b18ba50f8e chore(fake-driver): update dependency @xmldom/xmldom to v0.8.3 2022-10-11 09:58:42 +00:00
renovate[bot] 24a0efd695 chore(types): update dependency type-fest to v3.1.0 2022-10-10 10:13:17 +00:00
renovate[bot] 2a452cec4b chore(base-driver): update dependency express to v4.18.2 2022-10-09 08:06:46 +00:00
renovate[bot] 8c7acd52a5 chore(gulp-plugins): update dependency eslint to v8.25.0 2022-10-08 07:34:35 +00:00
renovate[bot] 5bca642efa chore(base-driver): update dependency body-parser to v1.20.1 2022-10-07 13:18:13 +00:00
Mykola Mokhnach 6c451e1f7d chore(appium): Remove logging from adjustNodePath helper (#17578) 2022-10-07 10:58:56 +02:00
Christopher Hiller 9ce09845c8 chore(): replaced a ternary 2022-10-06 15:30:22 -07:00
Christopher Hiller 4d7d8e4d38 fix(types): fix driverForSession declaration 2022-10-06 15:30:22 -07:00
Christopher Hiller a3ad768802 chore(): review fixes 2022-10-06 15:30:22 -07:00
Christopher Hiller b20d0b82a2 chore(appium,base-driver,driver-test-support,types): overhaul types for constraints and caps
The big idea here is:

1. `desiredCapConstraints` should always contain the constraints _for that driver_; it no longer contains the "base" constraints. This is the only thing that really required any logic changes (though they are somewhat spread out).  The "merged" constraints object is available via `_desiredCapConstraints`.
2. `Capabilities` and W3C-style `W3CCapabilities` are now _derived from_ constraints.  This absolves us (and extension authors) from needing to create an interface describing their capabilities.
3. Changes to caps and constraints now reflect in `DriverOpts` (`this.opts`) in drivers
4. `caps` and `originalCaps` declarations have moved from `Core` to `Driver`
5. TypeScript compiles the JS output from `@appium/types` (which is just a static "constraints" object)

Resolves #17518
2022-10-06 15:30:22 -07:00
Christopher Hiller 2fa8b2d0c1 fix(ci): do not install fake-driver; it is already present 2022-10-06 15:15:18 -07:00
Christopher Hiller b186928e60 feat(appium,support): enable detection of local extensions for improved DX
This change makes Appium recognize the existence of an extension in the current (or parent) dir, and automatically adds it to the extension manifest.

Resolution of Appium (e.g., _how_ Appium was installed) is no longer taken into account when determining if we're "in" a package that depends upon Appium.  So you can easily `npm link appium` in an extension working copy if you wish, and this will not impact Appium's behavior.

To support this change, `hasAppiumDependency()` in `@appium/support`'s `env` has changed to be a wrapper around the new `findAppiumDependency()`.  The strategy here is to use `npm list --long` to get detailed information about the current directory.  The result will have an object with a `path` property, and that property points to the current workspace root (or current project root).  We can then read the `package.json` in the `path` property--or just the CWD--to make the determination about an `appium` dependency (or lack thereof).  For extension working copies, this will return `true` because `appium` will be present in `devDependencies`, `peerDependencies`, or both.  For any other project, it will usually just be in `devDependencies`.  If there's no `package.json` in the CWD and we're not in a workspace, Appium continues to use the default `APPIUM_HOME`.

One side effect of this is that running `appium` from the monorepo itself treats the dir hierarchy as a package which has an `appium` dependency (because it does!).  To that end, the default `APPIUM_HOME` will _not_ be used when running `appium` from _anywhere in the monorepo_ unless you explicitly set `APPIUM_HOME` in an environment variable.  Generally, our tests prescribe their own temporary `APPIUM_HOME` directories, so this should have no effect on them (in the general case).  It _will_ have an effect on running `appium` manually in a development environment, as the workspace root will be treated as `APPIUM_HOME`; running `node ./packages/appium/index.js driver install uiautomator2` (or `npm start -- driver install uiautomator2`) will install that driver as a dev dependency (and save it).  I could add a special case _just for the monorepo_ if we don't want this to happen, but it may introduce complexity we/I don't want to maintain, so I left it out.  Furthermore, `npm start -- driver list` will show the `fake` driver, and `npm start -- plugin list` will show all of the plugins in `packages/`.

Regardless, I view this as a solid win for extension developers.

Bonus:

While I don't have benchmarks, this should considerably improve performance when detecting locally-installed (`node_modules/some-extension`) or extension working copies.  Instead of using `klaw` to walk the filesystem (in serial!) we can just use `glob` to look for relevant `package.json` files.  Instead of waiting until `glob` is completely finished searching, we can listen for its `match` evens and begin processing `package.json` files as soon as they are found. Because `@appium/support` only exposes a promisifed `glob()`--with no access to the `EventEmitter` it returns--`appium` depends on `glob` directly.
2022-10-06 15:15:18 -07:00
Christopher Hiller cc04e6595b chore(): remove babel-runtime
Closes #17536
2022-10-06 11:51:49 -07:00
renovate[bot] c46060cae7 chore(appium): update dependency yaml to v2.1.3 2022-10-06 11:02:59 +00:00
renovate[bot] e7c3536c15 chore(): update dependency @types/mocha to v10 2022-10-05 13:24:12 -07:00
renovate[bot] 45e653151d chore(types): update dependency type-fest to v3 2022-10-05 13:24:04 -07:00
renovate[bot] 4829984e2e chore(support): update dependency semver to v7.3.8 2022-10-05 13:43:21 +00:00
renovate[bot] 46644bc2d1 chore(test-support): update dependency sinon to v14.0.1 2022-10-04 15:08:39 +00:00
renovate[bot] 2752df1aae chore(doctor): update dependency appium-adb to v9.10.11 2022-10-04 10:09:40 +00:00
renovate[bot] daaf86220b chore(): update dependency @types/node to v16.11.64 2022-10-04 09:37:13 +00:00
renovate[bot] 4a7cab26fa chore(appium): update dependency yaml to v2.1.2 2022-10-03 11:13:04 +00:00
renovate[bot] 07c8660a50 chore(): update dependency @types/node to v16.11.63 2022-10-03 10:46:25 +00:00
renovate[bot] 04231eb833 chore(gulp-plugins): update dependency yargs to v17.6.0 2022-10-01 08:03:07 +00:00
renovate[bot] 160238e929 chore(types): update webdriverio monorepo to v7.25.1 2022-10-01 07:35:17 +00:00
renovate[bot] bda6746d7b chore(driver-test-support): update dependency @types/lodash to v4.14.186 2022-09-29 08:26:26 +00:00
renovate[bot] a77e5398f6 chore(): update babel monorepo to v7.19.3 2022-09-28 11:43:54 +00:00
renovate[bot] 08fc54b536 chore(workflows): update actions/setup-node digest to 969bd26 2022-09-28 11:11:40 +00:00
renovate[bot] 7a1ee2b173 chore(): update dependency @types/node to v16.11.62 2022-09-27 13:30:32 +00:00
renovate[bot] 9ea95a27a3 chore(support): update dependency teen_process to v2 2022-09-26 15:26:35 -07:00
renovate[bot] 86ac5f7a2b chore(support): update dependency @types/glob to v8 2022-09-26 10:52:41 -07:00
Christopher Hiller 08f0bc8839 feat(support): add fs.isExecutable()
This is handy for drivers which need to find executables in the filesystem.

Also fixes possible false-positives in `fs.exists()`/`fs.hasAccess()` on Windows.
2022-09-26 10:50:32 -07:00
renovate[bot] 75f030b35f chore(types): update webdriverio monorepo to v7.25.0 2022-09-26 03:14:41 +00:00
Mykola Mokhnach 882958575b docs: Add Linux driver to the list of third parties (#17523) 2022-09-25 19:00:21 +02:00
renovate[bot] 2eab139f18 chore(gulp-plugins): update dependency eslint to v8.24.0 2022-09-24 14:51:27 +00:00
renovate[bot] 0eb92e493b chore(opencv): update dependency @types/bluebird to v3.5.37 2022-09-24 11:47:38 +00:00
renovate[bot] d945b0f2fe chore(): update dependency @types/node to v16.11.60 2022-09-24 11:19:19 +00:00
renovate[bot] e5d2422990 chore(): update dependency ws to v8.9.0 2022-09-23 11:48:16 +00:00
renovate[bot] 31b6b2fe7d chore(types): update webdriverio monorepo to v7.24.1 2022-09-22 13:12:22 +00:00
Christopher Hiller b2b2225aee chore(): format .ts* files 2022-09-19 12:30:34 -07:00
Christopher Hiller 4abe91004d feat(types): adds types to derive capabilities from constraints
Driver authors and end-users may find these types useful.  I still haven't fleshed out how to best provide these to end-users, but we can use `DriverCaps<MyDriver>` which is an object containing Appium's caps _in addition to_ those defined by the `desiredCapConstraints` of `MyDriver`, e.g.:

```js

class MyClass {
  desiredCapConstraints = {foo: {isString: true, inclusion: ['bar', 'baz']}, quux: {isNumber: true}}
}

/** @typedef {DriverCaps<MyClass>} MyClassCaps */
// looks like {platformName: string, ..., foo: 'bar' | baz', quux: number}
```
2022-09-19 12:30:34 -07:00
renovate[bot] 2101da3843 chore(docutils): update dependency jsdoc-plugin-typescript to v2.2.0 2022-09-17 11:45:58 +00:00
renovate[bot] 595545ac58 chore(base-driver): update dependency @types/async-lock to v1.3.0 2022-09-16 15:40:58 +00:00
renovate[bot] 096f0ab2fe chore(support): update dependency jimp to v0.16.2 2022-09-16 12:10:33 +00:00
renovate[bot] 2605714a0c chore(appium): update dependency @sidvind/better-ajv-errors to v2.1.0 2022-09-15 21:04:45 +00:00
renovate[bot] 9dc66a2451 chore(gulp-plugins): update babel monorepo to v7.19.1 2022-09-15 17:06:15 +00:00