Commit Graph

190 Commits

Author SHA1 Message Date
Jonathan Lipps 422142302f chore: publish
- appium@2.0.0-beta.49
 - @appium/base-driver@9.2.0
 - @appium/base-plugin@2.1.0
 - @appium/doctor@2.0.2
 - @appium/docutils@0.1.2
 - @appium/driver-test-support@0.3.2
 - @appium/execute-driver-plugin@3.0.2
 - @appium/fake-driver@5.1.0
 - @appium/fake-plugin@3.1.0
 - @appium/images-plugin@2.0.2
 - @appium/opencv@2.0.2
 - @appium/plugin-test-support@0.3.2
 - @appium/relaxed-caps-plugin@1.0.1
 - @appium/schema@0.2.0
 - @appium/support@3.1.0
 - @appium/test-support@3.0.2
 - @appium/tsconfig@0.2.0
 - @appium/typedoc-plugin-appium@0.3.0
 - @appium/types@0.8.0
 - @appium/universal-xml-plugin@1.0.1
2023-01-13 13:09:28 -08:00
renovate[bot] 4b5ab4da7b fix(types): update dependency type-fest to v3.5.1 2023-01-05 12:11:09 +00:00
Christopher Hiller f036f0a612 chore: all pkgs consume @appium/tsconfig 2023-01-04 12:09:08 -08:00
Christopher Hiller 8b33414901 feat(typedoc-appium-plugin): implement cross-referencing of methods
This is getting pretty close, but:

- Commands from a driver will show even w/o a `newMethodMap` or `execMethodMap`; it is able to understand that it's overriding `BaseDriver`
- It's also able to understand the associated routes
- And it's able to understand the routes even if `BaseDriver` does not implement it

Still working on the parameters display, but we have the name override working at least.

Added some docstrings in `fake-driver`, `base-driver` for testing
2023-01-03 12:50:53 -08:00
renovate[bot] 7bb4e07d68 fix(support): update dependency klaw to v4.1.0 2022-12-31 18:47:53 +00:00
renovate[bot] 5291ca672b fix(support): update dependency axios to v1.2.2 2022-12-29 11:18:58 +00:00
renovate[bot] 8c8bfe824d fix(types): update dependency type-fest to v3.5.0 2022-12-26 10:26:59 +00:00
Jonathan Lipps 2e76ba9607 chore: publish
- appium@2.0.0-beta.48
 - @appium/base-driver@9.1.0
 - @appium/base-plugin@2.0.1
 - @appium/doctor@2.0.1
 - @appium/docutils@0.1.1
 - @appium/driver-test-support@0.3.1
 - @appium/execute-driver-plugin@3.0.1
 - @appium/fake-plugin@3.0.1
 - @appium/images-plugin@2.0.1
 - @appium/opencv@2.0.1
 - @appium/plugin-test-support@0.3.1
 - @appium/support@3.0.1
 - @appium/test-support@3.0.1
 - @appium/typedoc-plugin-appium@0.2.1
 - @appium/types@0.7.0
2022-12-21 11:57:39 -08:00
Christopher Hiller 48b7b05a1f chore(support): quiet some noisy debug logging 2022-12-15 17:11:35 -08:00
Christopher Hiller fee1c98ee9 chore: run e2e tests in parallel
This change makes Lerna execute E2E tests across two cores.  Some of the slower E2E suites (`appium`, `support`, `opencv` and `base-driver`) also run in parallel via Mocha's `--parallel` flag.

In Appium, the main culprit was `cli.e2e.spec.js`, which I split into four files: `args` (argument handling), `cli-driver` (`driver` command), `cli-plugin` (`plugin` command) and `local` (behavior when Appium is a dependency).  This should run faster (in theory) since Mocha runs tests in parallel _per file_ and will expand to the available cores.

CI has limited cores, so this won't really help there--but it will speed up local development.  When running tests locally, you may see various delays, as Mocha buffers the output of a single test file.

This is a continuation of the work I did in #17252.
2022-12-14 13:28:31 -08:00
renovate[bot] 37f71c327a fix(types): update dependency type-fest to v3.4.0 2022-12-14 14:57:42 +00:00
Jonathan Lipps 0823f0b60e chore: publish
- appium@2.0.0-beta.47
 - @appium/base-driver@9.0.0
 - @appium/base-plugin@2.0.0
 - @appium/doctor@2.0.0
 - @appium/docutils@0.1.0
 - @appium/driver-test-support@0.3.0
 - @appium/eslint-config-appium@8.0.0
 - @appium/execute-driver-plugin@3.0.0
 - @appium/fake-driver@5.0.0
 - @appium/fake-plugin@3.0.0
 - @appium/gulp-plugins@8.0.0
 - @appium/images-plugin@2.0.0
 - @appium/opencv@2.0.0
 - @appium/plugin-test-support@0.3.0
 - @appium/relaxed-caps-plugin@1.0.0-beta.14
 - @appium/schema@0.1.0
 - @appium/support@3.0.0
 - @appium/test-support@3.0.0
 - @appium/typedoc-plugin-appium@0.2.0
 - @appium/types@0.6.0
 - @appium/universal-xml-plugin@1.0.0-beta.16
2022-12-13 16:10:05 -08:00
Christopher Hiller d31aaf9916 chore: update TS configuration
This pulls in some recommended settings from `@tsconfig/node14` (a proper TS target configuration for Node.js v14; ours wasn't _wrong_ per se, but this is better) and allows us more flexible use of `ts-node`.  Use of this module is recommended by `ts-node` (which we need to run tests).

`ts-node`'s behavior changes _depending on the directory in which it's run_--and this can cause some really nonsensical bugs--so the changes here ensure that it will act the same regardless of if you're running tests from a package directory or the monorepo root.

Also:

- Ensure various `clean` scripts don't fail if they've been run before `build`
- Enable `strict` mode in `@appium/types` cause we can
- Fix a type issue found in `@appium/support`; this does not appear to have been a traditional bug but rather a type disagreement surfaced by the new config

# Conflicts:
#	package-lock.json
#	packages/typedoc-plugin-appium/tsconfig.json
2022-12-06 18:08:15 -08:00
Christopher Hiller 3c32112c20 chore: use tsc for compilation across the board
- `@appium/gulp-plugins` does not use `tsc` and continues to use...whatever it uses.
- `@appium/doctor` now has generated declarations, though I didn't bother to do anything with the types
- rewrote swaths of build scripts:
  - removed the `fix` and `lint` scripts from each workspace (package) since I don't think they get used and they are of limited value
  - for tests and autoinstallation of extensions, added `ts-node` for on-the-fly compilation
  - workspaces _can_ define their own `build` and `clean` scripts (both should be required if either is used).  these do not currently get run when running `npm run dev`, but they do occur on a bare `npm install` from the monorepo root or a `npm run reinstall`.
  - `npm run rebuild` does a fresh rebuild, but does not clean any `node_modules` dirs nor does it reinstall anything.
  - removed `prepublishOnly` since `preversion` does the same thing
  - `npm test` now runs `build`/`lint` in parallel
- postinstall script of `appium` ("autoinstall") script now must call `npm run build` if in a fresh dev environment. this is because a) lifecycle scripts of packages run before lifecycle scripts in the monorepo root, and b) `postinstall` runs before `prepare`. so there's really no way around it; even using `ts-node` fails because other modules depend on `@appium/support/index.js` which expects the pkg to be built.

Closes #17746
Closes #17807
2022-12-06 11:21:05 -08:00
renovate[bot] 07d6ef6b8c fix(support): update dependency axios to v1.2.1 2022-12-06 14:04:30 +00:00
renovate[bot] 062090ed91 fix(support): update dependency @types/uuid to v9 2022-12-05 11:48:44 -08:00
renovate[bot] b297bb8891 fix(support): update dependency klaw to v4 2022-12-02 14:03:02 -08:00
renovate[bot] 68778ca5c5 fix(support): update dependency npmlog to v7 2022-12-02 14:02:53 -08:00
renovate[bot] 2a42ccd110 fix(support): update dependency which to v3 2022-12-01 16:41:24 -08:00
Christopher Hiller a1dbe6c43e chore!: set engines to minimum Node.js v14.17.0
BREAKING CHANGE: Appium now supports version range `^14.17.0 || ^16.13.0 || >=18.0.0`
2022-12-01 16:38:18 -08:00
Christopher Hiller 14d6cb1600 chore(support): return installation path from npm.installPackage() in addition to package.json
This is a breaking change if someone is actually using the `npm` module out of `@appium/support`.  Personally, I'm gonna go with "no"

The signature of `installPackage()` has changed from returning a parsed `package.json` to returning an `NpmInstallReceipt` object, which contains parsed `package.json` prop `pkg` and `string` prop `installPath`.
2022-11-29 13:01:55 -08:00
renovate[bot] 33aef07d24 fix(types): update dependency type-fest to v3.3.0 2022-11-28 15:47:38 +00:00
renovate[bot] b80b88bd9c fix(support): update dependency axios to v1.2.0 2022-11-23 15:34:11 +00:00
Christopher Hiller b5be1fe93b feat(appium,support): use npm link for local installs
npm may have changed its behavior around installation of packages at local paths, but `npm install /path/to/thing` no longer seems to create a symlink.

the `installPackage()` method in `@appium/support`'s `npm` module now accepts an `installType` option.  if the value is `local` an `npm link` will be performed; otherwise an `npm install` will be performed.

- (appium) reverted some changes I made to a test in `driver.e2e.spec.js`
- `installViaNpm` now wants an `installType` option.  this is required
- removed a redundant script
2022-11-22 14:32:10 -08:00
Christopher Hiller 4746080e54 feat(): experimental support for typedoc generation
Run `npm run typedoc` to generate docs in `typedoc-docs` dir.

I thought I'd take a few mins and set this up.  It was _mostly_ straightforward, except:

1. Figuring out the "entry point" for each package was difficult until I realized `.js` entry points are assumed to be compiled, and thus require a `sourceMappingUrl` reference. IMO this is probably a bug in TypeDoc
2. The `sourceMappingUrl` must reference an external sourcemap file; not an inline source map.  If it's an inline source map, the system tries to `fs.open` a large data-url.
3. The babel config does not control whether external sourcemaps are created; `@babel/cli` does. So I needed to change those.
4. Practically speaking, I don't see any drawback to external sourcemaps _yet_
5. TypeDoc has poor support for cross-package type references in monorepos, and I had to add a plugin which implements a workaround
6. Per some suggestions in the docs, I modified the order of references in the root `tsconfig.json` to start with "the biggest one first"

I didn't modify any types or docstrings anywhere.
2022-11-22 14:32:10 -08:00
renovate[bot] f5da9f31a3 fix(types): update dependency type-fest to v3.2.0 2022-11-06 08:41:14 +00:00
Christopher Hiller 792e70be83 fix(fake-plugin,support): type fixes for DT upgrade 2022-11-03 14:58:04 -07:00
Christopher Hiller b3b642778a fix(appium,support): re-enable log-filters
server option `log-filters` is now supported via embedding in Appium config files _or_ via CLI using an external JSON file.

example fixtures included.

Note that the `Rule` type has been replaced with the `LogFilter` type automatically generated from the schema (see previous commit).
2022-11-02 18:39:16 -07:00
renovate[bot] 5d3e4782af fix(support): update dependency uuid to v9 (#17454)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 17:11:57 +01:00
renovate[bot] b7b9453a5c chore(support): update dependency axios to v1 (#17568) 2022-11-01 14:22:52 +01:00
Christopher Hiller aa415bc646 fix(support): force type of promisified read() 2022-10-31 16:02:44 -07:00
Christopher Hiller 9e190cc95b chore(appium,support): fix teen_process types
Version 2 of the types introduced breaking changes for ...some reason.
2022-10-31 16:02:05 -07:00
renovate[bot] 914c946883 chore(support): update dependency @types/teen_process to v2 2022-10-31 16:02:05 -07:00
Mykola Mokhnach 32a2616c36 fix(support): Make upgradable versions parsing more permissive (#17666) 2022-10-27 22:01:13 +02:00
renovate[bot] 3671178d00 chore(support): update dependency @types/semver to v7.3.13 2022-10-27 14:06:15 +00:00
Christopher Hiller 125a68fe47 fix(opencv,support): override jpeg-js version
Jimp will not get upgraded so we need to do this to avoid the vuln in older versions of jpeg-js.
I also removed the relative deps from the monorepo root since they seemed to befoul the overrides. They are no longer needed due to workspaces (I think)
2022-10-18 13:33:08 -07:00
Christopher Hiller 6b3cc1a874 Publish
- appium@2.0.0-beta.46
 - @appium/base-driver@8.7.3
 - @appium/base-plugin@1.10.5
 - @appium/doctor@1.16.28
 - @appium/docutils@0.0.13
 - @appium/fake-plugin@2.1.3
 - @appium/gulp-plugins@7.0.8
 - @appium/support@2.61.1
 - @appium/test-support@2.0.2
2022-10-14 14:02:09 -07:00
renovate[bot] 8c092b1172 chore(support): update dependency shell-quote to v1.7.4 2022-10-14 11:45:38 +00:00
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
2022-10-13 16:25:16 -07:00
renovate[bot] 24a0efd695 chore(types): update dependency type-fest to v3.1.0 2022-10-10 10:13:17 +00: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] 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] 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] 096f0ab2fe chore(support): update dependency jimp to v0.16.2 2022-09-16 12:10:33 +00:00
Christopher Hiller c26af8f852 Publish
- appium@2.0.0-beta.44
 - @appium/base-driver@8.7.1
 - @appium/base-plugin@1.10.3
 - @appium/doctor@1.16.26
 - @appium/docutils@0.0.11
 - @appium/driver-test-support@0.2.0
 - @appium/eslint-config-appium@7.0.0
 - @appium/execute-driver-plugin@2.0.5
 - @appium/fake-driver@4.2.1
 - @appium/fake-plugin@2.1.1
 - @appium/gulp-plugins@7.0.6
 - @appium/images-plugin@1.3.6
 - @appium/opencv@1.0.12
 - @appium/plugin-test-support@0.2.0
 - @appium/relaxed-caps-plugin@1.0.0-beta.12
 - @appium/support@2.60.0
 - @appium/test-support@2.0.0
 - @appium/types@0.4.1
 - @appium/universal-xml-plugin@1.0.0-beta.14
2022-09-07 12:40:03 -07:00
renovate[bot] bfef2db517 chore(gulp-plugins): update babel monorepo to v7.19.0 2022-09-06 19:52:27 +00:00