Commit Graph

9955 Commits

Author SHA1 Message Date
Christopher Hiller 020473afc4 fix(eslint-config-appium): disable import/no-unresolved for tsd tests
`tsd` has a apparently non-standard resolution algorithm
2023-03-27 12:44:47 -07:00
Christopher Hiller 497641a00d chore: add tsd for testing types
This adds [tsd](https://npm.im/tsd) which provides a small framework around running expectations against declaration files.  This is intended to be run against hand-written declarations, but because we (apparently) cannot rely on `tsc` to output valid declaration files, we should also use it to test the generated declarations of our packages.
2023-03-27 12:44:47 -07:00
renovate[bot] bc860c733a fix(types): update dependency type-fest to v3.7.1 2023-03-27 08:31:03 +00:00
renovate[bot] d774a8428a fix(test-support): update dependency sinon to v15.0.3 2023-03-27 07:22:50 +00:00
renovate[bot] a593269f61 chore(deps): update dependency @types/node to v18.15.10 2023-03-26 08:57:05 +00:00
renovate[bot] 89fd52a602 chore(deps): update dependency @types/node to v18.15.9 2023-03-25 15:57:36 +00:00
renovate[bot] 7f061d2362 chore(docutils): update dependency mkdocs-material to v9.1.4 2023-03-25 11:08:46 +00:00
renovate[bot] 2c1e1532ad chore(deps): update dependency lerna to v6.6.1 2023-03-25 08:02:49 +00:00
Christopher Hiller 0c52b50e65 fix(appium): remove longjohn
This removes `longjohn` and replaces it with a statement which increases the stack trace limit from the default (10) to 100.

I believe setting this overrides whatever was passed to the runtime `--stack-trace-limit` option.  If someone complains, we can try a different strategy.

Closes #18357
2023-03-24 12:22:33 -07:00
renovate[bot] 6db70f4143 chore(deps): update dependency lerna to v6.6.0 2023-03-24 14:27:16 +00:00
renovate[bot] 1800530bf2 chore(deps): update definitelytyped 2023-03-24 12:45:03 +00:00
renovate[bot] 32a5ee91df chore(deps): update dependency prettier to v2.8.7 2023-03-24 10:53:51 +00:00
renovate[bot] 5c0315d3bb chore(workflows): update actions/checkout digest to 8f4b7f8 2023-03-24 08:40:56 +00:00
Erhan Alankuş 12f4ec404c docs(appium): grammar fix (#18359)
Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2023-03-23 23:21:19 -07:00
Erhan Alankuş 8aa39c117f docs(appium): update index.md (#18363)
Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2023-03-23 23:20:46 -07:00
Christopher Hiller 017216533b chore(ci): suppress warnings when linting
This suppresses all warnings when running ESLint in CI (since they are noisy)
2023-03-23 13:05:31 -07:00
Christopher Hiller 499bda4533 chore(types): make the lone JS file a TS file
also: remove unused imports
2023-03-23 12:15:51 -07:00
Christopher Hiller 9ef564f0be chore(types): move more utility types into util module 2023-03-23 12:15:51 -07:00
Christopher Hiller d303527c3d fix(base-driver): misc type fixes
- `PostProcessOptions` moved into `@appium/types`
- `shutdownUnexpectedly` cannot be marked `@protected` as anything used this way is inaccessible in mixins
- suppress a `@typescript-eslint` warning. this probably needs to happen in a few other files
2023-03-23 12:15:51 -07:00
Christopher Hiller 51a8f2fc34 fix(base-driver): fix timeout mixin to use proper context types 2023-03-23 12:15:51 -07:00
Christopher Hiller c56dc98d13 chore(base-driver): fix description of mixin function to refer to BaseDriver 2023-03-23 12:15:51 -07:00
Christopher Hiller 454f6a5d63 fix(support): fix a few type problems; use new HTTPHeaders type 2023-03-23 12:15:51 -07:00
Christopher Hiller 87408e529c chore(types): organize more types; remove some deprecated types
This change removes types for methods in `ExternalDriver` (or rather the interfaces that build it) that were marked `@deprecated` and  consumed by `appium-xcuitest-driver`.  I salvaged what I could from the descriptions in these docstrings, and have moved them into `appium-xcuitest-driver` (obviously not in this repo).

Also:

- created some new files to group types logically
- created a `HTTPHeaders` type
- created a type `ConfigureAppOptions` for `DriverHelpers.configureApp`, and a `PostProcessOptions` type within it.
- added a couple other types
- fixed some signatures to look more like reality
- modified the return value of `queryAppState()` to return `0|1|2|3|4` instead of `0|1|3|4` since `appium-xcuitest-driver` returns the former
- made the `LogDef` and related types even _more_ loose.  tbh these are very awkward to type properly; I cannot figure out a good way to narrowly type the `self` param to a log `getter`.
- noted which of the remaining `@deprecated` methods in `ExternalDriver` were _not_ in use by `appium-xcuitest-driver`, so I can later remove them once I've salvaged the docstrings to put into `appium-uiautomator2-driver`.
2023-03-23 12:15:51 -07:00
Christopher Hiller 24bec8ce81 chore: downgrade log message about manifest upgrade
Most users are not going to care or know what this is.
2023-03-23 11:56:05 -07:00
Christopher Hiller d9b47bc864 feat(appium): improvements to ext commands when running extension in development
This PR does a handful of things:

1. It adds a `--verbose` flag to `appium <driver|plugin> list` which just dumps a big object (via Node's `util.inspect()`), which contains the underlying manifest file data
2. It creates a new manifest schema revision where the "install type" can be `dev`. Added a migration.
3. Displays a warning if trying to uninstall an extension in dev mode
4. Displays `[installed (dev mode)]` instead of `[installed (npm)]` when running `appium <driver|plugin> list` w/o `--verbose` flag
5. Attempted to simplify the return type of `ExtensionCommand.list()`

Closes #18277
2023-03-23 11:56:05 -07:00
renovate[bot] 6912fa14f2 fix(types): update dependency type-fest to v3.7.0 2023-03-23 11:22:16 +00:00
renovate[bot] 45291f71f4 chore(deps): update dependency @commitlint/cli to v17.5.0 2023-03-23 06:48:55 +00:00
Christopher Hiller 409192d063 fix(eslint-config-appium-ts): disable brace-style rule
In certain situations in `.ts` sources, class definition lines can get very long.  Prettier will split these into multiple lines, and add a final line with `{` at position 0.  This conflicts with the `brace-style` rule in ESLint.  I am not sure why the ESLint prettier config doesn't already handle this, but I am going to guess it's because that config doesn't work on `.ts` sources.
2023-03-22 16:25:22 -07:00
Christopher Hiller 309fe4c964 chore: lint everything 2023-03-22 16:25:22 -07:00
Christopher Hiller 34891f5657 fix(base-driver,types): fix websocket-related types on AppiumServer 2023-03-22 16:25:22 -07:00
Christopher Hiller 43df77f6b6 feat(eslint-config-appium-ts)!: enable for JS sources
BREAKING CHANGE: This makes `@appium/eslint-config-appium-ts` also apply to JS sources _and_ requires a new peer dependency (`eslint-import-resolver-typescript`). The `main` file is now a `.js` file.  The module is expected to _extend_ `@appium/eslint-config-appium`, not replace it; consumers needn't extend both in their ESLint config.

In the not-too-distant past, `@typescript-eslint/parser` was unable to understand docstrings in `.js` files. Evidently this is no longer true.

I've rewritten and heavily commented the configuration explaining the intent behind everything.
2023-03-22 16:25:22 -07:00
Christopher Hiller 78c6a0b991 chore: remove jsdoc vestiges 2023-03-22 11:59:20 -07:00
Mykola Mokhnach d3e91222c8 chore(base-driver): Check if a valid Error instance is thrown (#18369) 2023-03-22 07:20:32 +01:00
renovate[bot] f2dadd8f8f chore(deps): update eslint-related packages 2023-03-21 16:58:18 +00:00
renovate[bot] ffedb6e40e chore(deps): update dependency prettier to v2.8.6 2023-03-21 13:03:08 +00:00
renovate[bot] fdcd01ba35 chore(deps): update definitelytyped 2023-03-21 09:41:25 +00:00
renovate[bot] bd3ecc3fb1 fix(support): update definitelytyped 2023-03-20 19:24:56 +00:00
renovate[bot] dbc0bf69e8 fix(docutils): update dependency typedoc to v0.23.28 2023-03-20 15:46:26 +00:00
renovate[bot] 23b1096caa chore(deps): update dependency prettier to v2.8.5 2023-03-20 10:19:01 +00:00
Daniel Mertins 8805792089 docs(appium): fix links to drivers lists (#18355) 2023-03-16 14:52:24 -04:00
renovate[bot] ef9cbe6bcc fix(docutils): update dependency typedoc to v0.23.27 2023-03-16 14:34:02 +00:00
renovate[bot] fc19705ecd chore(workflows): update actions/checkout digest to 24cb908 2023-03-16 13:12:23 +00:00
Mykola Mokhnach d4654138ee chore(base-driver): Update HTTP caching logic and align it with the standard (#18348) 2023-03-16 07:30:11 +01:00
renovate[bot] 930a45dafe chore(docutils): update dependency mkdocs-material to v9.1.3 2023-03-15 08:39:34 +00:00
renovate[bot] f1a8ce0bba fix(test-support): update dependency sinon to v15.0.2 2023-03-14 10:19:30 -07:00
renovate[bot] 287974a93a chore(deps): update eslint-related packages to v5.55.0 2023-03-14 13:29:43 +00:00
renovate[bot] 4c081c6723 chore(deps): update dependency ws to v8.13.0 2023-03-11 16:32:10 +00:00
renovate[bot] 58ae10f887 chore(deps): update dependency eslint to v8.36.0 2023-03-11 13:01:30 +00:00
renovate[bot] f673efcba5 chore(deps): update dependency lint-staged to v13.2.0 2023-03-10 20:55:04 +00:00
renovate[bot] 503da432dc chore(deps): update dependency lint-staged to v13.1.4 2023-03-10 17:03:49 +00:00